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.data.sequences.annotation
Class SequenceAnnotation

    java.lang.Object
      de.jstacs.results.ResultSet
          de.jstacs.data.sequences.annotation.SequenceAnnotation

All Implemented Interfaces:
  Storable

Direct Known Subclasses:
  CisRegulatoryModuleAnnotation, LocatedSequenceAnnotation

    public class SequenceAnnotation

extends ResultSet

Class for a general annotation of a `Sequence`. Annotations may be e.g. exons, introns, coding sequences or splice sites.

Author:
  Jan Grau

Field Summary

Fields inherited from class de.jstacs.results.ResultSet
`results`

Constructor Summary
`SequenceAnnotation(StringBuffer representation)` The standard constructor for the interface `Storable`.
`SequenceAnnotation(String type, String identifier, Collection<? extends Result> results)` Creates a new `SequenceAnnotation` of type `type` with identifier `identifier` and additional annotation (that does not fit the `SequenceAnnotation` definitions) given as a `Collection` of `Result`s `results`.
`SequenceAnnotation(String type, String identifier, Result result)` Creates a new `SequenceAnnotation` of type `type` with identifier `identifier` and additional annotation (that does not fit the `SequenceAnnotation` definitions) given as a `Result` `result`.
`SequenceAnnotation(String type, String identifier, Result[]... results)` Creates a new `SequenceAnnotation` of type `type` with identifier `identifier` and additional annotation (that does not fit the `SequenceAnnotation` definitions) given as an array of `Result`s `results`.
`SequenceAnnotation(String type, String identifier, SequenceAnnotation[] subAnnotations, Result... additionalAnnotation)` Creates a new `SequenceAnnotation` of type `type` with identifier `identifier` and additional annotation (that does not fit the `SequenceAnnotation` definitions) given as an array of `Result`s `additionalAnnotation`.

Method Summary
`protected void` | `fromXML(StringBuffer source)` Parses the contents of a `ResultSet` from its XML representation as returned by `ResultSet.toXML()`.
`Result[]` | `getAnnotations()` Returns the additional annotations of this `SequenceAnnotation` as given in the constructor.
`String` | `getIdentifier()` Returns the identifier of this `SequenceAnnotation` as given in the constructor.
`SequenceAnnotation[]` | `getSubAnnotations()` Returns the sub-annotations of this `SequenceAnnotation` as given in the constructor.
`String` | `getType()` Returns the type of this `SequenceAnnotation` as given in the constructor.
`String` | `toString()`
`StringBuffer` | `toXML()` This method returns an XML representation as `StringBuffer` of an instance of the implementing class.

Methods inherited from class de.jstacs.results.ResultSet
`findColumn, getNumberOfResults, getResultAt, getResults`

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

Constructor Detail

### SequenceAnnotation

    public SequenceAnnotation(String type,
                              String identifier,
                              Result result)

  Creates a new `SequenceAnnotation` of type `type` with identifier `identifier` and additional annotation (that does not fit the `SequenceAnnotation` definitions) given as a `Result` `result`.

  Parameters:
    `type` - the type of the annotation
    `identifier` - the identifier of the annotation
    `result` - the additional annotation
  See Also:
    `ResultSet.ResultSet(Result)`

### SequenceAnnotation

    public SequenceAnnotation(String type,
                              String identifier,
                              Result[]... results)

  Creates a new `SequenceAnnotation` of type `type` with identifier `identifier` and additional annotation (that does not fit the `SequenceAnnotation` definitions) given as an array of `Result`s `results`.

  Parameters:
    `type` - the type of the annotation
    `identifier` - the identifier of the annotation
    `results` - the additional annotation
  See Also:
    `ResultSet.ResultSet(Result[][])`

### SequenceAnnotation

    public SequenceAnnotation(String type,
                              String identifier,
                              SequenceAnnotation[] subAnnotations,
                              Result... additionalAnnotation)

  Creates a new `SequenceAnnotation` of type `type` with identifier `identifier` and additional annotation (that does not fit the `SequenceAnnotation` definitions) given as an array of `Result`s `additionalAnnotation`. This `SequenceAnnotation` may contain sub-annotations `subAnnotations`, this may be e.g. the donor and acceptor site for splice sites or the exons for a gene.

  Parameters:
    `type` - the type of the annotation
    `identifier` - the identifier of the annotation
    `subAnnotations` - the sub-annotation
    `additionalAnnotation` - the additional annotation
  See Also:
    `ResultSet.ResultSet(Result[][])`

### SequenceAnnotation

    public SequenceAnnotation(String type,
                              String identifier,
                              Collection<? extends Result> results)

  Creates a new `SequenceAnnotation` of type `type` with identifier `identifier` and additional annotation (that does not fit the `SequenceAnnotation` definitions) given as a `Collection` of `Result`s `results`.

  Parameters:
    `type` - the type of the annotation
    `identifier` - the identifier of the annotation
    `results` - the additional annotation
  See Also:
    `ResultSet.ResultSet(Collection)`

### SequenceAnnotation

    public SequenceAnnotation(StringBuffer representation)
                       throws NonParsableException

  The standard constructor for the interface `Storable`. Creates a new `SequenceAnnotation` out of its XML representation.

  Parameters:
    `representation` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the `SequenceAnnotation` could not be reconstructed out of the XML representation (the `StringBuffer` `representation` could not be parsed)
  See Also:
    `ResultSet.ResultSet(StringBuffer)`, `Storable`

Method Detail

### getType

    public String getType()

  Returns the type of this `SequenceAnnotation` as given in the constructor.

  Returns:
    the type of this `SequenceAnnotation`

### getAnnotations

    public Result[] getAnnotations()

  Returns the additional annotations of this `SequenceAnnotation` as given in the constructor.

  Returns:
    the additional annotations of this `SequenceAnnotation`

### getSubAnnotations

    public SequenceAnnotation[] getSubAnnotations()

  Returns the sub-annotations of this `SequenceAnnotation` as given in the constructor.

  Returns:
    the sub-annotations of this `SequenceAnnotation`

### toString

    public String toString()

  Overrides:
    `toString` in class `ResultSet`

### fromXML

    protected void fromXML(StringBuffer source)
                    throws NonParsableException

  Description copied from class: `ResultSet`
  Parses the contents of a `ResultSet` from its XML representation as returned by `ResultSet.toXML()`.

  Overrides:
    `fromXML` in class `ResultSet`
  Parameters:
    `source` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the XML code could not be parsed

### toXML

    public StringBuffer toXML()

  Description copied from interface: `Storable`
  This method returns an XML representation as `StringBuffer` of an instance of the implementing class.

  Specified by:
    `toXML` in interface `Storable`
  Overrides:
    `toXML` in class `ResultSet`
  Returns:
    the XML representation

### getIdentifier

    public String getIdentifier()

  Returns the identifier of this `SequenceAnnotation` as given in the constructor.

  Returns:
    the identifier of this `SequenceAnnotation`

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