Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## calhoun.analysis.crf.io
Interface InputComponentIO

All Superinterfaces:
  java.io.Serializable

All Known Subinterfaces:
  InterleavedInputComponent

All Known Implementing Classes:
  AlignmentTree, BooleanInput, FastaAlignmentInput, FastaInput, InterleavedInputComponentBase, Interval21HiddenSequenceTranslator, IntervalInput, IntInput, IntInputInterval29, MultipleAlignmentInput, NameInput, StringInput

    public interface InputComponentIO

extends java.io.Serializable

interface to read or write `InputSequence` components to or from a file. A single `InputComponentIO` is responsible for reading and writing data at a single location, but may work with multiple components of the input sequence.

Method Summary
`java.util.List<java.lang.String>` | `getComponentNames()` A list of names of the components of the InputSequence created by this reader.
`void` | `readInputSequences(java.lang.String location, java.util.List<java.util.Map<java.lang.String,InputSequence<?>>> inputs)` reads input sequences from this location.
`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.

Method Detail

### getComponentNames

    java.util.List<java.lang.String> getComponentNames()

  A list of names of the components of the InputSequence created by this reader.

  Returns:
    a list of input sequence component names.

### readInputSequences

    void readInputSequences(java.lang.String location,
                            java.util.List<java.util.Map<java.lang.String,InputSequence<?>>> inputs)
                            throws java.io.IOException

  reads input sequences from this location. In most cases the location will be a file and this object will read in one or more components of the overall input from that file. Alist of inputs is returned. Each input consists of a set of key-value pairs, where the key is the name of the input component and the value is an (@link InputSequence) object. If this is not the first component to be loaded, this list may already contain entries for the input.

  Parameters:
    `location` - 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.
  Throws:
    `java.io.IOException`

### writeInputSequences

    void writeInputSequences(java.lang.String location,
                             java.util.List<? extends java.util.Map<java.lang.String,? extends InputSequence<?>>> inputComponents)
                             throws java.io.IOException

  writes input sequences to this location. `InputComponentIO` 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.

  Parameters:
    `location` - 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.
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD