Skip to content

Commit

Permalink
Release RapidMiner 8.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Boeck committed May 8, 2018
1 parent 90f3607 commit 04cee57
Show file tree
Hide file tree
Showing 338 changed files with 12,258 additions and 4,922 deletions.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -7,8 +7,8 @@ This project contains the open source core of [RapidMiner Studio](https://rapidm

## Getting Started

* [Install](https://rapidminer.com/studio) RapidMiner Studio
* Have a look at our [Getting Started](http://docs.rapidminer.com/studio/getting-started/) Videos
* [Install](https://rapidminer.com/products/studio/) RapidMiner Studio
* Have a look at our [Getting Started Central](https://rapidminer.com/getting-started-central/)
* You miss something? There might be an [Extension](https://marketplace.rapidminer.com) for it
* Have questions? Check out our official [community](https://community.rapidminer.com) and [documentation](https://docs.rapidminer.com)

Expand Down Expand Up @@ -95,9 +95,9 @@ class CliLauncher {

## Diving in

* Create your own [Extension](http://docs.rapidminer.com/developers/creating-your-own-extension/)
* [Integrate](http://community.rapidminer.com/t5/Become-a-RapidMiner-Developer/Frequently-Asked-Questions-Development/m-p/19782) RapidMiner Studio Core into your project
* And much more at our [Developer Board](http://community.rapidminer.com/t5/Become-a-RapidMiner-Developer/bd-p/BARDDBoard)
* Create your own [Extension](https://docs.rapidminer.com/latest/developers/creating-your-own-extension/)
* [Integrate](https://community.rapidminer.com/t5/Become-a-RapidMiner-Developer/Frequently-Asked-Questions-Development/m-p/19782) RapidMiner Studio Core into your project
* And much more at our [Developer Board](https://community.rapidminer.com/t5/Become-a-RapidMiner-Developer/bd-p/BARDDBoard)

## License

Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Expand Up @@ -20,11 +20,11 @@ repositories {
dependencies {

// OS X adapter to add platform specific UI
compile 'com.rapidminer.studio:rapidminer-studio-osx-adapter:1.0.1'
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.0'
compile('com.rapidminer.license:rapidminer-license-commons:4.0.0'){
compile 'com.rapidminer.license:rapidminer-license-api:4.0.2'
compile('com.rapidminer.license:rapidminer-license-commons:4.0.2'){
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}
Expand All @@ -36,7 +36,7 @@ dependencies {
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.1'
compile 'com.rapidminer.external:vldocking:1.2.2'

// Freehep for vector graphic export (http://java.freehep.org/)
compile('org.freehep:freehep-graphicsio-ps:2.3') {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
@@ -1,2 +1,2 @@
version=8.1.0
version=8.2.0
group=com.rapidminer.studio
21 changes: 14 additions & 7 deletions src/main/java/com/rapidminer/FileProcessLocation.java
Expand Up @@ -18,13 +18,6 @@
*/
package com.rapidminer;

import com.rapidminer.io.process.XMLImporter;
import com.rapidminer.io.process.XMLTools;
import com.rapidminer.tools.LogService;
import com.rapidminer.tools.ProgressListener;
import com.rapidminer.tools.Tools;
import com.rapidminer.tools.XMLException;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
Expand All @@ -35,13 +28,22 @@

import org.w3c.dom.Document;

import com.rapidminer.io.process.XMLImporter;
import com.rapidminer.io.process.XMLTools;
import com.rapidminer.tools.LogService;
import com.rapidminer.tools.ProgressListener;
import com.rapidminer.tools.Tools;
import com.rapidminer.tools.XMLException;


/**
*
* @author Simon Fischer
*/
public class FileProcessLocation implements ProcessLocation {

private static final String FILE_PROCESS_ICON = "hard_drive.png";

private final File file;

public FileProcessLocation(File file) {
Expand Down Expand Up @@ -129,4 +131,9 @@ public String toString() {
public String getShortName() {
return file.getName();
}

@Override
public String getIconName() {
return FILE_PROCESS_ICON;
}
}
37 changes: 21 additions & 16 deletions src/main/java/com/rapidminer/Process.java
Expand Up @@ -37,6 +37,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.FileHandler;
import java.util.logging.Handler;
import java.util.logging.Level;
Expand Down Expand Up @@ -175,7 +176,7 @@ public class Process extends AbstractObservable<Process> implements Cloneable {
private final List<BreakpointListener> breakpointListeners = Collections.synchronizedList(new LinkedList<>());

/** The list of filters called between each operator */
private final List<ProcessFlowFilter> processFlowFilters = Collections.synchronizedList(new LinkedList<>());
private final CopyOnWriteArrayList<ProcessFlowFilter> processFlowFilters = new CopyOnWriteArrayList<>();

/** The listeners for logging (data tables). */
private final List<LoggingListener> loggingListeners = Collections.synchronizedList(new LinkedList<>());
Expand Down Expand Up @@ -307,9 +308,10 @@ public Process(final InputStream in) throws IOException, XMLException {
/** Reads an process configuration from the given URL. */
public Process(final URL url) throws IOException, XMLException {
initContext();
Reader in = new InputStreamReader(WebServiceTools.openStreamFromURL(url), getEncoding(null));
readProcess(in);
in.close();
try (Reader in = new InputStreamReader(WebServiceTools.openStreamFromURL(url), getEncoding(null))) {
readProcess(in);
}

}

protected Logger makeLogger() {
Expand Down Expand Up @@ -730,9 +732,7 @@ public void addProcessFlowFilter(ProcessFlowFilter filter) {
if (filter == null) {
throw new IllegalArgumentException("filter must not be null!");
}
if (!processFlowFilters.contains(filter)) {
processFlowFilters.add(filter);
}
processFlowFilters.addIfAbsent(filter);
}

/**
Expand Down Expand Up @@ -768,9 +768,13 @@ public void fireProcessFlowBeforeOperator(Operator previousOperator, Operator ne
if (input == null) {
input = Collections.emptyList();
}
synchronized (processFlowFilters) {
for (ProcessFlowFilter filter : processFlowFilters) {
for (ProcessFlowFilter filter : processFlowFilters) {
try {
filter.preOperator(previousOperator, nextOperator, input);
} catch (OperatorException oe) {
throw oe;
} catch (Exception e) {
getLogger().log(Level.WARNING, "com.rapidminer.Process.process_flow_filter_failed", e);
}
}
}
Expand All @@ -796,9 +800,13 @@ public void fireProcessFlowAfterOperator(Operator previousOperator, Operator nex
if (output == null) {
output = Collections.emptyList();
}
synchronized (processFlowFilters) {
for (ProcessFlowFilter filter : processFlowFilters) {
for (ProcessFlowFilter filter : processFlowFilters) {
try {
filter.postOperator(previousOperator, nextOperator, output);
} catch (OperatorException oe) {
throw oe;
} catch (Exception e) {
getLogger().log(Level.WARNING, "com.rapidminer.Process.process_flow_filter_failed", e);
}
}
}
Expand All @@ -815,11 +823,8 @@ public void copyProcessFlowListenersToOtherProcess(Process otherProcess) {
if (otherProcess == null) {
throw new IllegalArgumentException("otherProcess must not be null!");
}

synchronized (processFlowFilters) {
for (ProcessFlowFilter filter : processFlowFilters) {
otherProcess.addProcessFlowFilter(filter);
}
for (ProcessFlowFilter filter : processFlowFilters) {
otherProcess.addProcessFlowFilter(filter);
}
}

Expand Down
26 changes: 17 additions & 9 deletions src/main/java/com/rapidminer/ProcessLocation.java
Expand Up @@ -18,11 +18,11 @@
*/
package com.rapidminer;

import java.io.IOException;

import com.rapidminer.tools.ProgressListener;
import com.rapidminer.tools.XMLException;

import java.io.IOException;


/**
* A place where a process can be saved. Basically, this is either a file or a location in a
Expand All @@ -33,27 +33,35 @@
public interface ProcessLocation {

/** Reads the process and returns it. */
public Process load(ProgressListener listener) throws IOException, XMLException;
Process load(ProgressListener listener) throws IOException, XMLException;

/** Stores the process at the referenced location. */
public void store(Process process, ProgressListener listener) throws IOException;
void store(Process process, ProgressListener listener) throws IOException;

/** The toString representation is used, e.g. in the welcome screen dialog, */
@Override
public String toString();
String toString();

/**
* Reads the contents of the referenced resource and returns the XML without parsing it. Used if
* process file is broken.
*/
public String getRawXML() throws IOException;
String getRawXML() throws IOException;

/** Returns a string saved to the history file. */
public String toHistoryFileString();
String toHistoryFileString();

/** Returns a string as it is displayed in the recent files menu. */
public String toMenuString();
String toMenuString();

/** Returns a short name, e.g. the last component of the path. */
public String getShortName();
String getShortName();

/**
* The icon name without size modifier that visualizes where this process is stored, e.g. RM Server repo, local repo, Cloud, ...
*
* @return the name of the icon to visualize the origin of this recent process
* @since 8.2
*/
String getIconName();
}
16 changes: 15 additions & 1 deletion src/main/java/com/rapidminer/RepositoryProcessLocation.java
Expand Up @@ -31,6 +31,7 @@
import com.rapidminer.repository.internal.remote.RemoteContentManager;
import com.rapidminer.repository.internal.remote.RemoteProcessEntry;
import com.rapidminer.repository.internal.remote.RemoteRepository;
import com.rapidminer.tools.I18N;
import com.rapidminer.tools.LogService;
import com.rapidminer.tools.PasswordInputCanceledException;
import com.rapidminer.tools.ProgressListener;
Expand All @@ -48,8 +49,8 @@ public class RepositoryProcessLocation implements ProcessLocation {
/** A simple {@link UserData} object to pass {@link Boolean} values */
public static class SimpleBooleanUserData implements UserData<Object> {

private boolean value;

private boolean value;
public SimpleBooleanUserData(boolean value) {
this.value = value;
}
Expand All @@ -63,8 +64,11 @@ public boolean isSet() {
return value;
}


}

private static final String GENERIC_PROCESS_ICON = I18N.getGUILabel("getting_started.open_recent.icon");

private final RepositoryLocation repositoryLocation;

public RepositoryProcessLocation(RepositoryLocation location) {
Expand Down Expand Up @@ -194,4 +198,14 @@ public int hashCode() {
public String getShortName() {
return repositoryLocation.getName();
}

@Override
public String getIconName() {
try {
return getRepositoryLocation().getRepository().getIconName();
} catch (Exception e) {
// can happen if a repository was removed, do not log anything in those cases
return GENERIC_PROCESS_ICON;
}
}
}
61 changes: 61 additions & 0 deletions src/main/java/com/rapidminer/example/AttributeError.java
@@ -0,0 +1,61 @@
/**
* 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.example;

import java.io.Serializable;

import com.rapidminer.operator.OperatorException;
import com.rapidminer.operator.UserError;


/**
* POJO to capture the information on an attribute related runtime exception. Can create an {@link OperatorException}
* from the captured information.
*
* @author Jan Czogalla
* @since 8.2
*/
class AttributeError implements Serializable {

String baseKey;
String name;
boolean isRole;
boolean isUserError;

/**
* Creates an {@link OperatorException} and associated the specified stacktrace with it. Can differentiate between
* {@link UserError} and {@link OperatorException}.
*
* @param stackTrace
* the stacktrace to be attached to the returned excpetion
* @return an operator exception or user error
*/
OperatorException toOperatorException(StackTraceElement[] stackTrace) {
String actualKey = baseKey + (isRole ? "_role" : "");
OperatorException exception;
if (isUserError) {
exception = new UserError(null, actualKey, name);
} else {
exception = new OperatorException(actualKey, null, name);
}
exception.setStackTrace(stackTrace);
return exception;
}
}
13 changes: 7 additions & 6 deletions src/main/java/com/rapidminer/example/Attributes.java
Expand Up @@ -272,19 +272,20 @@ public interface Attributes extends Iterable<Attribute>, Cloneable, Serializable

/**
* Finds the {@link AttributeRole} belonging to the attribute with the given name (both regular
* and special). If the search is performed case sensitive depends on the boolean parameter.
* Attention: Case insensitive search is not optimized and takes linear time with number of
* attributes.
* and special). Whether the search is performed case sensitive depends on the boolean parameter.
* <p>
* <strong>Attention</strong>: Case insensitive search is not optimized and takes linear time with number of attributes.
*/
public AttributeRole findRoleByName(String name, boolean caseSensitive);

/** Finds the {@link AttributeRole} with the given special name (both regular and special). */
public AttributeRole findRoleBySpecialName(String specialName);

/**
* Finds the {@link AttributeRole} with the given special name (both regular and special). If
* the search is performed case sensitive depends on the boolean parameter. Attention: Case
* insensitive search is not optimized and takes linear time with number of attributes.
* Finds the {@link AttributeRole} with the given special name (both regular and special). Whether
* the search is performed case sensitive depends on the boolean parameter.
* <p>
* <strong>Attention</strong>: Case insensitive search is not optimized and takes linear time with number of attributes.
*/
public AttributeRole findRoleBySpecialName(String specialName, boolean caseSensitive);

Expand Down

0 comments on commit 04cee57

Please sign in to comment.