|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcalhoun.analysis.crf.io.InterleavedInputComponentBase
public abstract class InterleavedInputComponentBase
base class for InterleavedInputComponents. Implements the read and write methods
from InputComponentIO by calling the Reader and Writer based methods of InterleavedInputComponent.
This allows an InterleavedInputComponent to implement just the reader and writer methods but be usable
in any input handler.
Also implements a name field. The name is the name of the input sequence which will be read and written by the input component. This is the name that will identify the returned input sequence as part of a composite input. The name defaults to "default".
| Constructor Summary | |
|---|---|
InterleavedInputComponentBase()
|
|
| Method Summary | |
|---|---|
java.util.List<java.lang.String> |
getComponentNames()
returns the name of this component |
java.lang.String |
getName()
the name of the input sequence read and written by this component |
void |
readInputSequences(java.lang.String location,
java.util.List<java.util.Map<java.lang.String,InputSequence<?>>> inputs)
reads input sequences from this location. |
void |
setName(java.lang.String name)
sets the name of the input sequence read and written by this component |
void |
writeInputSequences(java.lang.String location,
java.util.List<? extends java.util.Map<java.lang.String,? extends InputSequence<?>>> inputComponents)
writes input sequences to this location. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface calhoun.analysis.crf.io.InterleavedInputComponent |
|---|
read, write |
| Constructor Detail |
|---|
public InterleavedInputComponentBase()
| Method Detail |
|---|
public java.util.List<java.lang.String> getComponentNames()
getComponentNames in interface InputComponentIOpublic java.lang.String getName()
public void setName(java.lang.String name)
name - the name for the input sequence this component reads and writes
public void readInputSequences(java.lang.String location,
java.util.List<java.util.Map<java.lang.String,InputSequence<?>>> inputs)
throws java.io.IOException
InputComponentIO
readInputSequences in interface InputComponentIOlocation - the location of the data to read. Meaning of the location is implementation dependent, but will usually be a file name.inputs - a list of input sequences. For each input sequence, a map is returned that maps component names to their
associated InputSequence objects.
java.io.IOException
public void writeInputSequences(java.lang.String location,
java.util.List<? extends java.util.Map<java.lang.String,? extends InputSequence<?>>> inputComponents)
throws java.io.IOException
InputComponentIOInputComponentIO optionally can implement this function to provide the ability to write input
data as well as read it. This is used by many of the data manipulation tools, such as those for subsetting and creating cross-validation sets.
writeInputSequences in interface InputComponentIOlocation - the location of the data to write. Meaning of the location is implementation dependent, but will usually be a file name.inputComponents - an iterator over input sequences. For each input sequence, a map is returned that maps component names to their
associated InputSequence objects. All components of the input are passed, and this object is reponsible for knowing which components
it should be writing.
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||