Skip to content

Commit

Permalink
Release RapidMiner 7.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Wilms-Pfau committed Jun 29, 2017
1 parent ca3a8df commit 0e6dafd
Show file tree
Hide file tree
Showing 53 changed files with 1,993 additions and 1,615 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=7.5.1
version=7.5.3
group=com.rapidminer.studio
18 changes: 11 additions & 7 deletions src/main/java/com/rapidminer/core/license/OpenSourceLicense.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/**
* Copyright (C) 2001-2017 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.util.Arrays;
Expand Down Expand Up @@ -70,7 +70,11 @@ public LicenseUser getLicenseUser() {

@Override
public Constraints getConstraints() {
return new DefaultConstraints();
DefaultConstraints defaultConstraints = new DefaultConstraints();
defaultConstraints.addConstraint(LicenseConstants.LOGICAL_PROCESSOR_CONSTRAINT,
StudioLicenseConstants.FREE_LOGICAL_PROCESSORS);
defaultConstraints.addConstraint(LicenseConstants.DATA_ROW_CONSTRAINT, StudioLicenseConstants.FREE_DATA_ROWS);
return defaultConstraints;
}

@Override
Expand Down
28 changes: 13 additions & 15 deletions src/main/java/com/rapidminer/example/NominalStatistics.java
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
/**
* Copyright (C) 2001-2017 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 com.rapidminer.tools.LogService;

import java.util.Arrays;
import java.util.logging.Level;

import com.rapidminer.tools.LogService;


/**
* Attribute statistics object for nominal attributes.
*
*
* @author Ingo Mierswa
*/
public class NominalStatistics implements Statistics {
Expand All @@ -46,10 +46,7 @@ private NominalStatistics(NominalStatistics other) {
this.mode = other.mode;
this.maxCounter = other.maxCounter;
if (other.scores != null) {
this.scores = new long[other.scores.length];
for (int i = 0; i < this.scores.length; i++) {
this.scores[i] = other.scores[i];
}
this.scores = Arrays.copyOf(other.scores, other.scores.length);
}
}

Expand Down Expand Up @@ -99,7 +96,8 @@ public double getStatistics(Attribute attribute, String name, String parameter)
if (parameter != null) {
return getValueCount(attribute, parameter);
} else {
// LogService.getGlobal().log("Cannot calculate statistics COUNT for attribute "+attribute.getName()+": no value given...",
// LogService.getGlobal().log("Cannot calculate statistics COUNT for attribute
// "+attribute.getName()+": no value given...",
// LogService.WARNING);
LogService.getRoot().log(Level.WARNING,
"com.rapidminer.example.NominalStatistics.calculating_statistics_count_for_attribute_error",
Expand Down Expand Up @@ -127,7 +125,7 @@ public double getStatistics(Attribute attribute, String name, String parameter)
}

private long getValueCount(Attribute attribute, String value) {
if ((attribute != null) && (attribute.getMapping() != null)) {
if (attribute != null && attribute.getMapping() != null) {
int index = attribute.getMapping().getIndex(value);
if (index < 0) {
return -1;
Expand Down
40 changes: 18 additions & 22 deletions src/main/java/com/rapidminer/example/set/AbstractExampleSet.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/**
* Copyright (C) 2001-2017 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.set;

import java.io.File;
Expand Down Expand Up @@ -279,7 +279,7 @@ public void writeSparseAttributeFile(File attFile, File dataFile, int format, Ch

// special attributes
AttributeRole labelRole = getAttributes().getRole(Attributes.LABEL_NAME);
if ((labelRole != null) && (format != SparseFormatDataRowReader.FORMAT_NO_LABEL)) {
if (labelRole != null && format != SparseFormatDataRowReader.FORMAT_NO_LABEL) {
root.appendChild(writeAttributeMetaData(labelRole, 0, document, true));
}
AttributeRole idRole = getAttributes().getRole(Attributes.ID_NAME);
Expand Down Expand Up @@ -320,7 +320,8 @@ private Element writeAttributeMetaData(AttributeRole attributeRole, int sourceco
}

/** Writes the data of this attribute in the given stream. */
private Element writeAttributeMetaData(String tag, Attribute attribute, int sourcecol, Document document, boolean sparse) {
private Element writeAttributeMetaData(String tag, Attribute attribute, int sourcecol, Document document,
boolean sparse) {
Element attributeElement = document.createElement(tag);
attributeElement.setAttribute("name", attribute.getName());
if (!sparse || tag.equals("attribute")) {
Expand All @@ -332,8 +333,8 @@ private Element writeAttributeMetaData(String tag, Attribute attribute, int sour
}

// nominal values
if ((Ontology.ATTRIBUTE_VALUE_TYPE.isA(attribute.getValueType(), Ontology.NOMINAL))
&& (!tag.equals(Attributes.KNOWN_ATTRIBUTE_TYPES[Attributes.TYPE_ID]))) {
if (Ontology.ATTRIBUTE_VALUE_TYPE.isA(attribute.getValueType(), Ontology.NOMINAL)
&& !tag.equals(Attributes.KNOWN_ATTRIBUTE_TYPES[Attributes.TYPE_ID])) {
for (String nominalValue : attribute.getMapping().getValues()) {
Element valueElement = document.createElement("value");
valueElement.setTextContent(nominalValue);
Expand Down Expand Up @@ -465,7 +466,7 @@ public void recalculateAttributeStatistics(Attribute attribute) {
* <p>
* The statistics calculation is stopped by {@link Thread#interrupt()}.
*/
private void recalculateAttributeStatistics(List<Attribute> attributeList) {
private synchronized void recalculateAttributeStatistics(List<Attribute> attributeList) {
// do nothing if not desired
if (attributeList.size() == 0) {
return;
Expand All @@ -478,7 +479,7 @@ private void recalculateAttributeStatistics(List<Attribute> attributeList) {
if (weightAttribute != null && !weightAttribute.isNumerical()) {
weightAttribute = null;
}

for (Attribute attribute : attributeList) {
if (weightAttribute == null) {
for (Example example : this) {
Expand All @@ -501,21 +502,16 @@ private void recalculateAttributeStatistics(List<Attribute> attributeList) {

// store cloned statistics
for (Attribute attribute : attributeList) {
List<Statistics> statisticsList = statisticsMap.get(attribute.getName());
// no stats known for this attribute at all --> new list
if (statisticsList == null) {
statisticsList = new LinkedList<Statistics>();
statisticsMap.put(attribute.getName(), statisticsList);
}

// in all cases: clear the list before adding new stats (clone of the calculations)
statisticsList.clear();
// do not directly work on the existing List because that might force a
// ConcurrentModification and the well known Exception
List<Statistics> tmpStatisticsList = new LinkedList<>();

Iterator<Statistics> stats = attribute.getAllStatistics();
while (stats.hasNext()) {
Statistics statistics = (Statistics) stats.next().clone();
statisticsList.add(statistics);
tmpStatisticsList.add(statistics);
}
statisticsMap.put(attribute.getName(), tmpStatisticsList);
if (Thread.currentThread().isInterrupted()) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/rapidminer/gui/GUIInputHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public String inputPassword(String messageText) {
final JPasswordField passwordField = new JPasswordField();
JOptionPane jop = new JOptionPane(new Object[] { messageText, passwordField }, JOptionPane.QUESTION_MESSAGE,
JOptionPane.OK_CANCEL_OPTION);
JDialog dialog = jop.createDialog("Auhtentication required");
JDialog dialog = jop.createDialog("Authentication required");
dialog.addComponentListener(new ComponentAdapter() {

@Override
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/rapidminer/gui/RapidMinerGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
import com.rapidminer.studio.io.data.internal.file.csv.CSVDataSourceFactory;
import com.rapidminer.studio.io.data.internal.file.excel.ExcelDataSourceFactory;
import com.rapidminer.tools.FileSystemService;
import com.rapidminer.tools.FontTools;
import com.rapidminer.tools.I18N;
import com.rapidminer.tools.LaunchListener;
import com.rapidminer.tools.LaunchListener.RemoteControlHandler;
Expand Down Expand Up @@ -152,6 +153,7 @@ public class RapidMinerGUI extends RapidMiner {
public static final String PROPERTY_DISCONNECT_ON_DISABLE = "rapidminer.gui.disconnect_on_disable";
/** determines if a warning notification bubble is shown when no result ports are connected */
public static final String PROPERTY_SHOW_NO_RESULT_WARNING = "rapidminer.gui.no_result_port_connected";
public static final String PROPERTY_FONT_CONFIG = "rapidminer.gui.font_config";

public static final String PROPERTY_TRANSFER_USAGESTATS = "rapidminer.gui.transfer_usagestats";
public static final String[] PROPERTY_TRANSFER_USAGESTATS_ANSWERS = { "ask", "always", "never" };
Expand Down Expand Up @@ -193,6 +195,8 @@ public class RapidMinerGUI extends RapidMiner {
RapidMiner.registerParameter(new ParameterTypeBoolean(PROPERTY_FETCH_DATA_BASE_TABLES_NAMES, "", true));
RapidMiner.registerParameter(new ParameterTypeBoolean(PROPERTY_DISCONNECT_ON_DISABLE, "", true));
RapidMiner.registerParameter(new ParameterTypeBoolean(PROPERTY_SHOW_NO_RESULT_WARNING, "", true));
RapidMiner.registerParameter(new ParameterTypeCategory(RapidMinerGUI.PROPERTY_FONT_CONFIG, "",
FontTools.getAvailableFonts(), FontTools.OPTION_INDEX_STANDARD_FONTS));
RapidMiner.registerParameter(new ParameterTypeCategory(PROPERTY_TRANSFER_USAGESTATS, "",
RapidMinerGUI.PROPERTY_TRANSFER_USAGESTATS_ANSWERS, UsageStatsTransmissionDialog.ALWAYS));
RapidMiner.registerParameter(new ParameterTypeCategory(PROPERTY_DRAG_TARGET_HIGHLIGHTING, "",
Expand Down Expand Up @@ -342,8 +346,10 @@ public synchronized void run(final String openLocation) throws Exception {

RapidMiner.splashMessage("workspace");
RapidMiner.splashMessage("plaf");

setupToolTipManager();
setupGUI();
FontTools.checkAndSetFallbackUIFont();

// check whether current EULA has been accepted
if (!EULADialog.getEULAAccepted()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
/**
* Copyright (C) 2001-2017 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.gui.actions.export;

import com.rapidminer.core.license.ProductConstraintManager;
import com.rapidminer.gui.license.LicenseTools;
import com.rapidminer.gui.tools.PrintingTools;

import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
Expand All @@ -30,11 +26,16 @@
import java.awt.print.Pageable;
import java.awt.print.Printable;

import com.rapidminer.core.license.ProductConstraintManager;
import com.rapidminer.gui.license.LicenseTools;
import com.rapidminer.gui.tools.PrintingTools;
import com.rapidminer.tools.FontTools;


/**
* A Printable and Pageable that can print an arbitrary number of components. It scales and
* translates each page such that one component is visible per page.
*
*
* @author Simon Fischer, Ingo Mierswa, Nils Woehler
*/
public class ComponentPrinter implements Printable, Pageable {
Expand All @@ -43,7 +44,7 @@ public class ComponentPrinter implements Printable, Pageable {

private PageFormat pageFormat = PrintingTools.getPrinterJob().defaultPage();

public static final Font TITLE_FONT = new Font("LucidaSans", Font.PLAIN, 9);
public static final Font TITLE_FONT = FontTools.getFont("LucidaSans", Font.PLAIN, 9);

/** The given components that should be printed. */
public ComponentPrinter(PrintableComponent... components) {
Expand All @@ -57,7 +58,7 @@ public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
}

/**
*
*
* @param g
* the graphics object
* @param pageFormat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/**
* Copyright (C) 2001-2017 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.gui.animation;

import java.awt.BasicStroke;
Expand All @@ -28,6 +28,8 @@
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;

import com.rapidminer.tools.FontTools;


/**
* {@link Animation} that displays the progress of a {@link ProgressProvider}. If the progress is 0
Expand Down Expand Up @@ -63,7 +65,7 @@ public class ProgressAnimation implements Animation {
private static final Color ANIMATION_COLOR = IndeterminateAnimation.SPINNER_COLORS[0];

/** the default font for the text inside the arc */
private static final Font DEFAULT_FONT = new Font(Font.SANS_SERIF, Font.BOLD, 17);
private static final Font DEFAULT_FONT = FontTools.getFont(Font.SANS_SERIF, Font.BOLD, 17);

/** the font with the maximal size such that it fits into the arc */
private static Font platformSpecificFont;
Expand Down

0 comments on commit 0e6dafd

Please sign in to comment.