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

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.pipeline.PipeModule
      extended by edu.jhu.ece.iacl.jist.pipeline.PipeAlgorithm
          extended by edu.jhu.ece.iacl.jist.pipeline.PipeAlgorithmGroup
All Implemented Interfaces:
PipePort.PortListener, ParamViewObserver, java.lang.Cloneable

public class PipeAlgorithmGroup
extends PipeAlgorithm

Algorithm group is an aggregation of PipeAlgorithms. An algorithm group is only a container, it's not directly executable.

Author:
Blake Lucas (bclucas@jhu.edu)

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeModule
PipeModule.PipeListener
 
Field Summary
protected  java.util.Vector<PipeAlgorithm> moduleGroup
          Collection of PipeAlgorithms.
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeAlgorithm
algo, lastCell, mapFile, parent
 
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
PipeAlgorithmGroup()
          Default constructor.
 
Method Summary
 void add(PipeAlgorithm algo)
          Add algorithm to collection.
 PipeAlgorithmGroup clone()
          Return clone of this group.
protected  ProcessingAlgorithm createAlgorithm()
          Create Processing Algorithm from the algorithm class.
 PipeAlgorithmFactory.AlgorithmGroupCell createModuleCell()
          Create cell to render this module.
 java.lang.Class getAlgorithmClass()
          Always returns null.
 java.util.Vector<PipeAlgorithm> getAllDescendantModules()
          Get all descendant modules in group.
 java.util.Vector<PipeAlgorithm> getAllLeafModules()
          Get all leaf modules.
 java.util.Vector<PipeAlgorithm> getGroupModules()
          Get all modules in group.
 PipeModuleCell init(PipeJGraph graph)
          Initialize transient fields that could not be deserialized.
 void remove(PipeAlgorithm algo)
          Remove algorithm from collection.
 void removeAllChildren()
          Remove all algorithms from collection.
 boolean saveAs()
          Save group to user selected file.
 int size()
          Returns size of collection.
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeAlgorithm
fromXML, getAlgorithm, getCategory, getCurrentParentContexts, getDefaultJVMArgs, getMapFile, getPackage, getParentGroup, isRoot, open, read, saveInputParams, saveOutputParams, selectSaveFile, setAlgorithm, setMapFile, setParentGroup, toString, toXML, write
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.PipeModule
addListener, connectAction, disconnect, 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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

moduleGroup

protected java.util.Vector<PipeAlgorithm> moduleGroup
Collection of PipeAlgorithms.

Constructor Detail

PipeAlgorithmGroup

public PipeAlgorithmGroup()
Default constructor.

Method Detail

add

public void add(PipeAlgorithm algo)
Add algorithm to collection.

Parameters:
algo - algorithm

clone

public PipeAlgorithmGroup clone()
                         throws java.lang.CloneNotSupportedException
Return clone of this group.

Overrides:
clone in class PipeAlgorithm
Returns:
the pipe algorithm group
Throws:
java.lang.CloneNotSupportedException - the clone not supported exception

createAlgorithm

protected ProcessingAlgorithm createAlgorithm()
Create Processing Algorithm from the algorithm class.

Overrides:
createAlgorithm in class PipeAlgorithm
Returns:
Null if unable to create processing algorithm

createModuleCell

public PipeAlgorithmFactory.AlgorithmGroupCell createModuleCell()
Create cell to render this module.

Overrides:
createModuleCell in class PipeAlgorithm
Returns:
the algorithm group cell

getAlgorithmClass

public java.lang.Class getAlgorithmClass()
Always returns null. An algorithm group does not have an algorithm class.

Overrides:
getAlgorithmClass in class PipeAlgorithm
Returns:
the algorithm class

getAllDescendantModules

public java.util.Vector<PipeAlgorithm> getAllDescendantModules()
Get all descendant modules in group.

Returns:
all descendant modules in group

getAllLeafModules

public java.util.Vector<PipeAlgorithm> getAllLeafModules()
Get all leaf modules.

Returns:
all lead modules

getGroupModules

public java.util.Vector<PipeAlgorithm> getGroupModules()
Get all modules in group.

Returns:
modules in group

init

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

Overrides:
init in class PipeAlgorithm
Parameters:
graph - Layout graph if one is available, null otherwise
Returns:
the pipe module cell

remove

public void remove(PipeAlgorithm algo)
Remove algorithm from collection.

Parameters:
algo - algorithm

removeAllChildren

public void removeAllChildren()
Remove all algorithms from collection.


saveAs

public boolean saveAs()
Save group to user selected file.

Overrides:
saveAs in class PipeAlgorithm
Returns:
true, if save as

size

public int size()
Returns size of collection.

Returns:
collection size