edu.jhu.ece.iacl.jist.pipeline
Class PipeSource

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.pipeline.PipeModule
      extended by edu.jhu.ece.iacl.jist.pipeline.PipeSource
All Implemented Interfaces:
PipePort.PortListener, ParamViewObserver
Direct Known Subclasses:
PipeDoubleSweepSource, PipeExternalSource, PipeFileCollectionSource, PipeFileDirectorySource, PipeIntegerSweepSource, PipeListCollectionSource, PipeListSource, PipePointDoubleSweepSource, PipeSelectionSource, PipeToggleSource, PipeVolumeDirectoryCollectionSource

public abstract class PipeSource
extends PipeModule

Module for generating parameters used as input to algorithm modules.

Author:
Blake Lucas

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeModule
PipeModule.PipeListener
 
Field Summary
protected  PipeChildPort childPort
          Port for child source.
protected  boolean isReset
          Flag for source is reset after iterating through all parameter values.
protected  PipeParentPort parentPort
          Port for parent source.
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeModule
bounds, cell, currentContext, inputHash, inputParams, inputPorts, label, listeners, name, outputHash, outputParams, outputPorts
 
Constructor Summary
PipeSource()
          Constructor for source creates all associated input and output parameters.
 
Method Summary
protected abstract  ParamCollection createInputParams()
          Create input parameters for this source.
 PipeSourceFactory.SourceCell createModuleCell()
          Create new graph cell for this source.
protected abstract  ParamCollection createOutputParams()
          Create output parameters for this source.
 void disconnect()
          Disconnect this module and all connections to this module.
 PipeChildPort getChildPort()
          Get port for child connection.
abstract  ParamModel getOutputParam()
          Get parameter representing the output to this source.
 PipeParentPort getParentPort()
          Get port for parent connection.
 PipeSource getRoot()
          Find the root source starting from this source.
 boolean hasNext()
          Returns true if there are more parameter values.
 PipeModuleCell init(PipeJGraph graph)
          Initialize fields that could not be deserialized.
 boolean isRoot()
          Returns true if this source is a root.
 boolean iterate()
          Iterate through all parameter values and all child parameter values.
 void reset()
          Reset this source and all child sources.
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeModule
addListener, connectAction, disconnectAction, forward, getAncestors, getAncestors, getBounds, getChildren, getCurrentContext, getDescendants, getDescendants, getInputHash, getInputParams, getInputPorts, getLabel, getListeners, getModuleCell, getName, getOutputHash, getOutputParams, getOutputPorts, getParents, isAncestorOf, isDescendantOf, push, removeAllListeners, removeListener, setBounds, setCurrentContext, setLabel, setModuleCell, setName, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentPort

protected PipeParentPort parentPort
Port for parent source.


childPort

protected PipeChildPort childPort
Port for child source.


isReset

protected transient boolean isReset
Flag for source is reset after iterating through all parameter values.

Constructor Detail

PipeSource

public PipeSource()
Constructor for source creates all associated input and output parameters.

Method Detail

createInputParams

protected abstract ParamCollection createInputParams()
Create input parameters for this source.

Returns:
input parameters

createModuleCell

public PipeSourceFactory.SourceCell createModuleCell()
Create new graph cell for this source.

Specified by:
createModuleCell in class PipeModule
Returns:
the pipe module cell

createOutputParams

protected abstract ParamCollection createOutputParams()
Create output parameters for this source.

Returns:
output parameters

disconnect

public void disconnect()
Disconnect this module and all connections to this module.

Overrides:
disconnect in class PipeModule

getChildPort

public PipeChildPort getChildPort()
Get port for child connection.

Returns:
child port

getOutputParam

public abstract ParamModel getOutputParam()
Get parameter representing the output to this source.

Returns:
output parameter

getParentPort

public PipeParentPort getParentPort()
Get port for parent connection.

Returns:
parent port

getRoot

public PipeSource getRoot()
Find the root source starting from this source.

Returns:
the root

hasNext

public boolean hasNext()
Returns true if there are more parameter values.

Returns:
true, if checks for next

init

public PipeModuleCell init(PipeJGraph graph)
Initialize fields that could not be deserialized.

Specified by:
init in class PipeModule
Parameters:
graph - the graph
Returns:
the pipe module cell

isRoot

public boolean isRoot()
Returns true if this source is a root.

Overrides:
isRoot in class PipeModule
Returns:
true, if checks if is root

iterate

public boolean iterate()
Iterate through all parameter values and all child parameter values.

Returns:
True if there are more elements to iterate through

reset

public void reset()
Reset this source and all child sources.