calhoun.analysis.crf.io
Class IntervalInput

java.lang.Object
  extended by calhoun.analysis.crf.io.InterleavedInputComponentBase
      extended by calhoun.analysis.crf.io.IntervalInput
All Implemented Interfaces:
InputComponentIO, InterleavedInputComponent, java.io.Serializable

public class IntervalInput
extends InterleavedInputComponentBase

an input component used to read in values that are similar for long intervals. Each input sequence is a line which looks like "(164716,215910,-,1.0)(194048,218199,-,1.0)...". Takes this input and creates an IntervalInputSequence.

This input component is can be used in a regular input handler or as part of an InputHandlerInterleaved.

See Also:
Serialized Form

Constructor Summary
IntervalInput()
           
 
Method Summary
 boolean read(java.io.BufferedReader r, java.util.Map<java.lang.String,InputSequence<?>> output)
          Read the contents of the sequence in from a reader.
 void write(java.io.Writer w, java.util.Map<java.lang.String,? extends InputSequence<?>> data)
          Output this sequence to the given writer.
 
Methods inherited from class calhoun.analysis.crf.io.InterleavedInputComponentBase
getComponentNames, getName, readInputSequences, setName, writeInputSequences
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntervalInput

public IntervalInput()
Method Detail

read

public boolean read(java.io.BufferedReader r,
                    java.util.Map<java.lang.String,InputSequence<?>> output)
             throws java.io.IOException
Description copied from interface: InterleavedInputComponent
Read the contents of the sequence in from a reader. Return false if the end of file was reached.

Parameters:
r - the buffered reader from which the next sequence should be read.
output - a map to which new components for this input sequence should be added.
Returns:
true if a sequence was read in and the map was populated. false if the end of the sequence was reached.
Throws:
java.io.IOException

write

public void write(java.io.Writer w,
                  java.util.Map<java.lang.String,? extends InputSequence<?>> data)
           throws java.io.IOException
Description copied from interface: InterleavedInputComponent
Output this sequence to the given writer.

Parameters:
w - a writer to which this sequence should be written
data - a map containing the data for the sequence to be written
Throws:
java.io.IOException