public class LocatedSequenceAnnotationWithLength extends LocatedSequenceAnnotation
SequenceAnnotation
that has a position on the sequence
and a length, e.g. for donor splice sites, exons or genes.Constructor and Description |
---|
LocatedSequenceAnnotationWithLength(int position,
int length,
String type,
String identifier,
Collection<Result> results)
Creates a new
LocatedSequenceAnnotationWithLength of type
type with identifier identifier and additional
annotation (that does not fit the SequenceAnnotation definitions)
given as a Collection of Result s result . |
LocatedSequenceAnnotationWithLength(int position,
int length,
String type,
String identifier,
Result... results)
Creates a new
LocatedSequenceAnnotationWithLength of type
type with identifier identifier and additional
annotation (that does not fit the SequenceAnnotation definitions)
given as an array of Result s result . |
LocatedSequenceAnnotationWithLength(int position,
int length,
String type,
String identifier,
SequenceAnnotation[] annotations,
Result... additionalAnnotations)
Creates a new
LocatedSequenceAnnotationWithLength of type
type with identifier identifier , additional
annotation (that does not fit the SequenceAnnotation definitions)
given as an array of Result s additionalAnnotations
and sub-annotations annotations . |
LocatedSequenceAnnotationWithLength(StringBuffer representation)
The standard constructor for the interface
Storable . |
LocatedSequenceAnnotationWithLength(String type,
String identifier,
LocatedSequenceAnnotation[] annotations,
Result... additionalAnnotations)
Creates a new
LocatedSequenceAnnotationWithLength of type
type with identifier identifier , additional
annotation (that does not fit the SequenceAnnotation definitions)
given as an array of Result s additionalAnnotations
and sub-annotations annotations . |
Modifier and Type | Method and Description |
---|---|
protected void |
fromXML(StringBuffer representation)
Parses the contents of a
ResultSet from its XML representation as
returned by ResultSet.toXML() . |
int |
getEnd()
Returns the end of this
LocatedSequenceAnnotationWithLength , i.e. |
int |
getLength()
Returns the length of this
LocatedSequenceAnnotationWithLength as
given in the constructor. |
boolean |
overlaps(LocatedSequenceAnnotationWithLength second)
|
String |
toString() |
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
getPosition
getAnnotations, getIdentifier, getSubAnnotations, getType, hashCode
findColumn, getNumberOfResults, getResultAt, getResultForName, getResults
public LocatedSequenceAnnotationWithLength(int position, int length, String type, String identifier, Result... results)
LocatedSequenceAnnotationWithLength
of type
type
with identifier identifier
and additional
annotation (that does not fit the SequenceAnnotation
definitions)
given as an array of Result
s result
.position
- the position of the
LocatedSequenceAnnotationWithLength
on the sequencelength
- the length of the LocatedSequenceAnnotationWithLength
type
- the type of the annotationidentifier
- the identifier of the annotationresults
- the additional annotationLocatedSequenceAnnotation.LocatedSequenceAnnotation(int, String,
String, Result...)
public LocatedSequenceAnnotationWithLength(int position, int length, String type, String identifier, Collection<Result> results)
LocatedSequenceAnnotationWithLength
of type
type
with identifier identifier
and additional
annotation (that does not fit the SequenceAnnotation
definitions)
given as a Collection
of Result
s result
.position
- the position of the
LocatedSequenceAnnotationWithLength
on the sequencelength
- the length of the LocatedSequenceAnnotationWithLength
type
- the type of the annotationidentifier
- the identifier of the annotationresults
- the additional annotationLocatedSequenceAnnotation.LocatedSequenceAnnotation(int, String,
String, Collection)
public LocatedSequenceAnnotationWithLength(int position, int length, String type, String identifier, SequenceAnnotation[] annotations, Result... additionalAnnotations)
LocatedSequenceAnnotationWithLength
of type
type
with identifier identifier
, additional
annotation (that does not fit the SequenceAnnotation
definitions)
given as an array of Result
s additionalAnnotations
and sub-annotations annotations
.position
- the position of the
LocatedSequenceAnnotationWithLength
on the sequencelength
- the length of the LocatedSequenceAnnotationWithLength
type
- the type of the annotationidentifier
- the identifier of the annotationannotations
- the sub-annotationsadditionalAnnotations
- the additional annotationLocatedSequenceAnnotation.LocatedSequenceAnnotation(int, String,
String, SequenceAnnotation[], Result...)
public LocatedSequenceAnnotationWithLength(String type, String identifier, LocatedSequenceAnnotation[] annotations, Result... additionalAnnotations)
LocatedSequenceAnnotationWithLength
of type
type
with identifier identifier
, additional
annotation (that does not fit the SequenceAnnotation
definitions)
given as an array of Result
s additionalAnnotations
and sub-annotations annotations
. The position of the new
LocatedSequenceAnnotationWithLength
is the minimal position of
all positions of annotations
and the length is determined so
that it is the maximum of these positions and (if applicable) the
corresponding values of getEnd()
.type
- the type of the annotationidentifier
- the identifier of the annotationannotations
- the sub-annotationsadditionalAnnotations
- the additional annotationLocatedSequenceAnnotation.LocatedSequenceAnnotation(String, String,
LocatedSequenceAnnotation[], Result...)
,
getEnd()
public LocatedSequenceAnnotationWithLength(StringBuffer representation) throws NonParsableException
Storable
.
Creates a new LocatedSequenceAnnotationWithLength
out of its XML
representation.representation
- the XML representation as StringBuffer
NonParsableException
- if the LocatedSequenceAnnotationWithLength
could not
be reconstructed out of the XML representation (the
StringBuffer
representation
could not be
parsed)LocatedSequenceAnnotation.LocatedSequenceAnnotation(StringBuffer)
,
Storable
protected void fromXML(StringBuffer representation) throws NonParsableException
ResultSet
ResultSet
from its XML representation as
returned by ResultSet.toXML()
.fromXML
in class LocatedSequenceAnnotation
representation
- the XML representation as StringBuffer
NonParsableException
- if the XML code could not be parsedpublic StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.toXML
in interface Storable
toXML
in class LocatedSequenceAnnotation
public int getLength()
LocatedSequenceAnnotationWithLength
as
given in the constructor.LocatedSequenceAnnotationWithLength
public int getEnd()
LocatedSequenceAnnotationWithLength
, i.e.
LocatedSequenceAnnotation.getPosition()
+ getLength()
.LocatedSequenceAnnotationWithLength
LocatedSequenceAnnotation.getPosition()
,
getLength()
public String toString()
toString
in class LocatedSequenceAnnotation
public boolean overlaps(LocatedSequenceAnnotationWithLength second)
second
- the other LocatedSequenceAnnotationWithLength