Interface RichLocation

    • Method Detail

      • 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

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

        void setFeature​(RichFeature feature)
                 throws ChangeVetoException
        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

        CrossRef getCrossRef()
        Retrieves the crossref associated with this location.
        Returns:
        the crossref.
      • getTerm

        ComparableTerm getTerm()
        Retrieves the term associated with this location.
        Returns:
        the term.
      • getStrand

        RichLocation.Strand 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

        Position getMinPosition()
        Retrieves the start position of this location.
        Returns:
        the position.
      • getMaxPosition

        Position getMaxPosition()
        Retrieves the end position of this location.
        Returns:
        the position.
      • setPositionResolver

        void setPositionResolver​(PositionResolver p)
        Sets the resolver to use when working out actual base coordinates from fuzzy positions.
        Parameters:
        p - the position resolver to use.
      • getCircularLength

        int 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

        void setCrossRefResolver​(CrossReferenceResolver r)
        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.