com.rapidminer.operator.ports.impl
Class OutputPortImpl

java.lang.Object
  extended by com.rapidminer.tools.AbstractObservable<Port>
      extended by com.rapidminer.operator.ports.impl.AbstractPort
          extended by com.rapidminer.operator.ports.impl.OutputPortImpl
All Implemented Interfaces:
OutputPort, Port, Observable<Port>

public class OutputPortImpl
extends AbstractPort
implements OutputPort

Author:
Simon Fischer

Field Summary
 
Fields inherited from interface com.rapidminer.operator.ports.Port
CLEAR_ALL, CLEAR_ALL_ERRORS, CLEAR_ALL_METADATA, CLEAR_DATA, CLEAR_META_DATA_ERRORS, CLEAR_METADATA, CLEAR_REAL_METADATA, CLEAR_SIMPLE_ERRORS
 
Constructor Summary
protected OutputPortImpl(Ports<? extends Port> owner, java.lang.String name, boolean simulatesStack)
          Use the factory method OutputPorts#createPort() to create OutputPorts.
 
Method Summary
 void clear(int clearFlags)
          Clears data, meta data and errors at this port.
 void connectTo(InputPort inputPort)
          Connects to an input port.
 void deliver(IOObject object)
          Delivers an object to the connected InputPort or ignores it if the output port is not connected.
 void deliverMD(MetaData md)
          Does the same as #deliver(Object) except that only meta data is delivered.
 void disconnect()
          Disconnects the OutputPort from its InputPort.
 java.lang.String getDescription()
          Returns a human readable description of the ports pre/ and postconditions.
 InputPort getDestination()
          Returns the destination input port.
 MetaData getMetaData()
          Returns the meta data currently assigned to this port.
 boolean isConnected()
          Returns true if connected to another Port.
 boolean shouldAutoConnect()
          Asks the owning operator Operator.shouldAutoConnect(OutputPort).
 
Methods inherited from class com.rapidminer.operator.ports.impl.AbstractPort
addError, collectQuickFixes, freeMemory, getAnyDataOrNull, getData, getData, getDataOrNull, getErrors, getName, getPorts, getShortName, getSpec, isLocked, lock, setData, setName, simulatesStack, toString, unlock
 
Methods inherited from class com.rapidminer.tools.AbstractObservable
addObserver, addObserverAsFirst, fireUpdate, fireUpdate, removeObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.ports.Port
addError, collectQuickFixes, freeMemory, getAnyDataOrNull, getData, getData, getDataOrNull, getErrors, getName, getPorts, getShortName, getSpec, isLocked, lock, simulatesStack, unlock
 
Methods inherited from interface com.rapidminer.tools.Observable
addObserver, addObserverAsFirst, removeObserver
 

Constructor Detail

OutputPortImpl

protected OutputPortImpl(Ports<? extends Port> owner,
                         java.lang.String name,
                         boolean simulatesStack)
Use the factory method OutputPorts#createPort() to create OutputPorts.

Method Detail

clear

public void clear(int clearFlags)
Description copied from interface: Port
Clears data, meta data and errors at this port.

Specified by:
clear in interface Port
Overrides:
clear in class AbstractPort
Parameters:
clearFlags - disjunction of the CLEAR_XX constants.

connectTo

public void connectTo(InputPort inputPort)
               throws PortException
Description copied from interface: OutputPort
Connects to an input port.

Specified by:
connectTo in interface OutputPort
Throws:
PortException - if already connected.

disconnect

public void disconnect()
                throws PortException
Description copied from interface: OutputPort
Disconnects the OutputPort from its InputPort. Note: As a side effect, disconnecting ports may trigger PortExtenders removing these ports. In order to avoid this behaviour, Port.lock() port first.

Specified by:
disconnect in interface OutputPort
Throws:
PortException - if not connected.

deliver

public void deliver(IOObject object)
Description copied from interface: OutputPort
Delivers an object to the connected InputPort or ignores it if the output port is not connected.

Specified by:
deliver in interface OutputPort

deliverMD

public void deliverMD(MetaData md)
Description copied from interface: OutputPort
Does the same as #deliver(Object) except that only meta data is delivered. This method is called by the Operator's MDTransformer.

Specified by:
deliverMD in interface OutputPort

getMetaData

public MetaData getMetaData()
Description copied from interface: Port
Returns the meta data currently assigned to this port.

Specified by:
getMetaData in interface Port

getDestination

public InputPort getDestination()
Description copied from interface: OutputPort
Returns the destination input port.

Specified by:
getDestination in interface OutputPort

getDescription

public java.lang.String getDescription()
Description copied from interface: Port
Returns a human readable description of the ports pre/ and postconditions.

Specified by:
getDescription in interface Port

isConnected

public boolean isConnected()
Description copied from interface: Port
Returns true if connected to another Port.

Specified by:
isConnected in interface Port

shouldAutoConnect

public boolean shouldAutoConnect()
Description copied from interface: OutputPort
Asks the owning operator Operator.shouldAutoConnect(OutputPort).

Specified by:
shouldAutoConnect in interface OutputPort


Copyright © 2001-2009 by Rapid-I