Interface RichLocation

All Superinterfaces:
Annotatable, Changeable, Comparable, Location, RichAnnotatable
All Known Implementing Classes:
CompoundRichLocation, EmptyRichLocation, MultiSourceCompoundRichLocation, SimpleRichLocation

public interface RichLocation extends Location, RichAnnotatable, Comparable
Describes locations, and adds the concepts of circularity, fuzziness, annotations, and cross-references to other databases. Also includes strands.
Since:
1.5
Author:
Richard Holland, George Waldon - bug fix
  • Field Details

  • Method Details

    • sort

      void sort()
      Sorts the member locations of a compound location. Does nothing for non-compound locations. Sorting depends on the compareTo() method of the member locations - usually they will be sorted by their start position. This might be useful when used with the location returned by a union or intersection, or when setting the term of a compound location to ORDER_TERM.
    • getFeature

      Retrieves the feature this location is associated with. May be null.
      Returns:
      the feature.
    • setFeature

      Sets the feature this location is associated with. If null, that's fine, but you won't be able to persist it to the database until you give it a not-null value.
      Parameters:
      feature - the feature.
      Throws:
      ChangeVetoException
    • getCrossRef

      Retrieves the crossref associated with this location.
      Returns:
      the crossref.
    • getTerm

      Retrieves the term associated with this location.
      Returns:
      the term.
    • setTerm

      Sets the term for this location.
      Parameters:
      term - the term this location should adopt.
      Throws:
      ChangeVetoException - in case of error.
    • getStrand

      Retrieves the strand associated with this location.
      Returns:
      the strand.
    • getRank

      int getRank()
      Retrieves the rank associated with this location.
      Returns:
      the rank.
    • setRank

      void setRank(int rank) throws ChangeVetoException
      Sets the rank for this location.
      Parameters:
      rank - the rank this location should adopt.
      Throws:
      ChangeVetoException - in case of error.
    • getMinPosition

      Retrieves the start position of this location.
      Returns:
      the position.
    • getMaxPosition

      Retrieves the end position of this location.
      Returns:
      the position.
    • setPositionResolver

      Sets the resolver to use when working out actual base coordinates from fuzzy positions.
      Parameters:
      p - the position resolver to use.
    • getCircularLength

      Retrieves the circular length of this location. If it is 0, the location is not circular. If it is not zero, then the number refers to the wrapping length of the location. eg. 100 would signify that a position of 112 would actually be a position of 112-100 = 12.
      Returns:
      the position.
    • setCircularLength

      void setCircularLength(int sourceSeqLength) throws ChangeVetoException
      Sets the circular length of this location. If it is 0, the location is not circular. If it is not zero, then the number refers to the wrapping length of the location. eg. 100 would signify that a position of 112 would actually be a position of 112-100 = 12.
      Parameters:
      sourceSeqLength - the circular length of this location
      Throws:
      ChangeVetoException - if it doesn't want to change.
    • setCrossRefResolver

      Sets the cross ref resolver to use when retrieving remote symbols. If none is given, then the default from RichObjectFactory.getDefaultCrossRefResolver() is used.
      Parameters:
      r - the resolver to use.