|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Port
Operators in a process are connected via input and output ports. Whenever
an operator generates output (or meta data about output), it is delivered
to the connected input port.
This interface defines all behavior and properies common to input and output ports.
This is basically names, description etc., as well as adding messages about problems
in the process setup and quick fixes.
Ports| Field Summary | |
|---|---|
static int |
CLEAR_ALL
|
static int |
CLEAR_ALL_ERRORS
Clears all error types. |
static int |
CLEAR_ALL_METADATA
Clears all meta data, real and inferred. |
static int |
CLEAR_DATA
|
static int |
CLEAR_META_DATA_ERRORS
|
static int |
CLEAR_METADATA
|
static int |
CLEAR_REAL_METADATA
|
static int |
CLEAR_SIMPLE_ERRORS
|
| Method Summary | ||
|---|---|---|
void |
addError(MetaDataError metaDataError)
Report an error in the current process setup. |
|
void |
clear(int clearFlags)
Clears data, meta data and errors at this port. |
|
java.util.List<QuickFix> |
collectQuickFixes()
Returns a sorted list of all quick fixes applicable for this port. |
|
void |
freeMemory()
Releases of any hard reference to IOObjects held by this class. |
|
IOObject |
getAnyDataOrNull()
Returns the last object delivered to the connected InputPort
or received from the connected OutputPort. |
|
|
getData()
Same as #getData(true). |
|
|
getData(java.lang.Class<T> desiredClass)
This method returns the object of the desired class or throws an UserError if no object is present or cannot be casted to the desiredClass |
|
|
getDataOrNull()
Returns the last object delivered to the connected InputPort
or received from the connected OutputPort |
|
java.lang.String |
getDescription()
Returns a human readable description of the ports pre/ and postconditions. |
|
java.util.Collection<MetaDataError> |
getErrors()
Returns the set of errors added since the last clear errors. |
|
MetaData |
getMetaData()
Returns the meta data currently assigned to this port. |
|
java.lang.String |
getName()
A human readable, unique (operator scope) name for the port. |
|
Ports<? extends Port> |
getPorts()
Returns the set of ports to which this port belongs. |
|
java.lang.String |
getShortName()
Gets a three letter abbreviation of the port's name. |
|
java.lang.String |
getSpec()
Returns the string "OperatorName.PortName". |
|
boolean |
isConnected()
Returns true if connected to another Port. |
|
boolean |
isLocked()
|
|
void |
lock()
Locks the port so port extenders do not remove the port if disconnected. |
|
boolean |
simulatesStack()
Deprecated. The above reasoning turned out to be unnecessary if implementations in other places are correct. We always simulate the stack now. This method is only called from within ExecutionUnit#autoWire(CompatibilityLevel,
InputPorts, LinkedList to keep a reference, but
it has no effect on the auto-wiring process. We keep this
method until the end of the alpha test phase of Vega. |
|
void |
unlock()
|
|
| Methods inherited from interface com.rapidminer.tools.Observable |
|---|
addObserver, addObserverAsFirst, removeObserver |
| Field Detail |
|---|
static final int CLEAR_META_DATA_ERRORS
static final int CLEAR_METADATA
static final int CLEAR_DATA
static final int CLEAR_SIMPLE_ERRORS
static final int CLEAR_REAL_METADATA
static final int CLEAR_ALL
static final int CLEAR_ALL_ERRORS
static final int CLEAR_ALL_METADATA
| Method Detail |
|---|
java.lang.String getName()
MetaData getMetaData()
PortException - if no data is available.
<T extends IOObject> T getData(java.lang.Class<T> desiredClass)
throws UserError
UserError
<T extends IOObject> T getData()
throws OperatorException
#getData(true).
UserError - if data is missing.
OperatorException
<T extends IOObject> T getDataOrNull()
throws UserError
InputPort
or received from the connected OutputPort
UserError - If data is not of the requested type.IOObject getAnyDataOrNull()
InputPort
or received from the connected OutputPort.
Never throws an exception.
Ports<? extends Port> getPorts()
java.lang.String getShortName()
java.lang.String getDescription()
boolean isConnected()
void addError(MetaDataError metaDataError)
java.util.Collection<MetaDataError> getErrors()
void clear(int clearFlags)
clearFlags - disjunction of the CLEAR_XX constants.java.util.List<QuickFix> collectQuickFixes()
java.lang.String getSpec()
@Deprecated boolean simulatesStack()
ExecutionUnit#autoWire(CompatibilityLevel,
InputPorts, LinkedList) to keep a reference, but
it has no effect on the auto-wiring process. We keep this
method until the end of the alpha test phase of Vega.
ExecutionUnit#autoWire() should simulate the pre RM
5.0 stack behaviour of IOContainer. Normally, ports should return
true here. However, ports created by PortPairExtenders should
return false here, since (most of the time) they only pass data through
rather adding new IOObjects to the IOContainer.
TODO: delete
void lock()
void unlock()
lock()boolean isLocked()
lock()void freeMemory()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||