edu.umass.cs.mallet.base.pipe
Class SerialPipes

java.lang.Object
  extended byedu.umass.cs.mallet.base.pipe.Pipe
      extended byedu.umass.cs.mallet.base.pipe.SerialPipes
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
NEPipes

public class SerialPipes
extends Pipe
implements java.io.Serializable

Convert an instance through a sequence of pipes.

See Also:
Serialized Form

Constructor Summary
SerialPipes()
           
SerialPipes(java.util.List pipeList)
           
SerialPipes(java.lang.Object[] pipes)
           
SerialPipes(Pipe[] pipes)
           
 
Method Summary
protected  void add(Pipe pipe)
           
 Pipe getPipe(int index)
           
 java.util.ArrayList getPipes()
           
static boolean isSuppressExceptions()
           
 Instance pipe(Instance carrier)
          Process an Instance.
 Instance pipe(Instance carrier, int startingIndex)
           
 Instance pipe(Instance carrier, int startingIndex, boolean growAlphabet)
           
 void removePipe(int index)
           
 void replacePipe(int index, Pipe p)
           
protected  Alphabet resolveDataAlphabet()
           
protected  Alphabet resolveTargetAlphabet()
           
static void setSuppressExceptions(boolean suppressExceptions)
           
 void setTargetProcessing(boolean lookForAndProcessTarget)
          Set whether input is taken from target field of instance during processing.
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class edu.umass.cs.mallet.base.pipe.Pipe
getDataAlphabet, getInstanceId, getParent, getParentRoot, getTargetAlphabet, isDataAlphabetSet, isTargetProcessing, pipe, readResolve, setDataAlphabet, setParent, setTargetAlphabet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SerialPipes

public SerialPipes()

SerialPipes

public SerialPipes(java.lang.Object[] pipes)

SerialPipes

public SerialPipes(Pipe[] pipes)

SerialPipes

public SerialPipes(java.util.List pipeList)
Method Detail

getPipes

public java.util.ArrayList getPipes()

isSuppressExceptions

public static boolean isSuppressExceptions()

setSuppressExceptions

public static void setSuppressExceptions(boolean suppressExceptions)

setTargetProcessing

public void setTargetProcessing(boolean lookForAndProcessTarget)
Description copied from class: Pipe
Set whether input is taken from target field of instance during processing. If argument is false, don't expect to find input material for the target. By default, this is true.

Overrides:
setTargetProcessing in class Pipe

resolveDataAlphabet

protected Alphabet resolveDataAlphabet()
Overrides:
resolveDataAlphabet in class Pipe

resolveTargetAlphabet

protected Alphabet resolveTargetAlphabet()
Overrides:
resolveTargetAlphabet in class Pipe

add

protected void add(Pipe pipe)

pipe

public Instance pipe(Instance carrier,
                     int startingIndex)

pipe

public Instance pipe(Instance carrier,
                     int startingIndex,
                     boolean growAlphabet)

removePipe

public void removePipe(int index)

replacePipe

public void replacePipe(int index,
                        Pipe p)

size

public int size()

getPipe

public Pipe getPipe(int index)

pipe

public Instance pipe(Instance carrier)
Description copied from class: Pipe
Process an Instance. This method takes an input Instance, destructively modifies it in some way, and returns it. This is the method by which all pipes are eventually run.

One can create a new concrete subclass of Pipe simply by implementing this method.

Specified by:
pipe in class Pipe
Parameters:
carrier - Instance to be processed.

toString

public java.lang.String toString()