org.knime.core.node.port
Class PortType

java.lang.Object
  extended by org.knime.core.node.port.PortType

public final class PortType
extends Object

Holds type information about node port types.

The documentation of this class is mostly missing and will be fixed in future versions. For example implementations refer to one of the core implementations in KNIME core.

Please also note that the general API for PortTypes (which is new in KNIME 2.0) is not finalized and may (slightly) change in future versions as well (meaning also that methods may be added to either this class or PortObject or PortObjectSpec).

Since:
2.0
Author:
M. Berthold & B. Wiswedel, University of Konstanz

Constructor Summary
PortType(Class<? extends PortObject> objectClass)
           
 
Method Summary
 boolean acceptsPortObject(PortObject obj)
           
 boolean acceptsPortObjectSpec(PortObjectSpec spec)
           
 boolean equals(Object obj)
          
 Class<? extends PortObject> getPortObjectClass()
           
 Class<? extends PortObjectSpec> getPortObjectSpecClass()
           
static Class<? extends PortObjectSpec> getPortObjectSpecClass(Class<? extends PortObject> objectClass)
           
 int hashCode()
          
 boolean isSuperTypeOf(PortType subType)
          Determines if the argument type is a sub type of this type.
static PortType load(NodeSettingsRO settings)
           
 void save(NodeSettingsWO settings)
           
 String toString()
          Returns string comprising spec and object class.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortType

public PortType(Class<? extends PortObject> objectClass)
Method Detail

getPortObjectSpecClass

public Class<? extends PortObjectSpec> getPortObjectSpecClass()

getPortObjectClass

public Class<? extends PortObject> getPortObjectClass()

isSuperTypeOf

public boolean isSuperTypeOf(PortType subType)
Determines if the argument type is a sub type of this type.

Parameters:
subType - The type to check
Returns:
If this type is a super type.
Throws:
NullPointerException - if the argument is null

toString

public String toString()
Returns string comprising spec and object class.

Overrides:
toString in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

save

public void save(NodeSettingsWO settings)

acceptsPortObjectSpec

public boolean acceptsPortObjectSpec(PortObjectSpec spec)

acceptsPortObject

public boolean acceptsPortObject(PortObject obj)

load

public static PortType load(NodeSettingsRO settings)
                     throws InvalidSettingsException
Throws:
InvalidSettingsException

getPortObjectSpecClass

public static Class<? extends PortObjectSpec> getPortObjectSpecClass(Class<? extends PortObject> objectClass)


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.