public abstract class AbstractLocation extends Object implements Serializable, Location
Location.Tools
Modifier | Constructor and Description |
---|---|
protected |
AbstractLocation() |
|
AbstractLocation(Point start,
Point end,
Strand strand,
boolean circular,
boolean betweenCompounds,
AccessionID accession,
List<Location> subLocations)
Default constructor
|
|
AbstractLocation(Point start,
Point end,
Strand strand,
boolean circular,
boolean betweenCompounds,
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(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
|
List<Location> |
getRelevantSubLocations()
Returns the normalised list of sub locations i.e. only those locations
which do not have a sub location.
|
<C extends Compound> |
getRelevantSubSequence(Sequence<C> sequence)
Will return a SequenceReader object which offers a view of all resolved
locations i.e. those locations which are not complex and define the
true Sequence represented
|
Point |
getStart()
Start of the location
|
Strand |
getStrand()
Strand which the location is located on
|
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.
|
boolean |
isPartial() |
boolean |
isPartialOn3prime() |
boolean |
isPartialOn5prime() |
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).
|
void |
setAccession(AccessionID accession) |
void |
setBetweenCompounds(boolean betweenCompounds) |
protected void |
setCircular(boolean circular) |
protected void |
setEnd(Point end) |
void |
setPartialOn3prime(boolean partialOn3prime) |
void |
setPartialOn5prime(boolean partialOn5prime) |
protected void |
setStart(Point start) |
void |
setStrand(Strand strand) |
void |
setSubLocations(List<Location> subLocations) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected AbstractLocation()
public AbstractLocation(Point start, Point end, Strand strand, boolean circular, boolean betweenCompounds, 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, 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()
Location
public Strand getStrand()
Location
public List<Location> getSubLocations()
Location
#getAllSubLocations()
.getSubLocations
in interface Location
public boolean isComplex()
Location
public AccessionID getAccession()
Accessioned
getAccession
in interface Accessioned
public boolean isPartialOn5prime()
public void setPartialOn5prime(boolean partialOn5prime)
public boolean isPartialOn3prime()
public void setPartialOn3prime(boolean partialOn3prime)
public boolean isPartial()
public Iterator<Location> iterator()
public List<Location> getRelevantSubLocations()
getRelevantSubLocations
in interface Location
public boolean isCircular()
Location
isCircular
in interface Location
public boolean isBetweenCompounds()
Location
isBetweenCompounds
in interface Location
public <C extends Compound> Sequence<C> getSubSequence(Sequence<C> sequence)
getSubSequence
in interface Location
sequence
- The sequence object to work withpublic <C extends Compound> Sequence<C> getRelevantSubSequence(Sequence<C> sequence)
Location
getRelevantSubSequence
in interface Location
sequence
- The sequence object to work withprotected <C extends Compound> Sequence<C> reverseSequence(Sequence<C> sequence)
protected <C extends Compound> boolean canComplement(Sequence<C> sequence)
protected void setCircular(boolean circular)
public void setBetweenCompounds(boolean betweenCompounds)
public void setSubLocations(List<Location> subLocations)
public void setAccession(AccessionID accession)
Copyright © 2000–2019 BioJava. All rights reserved.