public abstract class AbstractLocation extends java.lang.Object implements Location
Location.Tools| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLocation() |
|
AbstractLocation(Point start,
Point end,
Strand strand,
boolean circular,
boolean betweenCompounds,
AccessionID accession,
java.util.List<Location> subLocations)
Default constructor
|
|
AbstractLocation(Point start,
Point end,
Strand strand,
boolean circular,
boolean betweenCompounds,
java.util.List<Location> subLocations)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertLocation() |
protected <C extends Compound> |
canComplement(Sequence<C> sequence)
Uses the Sequence's CompoundSet to decide if a compound can
be assgined to ComplementCompound meaning it can complement
|
boolean |
equals(java.lang.Object obj) |
AccessionID |
getAccession()
Returns the AccessionID this location is currently bound with
|
Point |
getEnd()
End of the location
|
int |
getLength()
Returns the length of the outer bounds of this location
|
java.util.List<Location> |
getRelevantSubLocations()
Returns the normalised list of sub locations i.e.
|
<C extends Compound> |
getRelevantSubSequence(Sequence<C> sequence)
Will return a SequenceReader object which offers a view of all resolved
locations i.e.
|
Point |
getStart()
Start of the location
|
Strand |
getStrand()
Strand which the location is located on
|
java.util.List<Location> |
getSubLocations()
Gives access to the sub locations for this location.
|
<C extends Compound> |
getSubSequence(Sequence<C> sequence)
If circular this will return the sequence represented by the sub
locations joined.
|
int |
hashCode() |
boolean |
isBetweenCompounds()
Returns true if the position is meant to represent a point between
two points such as 78^79.
|
boolean |
isCircular()
Indicates if this location is circular.
|
boolean |
isComplex()
Returns true if the location is considered to be complex meaning
the location is actually composed of sub-locations.
|
java.util.Iterator<Location> |
iterator()
Iterates through all known sub-locations for this location but does
not descend
|
protected <C extends Compound> |
reverseSequence(Sequence<C> sequence)
Reverses and (if possible) complements the Sequence so as to represent
the reverse strand (if one exists).
|
protected void |
setAccession(AccessionID accession) |
protected void |
setBetweenCompounds(boolean betweenCompounds) |
protected void |
setCircular(boolean circular) |
protected void |
setEnd(Point end) |
protected void |
setStart(Point start) |
protected void |
setStrand(Strand strand) |
protected void |
setSubLocations(java.util.List<Location> subLocations) |
java.lang.String |
toString() |
protected AbstractLocation()
public AbstractLocation(Point start, Point end, Strand strand, boolean circular, boolean betweenCompounds, java.util.List<Location> subLocations)
start - start of the locationend - end of the locationstrand - strand it is located oncircular - Boolean which says if the current location was circular
or notbetweenCompounds - Indicates the location lies at the position between
a pair of bases; means the bases must be next to each other (and
therefore cannot be complex)subLocations - Sub locations which composes this locationpublic AbstractLocation(Point start, Point end, Strand strand, boolean circular, boolean betweenCompounds, AccessionID accession, java.util.List<Location> subLocations)
start - start of the locationend - end of the locationstrand - strand it is located oncircular - Boolean which says if the current location was circular
or notbetweenCompounds - Indicates the location lies at the position between
a pair of bases; means the bases must be next to each other (and
therefore cannot be complex)accession - The accession ID to link this location tosubLocations - Sub locations which composes this locationprotected void assertLocation()
public int getLength()
Locationpublic Strand getStrand()
Locationpublic java.util.List<Location> getSubLocations()
Location#getAllSubLocations().getSubLocations in interface Locationpublic boolean isComplex()
Locationpublic AccessionID getAccession()
AccessionedgetAccession in interface Accessionedpublic java.util.Iterator<Location> iterator()
iterator in interface java.lang.Iterable<Location>public java.util.List<Location> getRelevantSubLocations()
getRelevantSubLocations in interface Locationpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isCircular()
LocationisCircular in interface Locationpublic boolean isBetweenCompounds()
LocationisBetweenCompounds in interface Locationpublic <C extends Compound> Sequence<C> getSubSequence(Sequence<C> sequence)
getSubSequence in interface Locationsequence - The sequence object to work withpublic <C extends Compound> Sequence<C> getRelevantSubSequence(Sequence<C> sequence)
LocationgetRelevantSubSequence in interface Locationsequence - The sequence object to work withprotected <C extends Compound> Sequence<C> reverseSequence(Sequence<C> sequence)
protected <C extends Compound> boolean canComplement(Sequence<C> sequence)
public java.lang.String toString()
toString in class java.lang.Objectprotected void setCircular(boolean circular)
protected void setEnd(Point end)
protected void setStart(Point start)
protected void setStrand(Strand strand)
protected void setBetweenCompounds(boolean betweenCompounds)
protected void setSubLocations(java.util.List<Location> subLocations)
protected void setAccession(AccessionID accession)