本文整理汇总了Java中com.rapidminer.operator.OperatorVersion.getLatestVersion方法的典型用法代码示例。如果您正苦于以下问题:Java OperatorVersion.getLatestVersion方法的具体用法?Java OperatorVersion.getLatestVersion怎么用?Java OperatorVersion.getLatestVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rapidminer.operator.OperatorVersion
的用法示例。
在下文中一共展示了OperatorVersion.getLatestVersion方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setOperator
import com.rapidminer.operator.OperatorVersion; //导入方法依赖的package包/类
protected void setOperator(Operator operator) {
this.operator = operator;
this.versions = new LinkedList<>(Arrays.asList(operator.getIncompatibleVersionChanges()));
OperatorVersion latest = OperatorVersion.getLatestVersion(operator.getOperatorDescription());
if (!versions.contains(latest)) {
versions.add(latest);
}
// sort list to have a ascending order
Collections.sort(versions);
setValue(operator.getCompatibilityLevel());
}
示例2: exportOperator
import com.rapidminer.operator.OperatorVersion; //导入方法依赖的package包/类
private Element exportOperator(Operator operator, boolean hideDefault, Document doc) {
Element opElement = doc.createElement("operator");
opElement.setAttribute("name", operator.getName());
opElement.setAttribute("class", operator.getOperatorDescription().getKey());
OperatorVersion opVersion = operator.getCompatibilityLevel();
if (opVersion == null) {
opVersion = OperatorVersion.getLatestVersion(operator.getOperatorDescription());
}
StringBuilder breakpointString = new StringBuilder();
boolean first = true;
for (int i = 0; i < BreakpointListener.BREAKPOINT_POS_NAME.length; i++) {
if (operator.hasBreakpoint(i)) {
if (first) {
first = false;
} else {
breakpointString.append(",");
}
breakpointString.append(BreakpointListener.BREAKPOINT_POS_NAME[i]);
}
}
appendXML(operator.getParameters(), opElement, hideDefault, doc);
if (operator instanceof OperatorChain) {
OperatorChain nop = (OperatorChain) operator;
for (ExecutionUnit executionUnit : nop.getSubprocesses()) {
opElement.appendChild(exportExecutionUnit(executionUnit, hideDefault, doc, false));
}
}
return opElement;
}
示例3: setOperator
import com.rapidminer.operator.OperatorVersion; //导入方法依赖的package包/类
protected void setOperator(Operator operator) {
this.operator = operator;
this.versions = new LinkedList<OperatorVersion>(Arrays.asList(operator.getIncompatibleVersionChanges()));
OperatorVersion latest = OperatorVersion.getLatestVersion(operator.getOperatorDescription());
if (!versions.contains(latest)) {
versions.add(latest);
}
// this.index = versions.indexOf(operator.getCompatibilityLevel());
// fireStateChanged();
setValue(operator.getCompatibilityLevel());
}
示例4: exportOperator
import com.rapidminer.operator.OperatorVersion; //导入方法依赖的package包/类
private Element exportOperator(Operator operator, boolean hideDefault, Document doc) {
Element opElement = doc.createElement("operator");
opElement.setAttribute("name", operator.getName());
opElement.setAttribute("class", operator.getOperatorDescription().getKey());
OperatorVersion opVersion = operator.getCompatibilityLevel();
if (opVersion == null) {
opVersion = OperatorVersion.getLatestVersion(operator.getOperatorDescription());
}
opElement.setAttribute("compatibility", opVersion.toString());
StringBuilder breakpointString = new StringBuilder();
boolean first = true;
for (int i = 0; i < BreakpointListener.BREAKPOINT_POS_NAME.length; i++) {
if (operator.hasBreakpoint(i)) {
if (first) {
first = false;
} else {
breakpointString.append(",");
}
breakpointString.append(BreakpointListener.BREAKPOINT_POS_NAME[i]);
}
}
if (!first) {
opElement.setAttribute("breakpoints", breakpointString.toString());
}
opElement.setAttribute("expanded", operator.isExpanded() ? "true" : "false");
opElement.setAttribute("activated", operator.isEnabled() ? "true" : "false");
operator.getParameters().appendXML(opElement, hideDefault, doc);
if (operator instanceof OperatorChain) {
OperatorChain nop = (OperatorChain) operator;
for (ExecutionUnit executionUnit : nop.getSubprocesses()) {
opElement.appendChild(exportExecutionUnit(executionUnit, hideDefault, doc, false));
}
}
if (!onlyCoreElements) {
ProcessXMLFilterRegistry.fireOperatorExported(operator, opElement);
}
return opElement;
}
示例5: exportOperator
import com.rapidminer.operator.OperatorVersion; //导入方法依赖的package包/类
private Element exportOperator(Operator operator, boolean hideDefault, Document doc) {
Element opElement = doc.createElement("operator");
opElement.setAttribute("name", operator.getName());
opElement.setAttribute("class", operator.getOperatorDescription().getKey());
OperatorVersion opVersion = operator.getCompatibilityLevel();
if (opVersion == null) {
opVersion = OperatorVersion.getLatestVersion(operator.getOperatorDescription());
}
opElement.setAttribute("compatibility", opVersion.toString());
StringBuilder breakpointString = new StringBuilder();
boolean first = true;
for (int i = 0; i < BreakpointListener.BREAKPOINT_POS_NAME.length; i++) {
if (operator.hasBreakpoint(i)) {
if (first) {
first = false;
} else {
breakpointString.append(",");
}
breakpointString.append(BreakpointListener.BREAKPOINT_POS_NAME[i]);
}
}
if (!first) {
opElement.setAttribute("breakpoints", breakpointString.toString());
}
opElement.setAttribute("expanded", operator.isExpanded() ? "true" : "false");
opElement.setAttribute("activated", operator.isEnabled() ? "true" : "false");
String description = operator.getUserDescription();
if (description != null && description.length() > 0) {
Element descrElem = doc.createElement("description");
descrElem.appendChild(doc.createTextNode(description));
opElement.appendChild(descrElem);
}
operator.getParameters().appendXML(opElement, hideDefault, doc);
if (operator instanceof OperatorChain) {
OperatorChain nop = (OperatorChain) operator;
for (ExecutionUnit executionUnit : nop.getSubprocesses()) {
opElement.appendChild(exportExecutionUnit(executionUnit, hideDefault, doc, false));
}
}
if (!onlyCoreElements) {
ProcessXMLFilterRegistry.fireOperatorExported(operator, opElement);
}
// if (RapidMiner.getExecutionMode().hasMainFrame()) {
// if (RapidMinerGUI.getMainFrame() != null) {
// RapidMinerGUI.getMainFrame().getProcessPanel().getProcessRenderer().enrichOperatorElement(operator, opElement);
// }
// }
return opElement;
}