Skip to content

Commit

Permalink
Release RapidMiner 9.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Timm committed Dec 14, 2018
1 parent 82ddc98 commit 914829a
Show file tree
Hide file tree
Showing 225 changed files with 9,435 additions and 10,782 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ repositories {
dependencies {

// belt project for new data core
compile 'com.rapidminer:belt:0.2.0'
compile 'com.rapidminer:belt:0.3'

// belt adapter for conversion between old and new core
compile ('com.rapidminer:belt-adapter:0.1.0'){
compile ('com.rapidminer:belt-adapter:0.2'){
exclude group: 'com.rapidminer.studio', module: 'rapidminer-studio-core'
}

Expand All @@ -38,13 +38,13 @@ dependencies {
}

// RapidMiner API
compile 'com.rapidminer:rapidminer-api:0.2.1'
compile 'com.rapidminer:rapidminer-api:0.2.2'

// Alphanumeric sorting
compile 'com.rapidminer.external:alphanumeric-sorting:1.0.1'

// VLDocking as docking framework (https://code.google.com/p/vldocking/)
compile 'com.rapidminer.external:vldocking:1.2.2'
compile 'com.rapidminer.external:vldocking:9.0.1'

// Freehep for vector graphic export (http://java.freehep.org/)
compile('org.freehep:freehep-graphicsio-ps:2.3') {
Expand Down Expand Up @@ -155,7 +155,7 @@ dependencies {
compile 'org.jsoup:jsoup:1.8.3'

// access to windows registry
compile 'net.java.dev.jna:jna-platform:4.5.1'
compile 'net.java.dev.jna:jna-platform:4.5.2'

// tests require mockito
testCompile 'org.mockito:mockito-core:2.13.0'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=9.0.0
version=9.1.0
group=com.rapidminer.studio
8 changes: 5 additions & 3 deletions src/main/java/com/rapidminer/Process.java
Original file line number Diff line number Diff line change
Expand Up @@ -844,10 +844,12 @@ public void removeBreakpointListener(final BreakpointListener listener) {

/** Fires the event that the process was paused. */
private void fireBreakpointEvent(final Operator operator, final IOContainer ioContainer, final int location) {
LinkedList<BreakpointListener> l;
synchronized (breakpointListeners) {
for (BreakpointListener l : breakpointListeners) {
l.breakpointReached(this, operator, ioContainer, location);
}
l = new LinkedList<>(breakpointListeners);
}
for (BreakpointListener listener : l) {
listener.breakpointReached(this, operator, ioContainer, location);
}
}

Expand Down
186 changes: 82 additions & 104 deletions src/main/java/com/rapidminer/RapidMiner.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.ArrayList;
import java.util.List;

import com.rapidminer.belt.Builders;
import com.rapidminer.belt.Column;
import com.rapidminer.belt.ColumnTypes;
import com.rapidminer.belt.Context;
Expand Down Expand Up @@ -72,12 +73,11 @@ public static Table convertDatetimeToMilliseconds(Table table, Context context)
}

// Replace datetime columns by numeric columns containing the epoch milliseconds
TableBuilder builder = Table.from(table);
TableBuilder builder = Builders.newTableBuilder(table);
for (String label : datetimeLabels) {
Column replacement = table.transform(label)
Column replacement = table.transform(label).workload(Workload.SMALL)
.applyObjectToReal(Instant.class,
v -> v != null ? v.toEpochMilli() : Double.NaN,
Workload.SMALL,
context).toColumn();
builder.replace(label, replacement);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/rapidminer/adaption/belt/IOTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public String toString() {
str.append(table.height()).append(" examples,").append(Tools.getLineSeparator());
str.append(table.width()).append(" attributes,").append(Tools.getLineSeparator());

List<String> withRoles = table.withMetaData(ColumnRole.class);
List<String> withRoles = table.select().withMetaData(ColumnRole.class).labels();
boolean first = true;
for (String label : withRoles) {
if (first) {
Expand Down
111 changes: 111 additions & 0 deletions src/main/java/com/rapidminer/core/license/ProductLinkRegistry.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/**
* Copyright (C) 2001-2018 by RapidMiner and the contributors
*
* Complete list of developers available at our web site:
*
* http://rapidminer.com
*
* This program is free software: you can redistribute it and/or modify it under the terms of the
* GNU Affero General Public License as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License along with this program.
* If not, see http://www.gnu.org/licenses/.
*/
package com.rapidminer.core.license;

import java.net.MalformedURLException;
import java.net.URL;
import java.security.AccessControlException;
import java.security.AccessController;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

import com.rapidminer.license.StudioLicenseConstants;
import com.rapidminer.license.product.Product;
import com.rapidminer.security.PluginSandboxPolicy;


/**
* Registry for custom product links
*
* @author Jonas Wilms-Pfau
* @since 9.1.0
*/
public enum ProductLinkRegistry {
/**
* Links used for purchase
*/
PURCHASE;

private final Map<String, String> productLinkMap = new HashMap<>(0);

/**
* Registers a link for a product. Any existing mapping for the same productId is overwritten.
*
* <p>Internal, do not use.
*
* @param productId
* the {@link Product#getProductId() product id}
* @param link
* the link for the product
* @throws NullPointerException
* if one of the parameters is {@code null}
* @throws UnsupportedOperationException
* if used by 3rd parties, or if {@link StudioLicenseConstants#PRODUCT_ID} is used as a product id
* @throws IllegalArgumentException
* if the link is not a valid url
*/
public void register(String productId, String link) {
checkAccess();
Objects.requireNonNull(productId, "productId must not be null");
Objects.requireNonNull(link, "link must not be null");
try {
new URL(link);
} catch (MalformedURLException mue) {
throw new IllegalArgumentException(mue.getMessage(), mue);
}
if (StudioLicenseConstants.PRODUCT_ID.equals(productId)) {
throw new UnsupportedOperationException("Modifications of " + StudioLicenseConstants.PRODUCT_ID + " links are not allowed.");
}
productLinkMap.put(productId, link);
}

/**
* Returns the link to which the specified licenseProductKey is mapped, or defaultUrl if this registry contains no
* mapping for the key.
*
* @param productId
* the {@link Product#getProductId() product id}
* @param defaultLink
* the default link
* @return the link for the product, or the {@code defaultLink}
**/
public String get(String productId, String defaultLink) {
if (productId == null || StudioLicenseConstants.PRODUCT_ID.equals(productId)) {
return defaultLink;
}
return productLinkMap.getOrDefault(productId, defaultLink);
}

/**
* Checks if the caller has the {@link PluginSandboxPolicy#RAPIDMINER_INTERNAL_PERMISSION}
*
* @throws UnsupportedOperationException
* if the caller is not signed
*/
private static void checkAccess() {
try {
if (System.getSecurityManager() != null) {
AccessController.checkPermission(new RuntimePermission(PluginSandboxPolicy.RAPIDMINER_INTERNAL_PERMISSION));
}
} catch (AccessControlException e) {
throw new UnsupportedOperationException("Internal API, cannot be called by unauthorized sources.");
}
}
}
15 changes: 10 additions & 5 deletions src/main/java/com/rapidminer/example/AttributeWeight.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package com.rapidminer.example;

import java.util.Objects;

import com.rapidminer.tools.math.Averagable;


Expand Down Expand Up @@ -111,17 +113,20 @@ public int compareTo(AttributeWeight o) {
/** Returns true if both objects have the same name and the same weight. */
@Override
public boolean equals(Object o) {
if (!(o instanceof AttributeWeight)) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AttributeWeight w = (AttributeWeight) o;
return this.name.equals(w.name) && (this.weight == w.weight);
AttributeWeight that = (AttributeWeight) o;
return Objects.equals(name, that.name) &&
Objects.equals(weight, that.weight);
}

@Override
public int hashCode() {
long bits = Double.doubleToLongBits(this.weight);
return this.name.hashCode() ^ ((int) (bits ^ bits >>> 32));
return Objects.hash(weight, name);
}

/** Builds the sum of weights and counters. */
Expand Down
21 changes: 16 additions & 5 deletions src/main/java/com/rapidminer/example/table/DatabaseDataRow.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.BufferedReader;
import java.io.IOException;
import java.sql.Clob;
import java.sql.Date;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
Expand Down Expand Up @@ -141,11 +142,21 @@ public static double readColumn(ResultSet resultSet, Attribute attribute) throws
int valueType = attribute.getValueType();
double value;
if (Ontology.ATTRIBUTE_VALUE_TYPE.isA(valueType, Ontology.DATE_TIME)) {
Timestamp timestamp = resultSet.getTimestamp(name);
if (resultSet.wasNull()) {
value = Double.NaN;
} else {
value = timestamp.getTime();
try {
Timestamp timestamp = resultSet.getTimestamp(name);
if (resultSet.wasNull()) {
value = Double.NaN;
} else {
value = timestamp.getTime();
}
} catch (ClassCastException e) {
// DBase JDBC driver is a bit special and returns an SQL date here. So try that one as well
Date date = resultSet.getDate(name);
if (resultSet.wasNull()) {
value = Double.NaN;
} else {
value = date.getTime();
}
}
} else if (Ontology.ATTRIBUTE_VALUE_TYPE.isA(valueType, Ontology.NUMERICAL)) {
value = resultSet.getDouble(name);
Expand Down
11 changes: 10 additions & 1 deletion src/main/java/com/rapidminer/gui/ConditionalAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public abstract class ConditionalAction extends LoggedAbstractAction {

public static final int PROCESS_IS_ON_REMOTE_REPOSITORY = 10;

/**
* Process is stored and editable
*/
public static final int PROCESS_SAVED = 11;

public static final int PROCESS_RENDERER_IS_VISIBLE = 12;
Expand All @@ -86,7 +89,13 @@ public abstract class ConditionalAction extends LoggedAbstractAction {

public static final int PROCESS_HAS_BREAKPOINTS = 15;

public static final int NUMBER_OF_CONDITIONS = 16;
/**
* Process has a repository location
* @since 9.0.2
*/
public static final int PROCESS_HAS_REPOSITORY_LOCATION = 16;

public static final int NUMBER_OF_CONDITIONS = 17;

private final int[] conditions = new int[NUMBER_OF_CONDITIONS];

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/rapidminer/gui/DockableMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.rapidminer.gui.tools.ResourceDockKey;
import com.rapidminer.gui.tools.ResourceMenu;
import com.rapidminer.gui.tools.ScrollableJPopupMenu;
import com.rapidminer.tools.I18N;
import com.rapidminer.tools.LogService;
import com.rapidminer.tools.SystemInfoUtilities;
import com.rapidminer.tools.SystemInfoUtilities.OperatingSystem;
Expand Down Expand Up @@ -188,6 +189,7 @@ void fill() {
if ((PerspectiveModel.RESULT.equals(perspectiveName) && ResultDisplay.RESULT_DOCK_KEY.equals(keyName))
|| (PerspectiveModel.DESIGN.equals(perspectiveName) && ProcessPanel.PROCESS_PANEL_DOCK_KEY.equals(keyName))) {
item.setEnabled(false);
item.setToolTipText(I18N.getGUIMessage("gui.label.dockable.unclosable.tip"));
}
add(item);
ensurePopupHeight();
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/com/rapidminer/gui/ExampleVisualizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ public ExampleVisualizer(ExampleSet exampleSet) {
public void startVisualization(final Object objId) {
remapIds();

double idValue = Double.NaN;
JComponent main;
int dialogSize = ButtonDialog.MESSAGE;
if (idAttribute != null) {
final double idValue;
if (idAttribute.isNominal()) {
idValue = objId instanceof String ? idAttribute.getMapping().mapString((String) objId) : (Double) objId;
} else {
Expand All @@ -76,6 +77,7 @@ public void startVisualization(final Object objId) {
Example example = exampleSet.getExampleFromId(idValue);
if (example != null) {
main = makeMainVisualizationComponent(example);
dialogSize = ButtonDialog.NARROW;
} else {
main = new JLabel("No information available for object '" + objId + "'.");
}
Expand All @@ -84,8 +86,8 @@ public void startVisualization(final Object objId) {
}

ButtonDialogBuilder builder = new ButtonDialogBuilder("example_visualizer_dialog");
JDialog dialog = builder.setI18nArguments(objId).setContent(main, ButtonDialog.NARROW)
.setButtons(DefaultButtons.CLOSE_BUTTON).build();
JDialog dialog = builder.setI18nArguments(objId).setContent(main, dialogSize)
.setButtons(DefaultButtons.CLOSE_BUTTON).setOwner(ApplicationFrame.getApplicationFrame()).build();
dialog.setVisible(true);
}

Expand Down
Loading

0 comments on commit 914829a

Please sign in to comment.