Skip to content

Commit

Permalink
Release RapidMiner 9.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Boeck committed Jun 5, 2019
1 parent 3a2da3e commit 869802f
Show file tree
Hide file tree
Showing 499 changed files with 30,909 additions and 4,489 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repositories {
dependencies {

// belt project for new data core
compile 'com.rapidminer:belt:0.4'
compile 'com.rapidminer:belt:1.0.0-BETA'

// belt adapter for conversion between old and new core
compile ('com.rapidminer:belt-adapter:0.3'){
Expand All @@ -31,8 +31,8 @@ dependencies {
compile 'com.rapidminer.studio:rapidminer-studio-osx-adapter:1.0.2'

// RapidMiner license framework for license management
compile 'com.rapidminer.license:rapidminer-license-api:4.0.5'
compile('com.rapidminer.license:rapidminer-license-commons:4.0.5'){
compile 'com.rapidminer.license:rapidminer-license-api:4.1.2'
compile('com.rapidminer.license:rapidminer-license-commons:4.1.2'){
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}
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.2.0
version=9.3.0
group=com.rapidminer.studio
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* <element name="latestRevision" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="location" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="size" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="sizeLong" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* <element name="type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="user" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
Expand All @@ -55,6 +56,7 @@
"latestRevision",
"location",
"size",
"sizeLong",
"type",
"user"
})
Expand All @@ -67,6 +69,7 @@ public class EntryResponse
protected int latestRevision;
protected String location;
protected int size;
protected Long sizeLong;
protected String type;
protected String user;

Expand Down Expand Up @@ -166,6 +169,30 @@ public void setSize(int value) {
this.size = value;
}

/**
* Gets the value of the sizeLong property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getSizeLong() {
return sizeLong;
}

/**
* Sets the value of the sizeLong property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setSizeLong(Long value) {
this.sizeLong = value;
}

/**
* Gets the value of the type property.
*
Expand Down
87 changes: 34 additions & 53 deletions src/main/java/com/rapidminer/Process.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import java.io.StringReader;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.charset.IllegalCharsetNameException;
import java.nio.charset.UnsupportedCharsetException;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
Expand All @@ -44,6 +42,7 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
import java.util.stream.Collectors;
import javax.swing.event.EventListenerList;

import org.w3c.dom.Document;
Expand Down Expand Up @@ -97,10 +96,10 @@
import com.rapidminer.tools.AbstractObservable;
import com.rapidminer.tools.LogService;
import com.rapidminer.tools.LoggingHandler;
import com.rapidminer.tools.Observable;
import com.rapidminer.tools.Observer;
import com.rapidminer.tools.OperatorService;
import com.rapidminer.tools.ParameterService;
import com.rapidminer.tools.ProcessTools;
import com.rapidminer.tools.ProgressListener;
import com.rapidminer.tools.RandomGenerator;
import com.rapidminer.tools.ResultService;
Expand Down Expand Up @@ -226,11 +225,11 @@ public class Process extends AbstractObservable<Process> implements Cloneable {
/** Indicates whether we are updating meta data. */
private transient DebugMode debugMode = DebugMode.DEBUG_OFF;

private transient final Logger logger = makeLogger();
private final transient Logger logger = makeLogger();

/** @deprecated Use {@link #getLogger()} */
@Deprecated
private transient final LoggingHandler logService = new WrapperLoggingHandler(logger);
private final transient LoggingHandler logService = new WrapperLoggingHandler(logger);

private ProcessContext context = new ProcessContext();

Expand Down Expand Up @@ -535,10 +534,8 @@ public void addDataTable(final DataTable table) {
/** Clears a single data table, i.e. removes all entries. */
public void clearDataTable(final String name) {
DataTable table = getDataTable(name);
if (table != null) {
if (table instanceof SimpleDataTable) {
((SimpleDataTable) table).clear();
}
if (table instanceof SimpleDataTable) {
((SimpleDataTable) table).clear();
}
}

Expand Down Expand Up @@ -652,11 +649,7 @@ public Collection<Operator> getAllOperators() {

/** Returns a Set view of all operator names (i.e. Strings). */
public Collection<String> getAllOperatorNames() {
Collection<String> allNames = new LinkedList<>();
for (Operator o : getAllOperators()) {
allNames.add(o.getName());
}
return allNames;
return getAllOperators().stream().map(Operator::getName).collect(Collectors.toList());
}

/** Sets the operator that is currently being executed. */
Expand Down Expand Up @@ -1088,10 +1081,8 @@ protected void saveResults() throws UserError {
RepositoryLocation location;
try {
location = rootOperator.getProcess().resolveRepositoryLocation(locationStr);
} catch (MalformedRepositoryLocationException e1) {
throw new PortUserError(port, 325, e1.getMessage());
} catch (UserError e1) {
throw new PortUserError(port, 325, e1.getMessage());
} catch (MalformedRepositoryLocationException | UserError e) {
throw new PortUserError(port, 325, e.getMessage());
}
IOObject data = port.getDataOrNull(IOObject.class);
if (data == null) {
Expand Down Expand Up @@ -1476,10 +1467,6 @@ public static Charset getEncoding(String encoding) {
} else {
try {
result = Charset.forName(encoding);
} catch (IllegalCharsetNameException e) {
result = Charset.defaultCharset();
} catch (UnsupportedCharsetException e) {
result = Charset.defaultCharset();
} catch (IllegalArgumentException e) {
result = Charset.defaultCharset();
}
Expand Down Expand Up @@ -1580,23 +1567,9 @@ public void readProcess(final Reader in, final ProgressListener progressListener
* as operator name.
*/
public String registerName(final String name, final Operator operator) {
if (operatorNameMap.get(name) != null) {
String baseName = name;
int index = baseName.indexOf(" (");
if (index >= 0) {
baseName = baseName.substring(0, index);
}
int i = 2;
while (operatorNameMap.get(baseName + " (" + i + ")") != null) {
i++;
}
String newName = baseName + " (" + i + ")";
operatorNameMap.put(newName, operator);
return newName;
} else {
operatorNameMap.put(name, operator);
return name;
}
String newName = ProcessTools.getNewName(operatorNameMap.keySet(), name);
operatorNameMap.put(newName, operator);
return newName;
}

/** This method is used for unregistering a name from the operator name map. */
Expand All @@ -1608,6 +1581,26 @@ public void notifyRenaming(final String oldName, final String newName) {
rootOperator.notifyRenaming(oldName, newName);
}

/**
* This method is called when the operator given by {@code oldName} (and {@code oldOp} if it is not {@code null})
* was replaced with the operator described by {@code newName} and {@code newOp}.
* This will inform the {@link ProcessRootOperator} of the replacing.
*
* @param oldName
* the name of the old operator
* @param oldOp
* the old operator; can be {@code null}
* @param newName
* the name of the new operator
* @param newOp
* the new operator; must not be {@code null}
* @see Operator#notifyReplacing(String, Operator, String, Operator)
* @since 9.3
*/
public void notifyReplacing(String oldName, Operator oldOp, String newName, Operator newOp) {
rootOperator.notifyReplacing(oldName, oldOp, newName, newOp);
}

@Override
public String toString() {
if (rootOperator == null) {
Expand All @@ -1620,20 +1613,8 @@ public String toString() {
private final EventListenerList processSetupListeners = new EventListenerList();

/** Delegates any changes in the ProcessContext to the root operator. */
private final Observer<ProcessContext> delegatingContextObserver = new Observer<ProcessContext>() {

@Override
public void update(final Observable<ProcessContext> observable, final ProcessContext arg) {
fireUpdate();
}
};
private final Observer<Operator> delegatingOperatorObserver = new Observer<Operator>() {

@Override
public void update(final Observable<Operator> observable, final Operator arg) {
fireUpdate();
}
};
private final Observer<ProcessContext> delegatingContextObserver = (observable, arg) -> fireUpdate();
private final Observer<Operator> delegatingOperatorObserver = (observable, arg) -> fireUpdate();

public void addProcessSetupListener(final ProcessSetupListener listener) {
processSetupListeners.add(ProcessSetupListener.class, listener);
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/rapidminer/RapidMiner.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.util.Set;
import java.util.logging.Level;

import com.rapidminer.connection.ConnectionInformationFileUtils;
import com.rapidminer.core.license.ActionStatisticsLicenseManagerListener;
import com.rapidminer.core.license.ProductConstraintManager;
import com.rapidminer.gui.RapidMinerGUI;
Expand Down Expand Up @@ -698,6 +699,10 @@ public static void init(final Product product, final LicenseLocation licenseLoca
performInitialSettings();
ParameterService.init();
ParameterService.setParameterValue(PROPERTY_RAPIDMINER_VERSION, RapidMiner.getLongVersion());
if (getExecutionMode().canAccessFilesystem()) {
ConnectionInformationFileUtils.checkForCacheClearing();
ConnectionInformationFileUtils.initSettings();
}

// initializing networking tools
GlobalAuthenticator.init();
Expand Down
57 changes: 57 additions & 0 deletions src/main/java/com/rapidminer/connection/ConnectionHandler.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* Copyright (C) 2001-2019 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.connection;

import java.util.Collections;
import java.util.Map;

import com.rapidminer.connection.util.GenericHandler;


/**
* An interface for handler/factory for {@link ConnectionInformation ConnectionInformations}. Implementations provide
* the possibility to create new {@link ConnectionInformation ConnectionInformations}. They can be registered using
* {@link ConnectionHandlerRegistry#registerHandler(GenericHandler) ConnectionHandlerRegistry.registerHandler}.
* Additionally implementations can provide a set of additional actions for the connections.
*
* @author Jan Czogalla
* @since 9.3
* @see com.rapidminer.tools.config.ConfigurableConnectionHandler ConfigurableConnectionHandler
*/
public interface ConnectionHandler extends GenericHandler<ConnectionInformation> {

/**
* Creates a new instance of {@link ConnectionInformation} with the given name, this handler's type
* and an implementation dependent id.
*
* @param name
* the name of the new connection; must not be {@code null}
* @see ConnectionInformationBuilder
*/
ConnectionInformation createNewConnectionInformation(String name);

/**
* A map of name or key/runnable pairs, representing additional actions
*
* @return an empty map by default
*/
default Map<String, Runnable> getAdditionalActions() {
return Collections.emptyMap();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* Copyright (C) 2001-2019 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.connection;

import com.rapidminer.connection.util.GenericHandlerRegistry;
import com.rapidminer.connection.util.GenericRegistrationEventListener;
import com.rapidminer.operator.OperatorVersion;


/**
* Registry for {@link ConnectionHandler ConnectionHandlers}. Handlers can be registered and unregistered,
* searched by type and (un)registrations can be observed. See {@link GenericHandlerRegistry} for further details.
*
* @author Jan Czogalla
* @since 9.3
*/
public final class ConnectionHandlerRegistry extends GenericHandlerRegistry<ConnectionHandler> {

public static final OperatorVersion BEFORE_NEW_CONNECTION_MANAGEMENT = new OperatorVersion(9, 2, 1);

private static final ConnectionHandlerRegistry INSTANCE = new ConnectionHandlerRegistry();

/**
* Singleton class, no instantiation allowed except for internal purpose
*/
private ConnectionHandlerRegistry() {
}

/**
* Get the instance of this singleton
*/
public static ConnectionHandlerRegistry getInstance() {
return INSTANCE;
}

@Override
@SuppressWarnings("unchecked")
protected <G extends GenericRegistrationEventListener<ConnectionHandler>, L extends G> Class<G> getListenerClass(L listener) {
return (Class<G>) (listener == null || listener instanceof ConnectionHandlerRegistryListener ?
ConnectionHandlerRegistryListener.class : listener.getClass());
}

@Override
protected String getRegistryType() {
return "connection";
}
}
Loading

0 comments on commit 869802f

Please sign in to comment.