org.knime.base.node.mine.bfn
Class BasisFunctionPortObject

java.lang.Object
  extended by org.knime.core.node.port.AbstractSimplePortObject
      extended by org.knime.base.node.mine.bfn.BasisFunctionPortObject
All Implemented Interfaces:
PortObject
Direct Known Subclasses:
FuzzyBasisFunctionPortObject, RadialBasisFunctionPortObject

public abstract class BasisFunctionPortObject
extends AbstractSimplePortObject

Author:
Thomas Gabriel, University of Konstanz

Nested Class Summary
static interface BasisFunctionPortObject.Creator
          Creator used to instantiate basisfunction predictor rows.
 
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObject
PortObject.PortObjectSerializer<T extends PortObject>
 
Constructor Summary
BasisFunctionPortObject()
          Creates a new abstract BasisFunctionPortObject.
BasisFunctionPortObject(BasisFunctionModelContent cont)
          Creates a new basis function model object.
 
Method Summary
abstract  BasisFunctionPortObject createPortObject(BasisFunctionModelContent content)
          Create a new basisfunction port object given the model content.
 Map<DataCell,List<BasisFunctionPredictorRow>> getBasisFunctions()
           
abstract  BasisFunctionPortObject.Creator getCreator()
           
 DataTableSpec getSpec()
          Get specification to this port object.
 String getSummary()
          Get a short summary of this PortObject.
protected  void load(ModelContentRO model, PortObjectSpec spec, ExecutionMonitor exec)
          Loads the content into the freshly instantiated object.
protected  void save(ModelContentWO model, ExecutionMonitor exec)
          Saves this object to model content object.
 
Methods inherited from class org.knime.core.node.port.AbstractSimplePortObject
equals, getPortObjectSerializer, getViews, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasisFunctionPortObject

public BasisFunctionPortObject()
Creates a new abstract BasisFunctionPortObject.


BasisFunctionPortObject

public BasisFunctionPortObject(BasisFunctionModelContent cont)
Creates a new basis function model object.

Parameters:
cont - basisfunction model content containing rules and spec
Method Detail

getSpec

public final DataTableSpec getSpec()
Get specification to this port object. That is, the corresponding PortObjectSpec which is used to configure any successor node after execution, e.g. a BufferedDataTable can return a DataTableSpec.

Subclasses should narrow the return type if possible.

Returns:
underlying PortObjectSpec or any derived spec, never null.

getBasisFunctions

public final Map<DataCell,List<BasisFunctionPredictorRow>> getBasisFunctions()
Returns:
basisfunctions rules by class

createPortObject

public abstract BasisFunctionPortObject createPortObject(BasisFunctionModelContent content)
Create a new basisfunction port object given the model content.

Parameters:
content - basisfunction model content with spec and rules.
Returns:
a new basisfunction port object

getSummary

public String getSummary()
Get a short summary of this PortObject. The return value will be shown in a node port's tooltip, for instance.

Returns:
Summary of the object's content, suitable for a tooltip. Empty strings and null result values are ok (though not encouraged).

save

protected void save(ModelContentWO model,
                    ExecutionMonitor exec)
             throws CanceledExecutionException
Saves this object to model content object.

Specified by:
save in class AbstractSimplePortObject
Parameters:
model - To save to.
exec - For progress/cancelation.
Throws:
CanceledExecutionException - If canceled.

load

protected void load(ModelContentRO model,
                    PortObjectSpec spec,
                    ExecutionMonitor exec)
             throws InvalidSettingsException,
                    CanceledExecutionException
Loads the content into the freshly instantiated object. This method is called at most once in the life time of the object (after the serializer has created a new object using the public no-arg constructor.)

Specified by:
load in class AbstractSimplePortObject
Parameters:
model - To load from.
spec - The accompanying spec (which can be safely cast to the expected class).
exec - For progress/cancelation.
Throws:
InvalidSettingsException - If settings are incomplete/deficient.
CanceledExecutionException - If canceled.

getCreator

public abstract BasisFunctionPortObject.Creator getCreator()
Returns:
a creator for the desired basisfunction rows


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.