本文整理汇总了Java中com.rapidminer.operator.ports.OutputPorts.getAllPorts方法的典型用法代码示例。如果您正苦于以下问题:Java OutputPorts.getAllPorts方法的具体用法?Java OutputPorts.getAllPorts怎么用?Java OutputPorts.getAllPorts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rapidminer.operator.ports.OutputPorts
的用法示例。
在下文中一共展示了OutputPorts.getAllPorts方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: exportConnections
import com.rapidminer.operator.ports.OutputPorts; //导入方法依赖的package包/类
private void exportConnections(OutputPorts outputPorts, ExecutionUnit processInScope, Element insertInto, Document doc) {
for (OutputPort outputPort : outputPorts.getAllPorts()) {
if (outputPort.isConnected()) {
Element portElement = doc.createElement("connect");
if (processInScope.getEnclosingOperator() != outputPorts.getOwner().getOperator()) {
portElement.setAttribute("from_op", outputPorts.getOwner().getOperator().getName());
}
portElement.setAttribute("from_port", outputPort.getName());
InputPort destination = outputPort.getDestination();
if (processInScope.getEnclosingOperator() != destination.getPorts().getOwner().getOperator()) {
portElement.setAttribute("to_op", destination.getPorts().getOwner().getOperator().getName());
}
portElement.setAttribute("to_port", destination.getName());
insertInto.appendChild(portElement);
}
}
}
示例2: exportConnections
import com.rapidminer.operator.ports.OutputPorts; //导入方法依赖的package包/类
private void exportConnections(OutputPorts outputPorts, ExecutionUnit processInScope, Element insertInto, Document doc) {
for (OutputPort outputPort : outputPorts.getAllPorts()) {
if (outputPort.isConnected()) {
Element portElement = doc.createElement("connect");
if (processInScope.getEnclosingOperator() != outputPorts.getOwner().getOperator()) {
portElement.setAttribute("from_op", outputPorts.getOwner().getOperator().getName());
}
portElement.setAttribute("from_port", outputPort.getName());
InputPort destination = outputPort.getDestination();
if (processInScope.getEnclosingOperator() != destination.getPorts().getOwner().getOperator()) {
portElement.setAttribute("to_op", destination.getPorts().getOwner().getOperator().getName());
}
portElement.setAttribute("to_port", destination.getName());
insertInto.appendChild(portElement);
}
}
}
示例3: exportConnections
import com.rapidminer.operator.ports.OutputPorts; //导入方法依赖的package包/类
private List<ConnectMsg> exportConnections(OutputPorts outputPorts, ExecutionUnit processInScope){
List<ConnectMsg> connects = new ArrayList<>();
for (OutputPort outputPort : outputPorts.getAllPorts()) {
if (outputPort.isConnected()) {
ConnectMsg connect = new ConnectMsg();
if (processInScope.getEnclosingOperator() != outputPorts.getOwner().getOperator()) {
connect.setFromOp(outputPorts.getOwner().getOperator().getName());
}
connect.setFromPort(outputPort.getName());
InputPort destination = outputPort.getDestination();
if (processInScope.getEnclosingOperator() != destination.getPorts().getOwner().getOperator()) {
connect.setToOp(destination.getPorts().getOwner().getOperator().getName());
}
connect.setToPort(destination.getName());
connects.add(connect);
}
}
return connects;
}
示例4: exportConnections
import com.rapidminer.operator.ports.OutputPorts; //导入方法依赖的package包/类
private void exportConnections(OutputPorts outputPorts, ExecutionUnit processInScope, Element insertInto, Document doc) {
for (OutputPort outputPort : outputPorts.getAllPorts()) {
if (outputPort.isConnected()) {
Element portElement = doc.createElement("connect");
if (processInScope.getEnclosingOperator() != outputPorts.getOwner().getOperator()) {
portElement.setAttribute("from_op", outputPorts.getOwner().getOperator().getName());
}
portElement.setAttribute("from_port", outputPort.getName());
InputPort destination = outputPort.getDestination();
if (processInScope.getEnclosingOperator() != destination.getPorts().getOwner().getOperator()) {
portElement.setAttribute("to_op", destination.getPorts().getOwner().getOperator().getName());
}
portElement.setAttribute("to_port", destination.getName());
insertInto.appendChild(portElement);
}
}
}
示例5: cloneConnections
import com.rapidminer.operator.ports.OutputPorts; //导入方法依赖的package包/类
private void cloneConnections(OutputPorts originalPorts,
Map<String, Operator> originalOperatorsByName,
Map<String, Operator> clonedOperatorsByName) {
for (OutputPort originalSource : originalPorts.getAllPorts()) {
if (originalSource.isConnected()) {
OutputPort mySource;
Operator mySourceOperator = clonedOperatorsByName.get(originalSource.getPorts().getOwner().getOperator().getName());
if (mySourceOperator == null) {
continue;
}
mySource = mySourceOperator.getOutputPorts().getPortByName(originalSource.getName());
if (mySource == null) {
throw new RuntimeException("Error during clone: Corresponding source for " + originalSource + " not found (no such output port).");
}
InputPort originalDestination = originalSource.getDestination();
InputPort myDestination;
Operator myDestOperator = clonedOperatorsByName.get(originalDestination.getPorts().getOwner().getOperator().getName());
if (myDestOperator == null) {
continue;
}
myDestination = myDestOperator.getInputPorts().getPortByName(originalDestination.getName());
if (myDestination == null) {
throw new RuntimeException("Error during clone: Corresponding destination for " + originalDestination + " not found (no such input port).");
}
mySource.connectTo(myDestination);
}
}
}
示例6: OneToManyPassThroughRule
import com.rapidminer.operator.ports.OutputPorts; //导入方法依赖的package包/类
public OneToManyPassThroughRule(InputPort inputPort, OutputPorts outputPorts) {
this(inputPort, outputPorts.getAllPorts());
}