org.embl.ebi.escience.scufl
Class Port

java.lang.Object
  extended by org.embl.ebi.escience.scufl.Port
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
InputPort, OutputPort

public abstract class Port
extends java.lang.Object
implements java.io.Serializable

An abstract superclass of all processor ports

Author:
Tom Oinn
See Also:
Serialized Form

Constructor Summary
Port(Processor processor, java.lang.String name)
          Create a new port (obviously you can't actually construct this because it's abstract.
 
Method Summary
 SemanticMarkup getMetadata()
          Get a reference to the SemanticMarkup container associated with this port
 java.lang.String getName()
          Get the name for this port.
 Processor getProcessor()
          Get the processor that this port belongs to.
 java.lang.String getSyntacticType()
          Get the syntactic type of the port
 boolean isNameEditable()
          Check if port name is editable, ie.
 boolean isSink()
          Is this port a workflow sink?
 boolean isSource()
          Is this port a workflow source?
 void setName(java.lang.String name)
          Set the name of the port.
 void setSyntacticType(java.lang.String new_type)
          Set the syntactic type of the port
 java.lang.String toString()
          Return the name as the toString() implementation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Port

public Port(Processor processor,
            java.lang.String name)
     throws DuplicatePortNameException,
            PortCreationException
Create a new port (obviously you can't actually construct this because it's abstract. Names should match [a-zA-Z_0-9].

Throws:
DuplicatePortNameException
PortCreationException
Method Detail

getMetadata

public SemanticMarkup getMetadata()
Get a reference to the SemanticMarkup container associated with this port


isNameEditable

public boolean isNameEditable()
Check if port name is editable, ie. that setName() will have an effect. Only workflow sink or source ports are normally editable.

Returns:
true if setName() will set the name.

setName

public void setName(java.lang.String name)
Set the name of the port. Should only ever be called on workflow sink or source ports, will have no effect on others. The new name must match the regular expression
 \w+
 

See Also:
isNameEditable()

setSyntacticType

public void setSyntacticType(java.lang.String new_type)
Set the syntactic type of the port


getSyntacticType

public java.lang.String getSyntacticType()
Get the syntactic type of the port


isSource

public boolean isSource()
Is this port a workflow source?


isSink

public boolean isSink()
Is this port a workflow sink?


getProcessor

public Processor getProcessor()
Get the processor that this port belongs to.


getName

public java.lang.String getName()
Get the name for this port. There is no set method, ports are named at creation time and the names are immutable from that point onwards.
There is an exception to this rule in the case of workflow source and sink ports, these can be renamed after their creation.


toString

public java.lang.String toString()
Return the name as the toString() implementation

Overrides:
toString in class java.lang.Object