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

## de.jstacs.io
Class AbstractStringExtractor

    java.lang.Object
      de.jstacs.io.AbstractStringExtractor

All Implemented Interfaces:
  Enumeration<String>

Direct Known Subclasses:
  SparseStringExtractor, StringExtractor

    public abstract class AbstractStringExtractor

extends Object
implements Enumeration<String>

This class implements the reader that extracts strings. The class ignores lines starting with a given character, since those lines are treated as comments. If the user does not specify this character, it is set to "#" internally. If the user specifies this character as ">", the file or String will be treated as in FastA-format, i.e. lines beginning with > will be stripped and the lines between two > (or until the end of the file) will be appended to form a new String.

Author:
  Jan Grau, Jens Keilwagen

Field Summary
`protected String` | `annotation` The annotation of the source.
`static char` | `FASTA` The comment-character for FastA-formatted files is '>'.
`protected char` | `ignore` The internal comment-character.
`protected Pattern` | `ignorePattern` The pattern for ignoring comment lines
`static char` | `USUALLY` The usual comment-character is #.

Constructor Summary
`protected` | `AbstractStringExtractor(char ignore)` This constructor creates an instance with the specified character as start of each comment line.

Method Summary
`String` | `getAnnotation()` Returns the annotation of the source.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Enumeration
`hasMoreElements, nextElement`

Field Detail

### USUALLY

    public static final char USUALLY

  The usual comment-character is #. Lines beginning with this sign will be ignored.

  See Also:
    Constant Field Values

### FASTA

    public static final char FASTA

  The comment-character for FastA-formatted files is '>'. If '>' is specified as the comment-character, the file or String will be interpreted as in FastA format.

  See Also:
    Constant Field Values

### annotation

    protected String annotation

  The annotation of the source.

### ignorePattern

    protected Pattern ignorePattern

  The pattern for ignoring comment lines

### ignore

    protected char ignore

  The internal comment-character.

Constructor Detail

### AbstractStringExtractor

    protected AbstractStringExtractor(char ignore)

  This constructor creates an instance with the specified character as start of each comment line.

  Parameters:
    `ignore` - the comment-character

Method Detail

### getAnnotation

    public final String getAnnotation()

  Returns the annotation of the source.

  Returns:
    the annotation

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