Class SimpleIdentifiedObject

    • Constructor Detail

      • SimpleIdentifiedObject

        public SimpleIdentifiedObject​(Citation authority,
                                      String name)
        Creates a new object of the given authority and name.
        Parameters:
        authority - the value to be returned by getAuthority(), or null if none.
        name - the name of the new object.
    • Method Detail

      • getName

        public ReferenceIdentifier getName()
        Returns the name of this identified object, which is represented directly by this implementation class. This is the only IdentifiedObject method in this class returning a non-null and non-empty value.
        Specified by:
        getName in interface IdentifiedObject
      • getAuthority

        public Citation getAuthority()
        Returns the person or party responsible for maintenance of the namespace. This method returns the citation given to the constructor.
        Specified by:
        getAuthority in interface Identifier
        Returns:
        party responsible for definition and maintenance of the code, or null if none.
      • getCodeSpace

        public String getCodeSpace()
        Returns the identifier or namespace in which the code is valid. The default implementation returns the title of the authority.
        Specified by:
        getCodeSpace in interface Identifier
        Returns:
        the identifier or namespace in which the code is valid, or null if none.
      • getCode

        public String getCode()
        Returns the name given at construction time.
        Specified by:
        getCode in interface Identifier
        Returns:
        alphanumeric value identifying an instance in the namespace.
      • getScope

        public InternationalString getScope()
        Description of domain of usage, or limitations of usage, for which this object is valid. Note that this method is not inherited from IdentifiedObject, but is defined in sub-interfaces like SingleCRS.

        The default implementation returns null.

        Returns:
        the domain of usage, or null if none.
      • getDomainOfValidity

        public Extent getDomainOfValidity()
        Area or region or timeframe in which this object is valid. Note that this method is not inherited from IdentifiedObject, but is defined in sub-interfaces like SingleCRS.

        The default implementation returns null.

        Returns:
        the valid domain, or null if not available.
      • hashCode

        public int hashCode()
        Returns a hash code value calculated from the name identifier. This hash code calculation is sufficient if each object name is unique.
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object object)
        Compares this identifier with the given object for equality.
        Overrides:
        equals in class Object
        Parameters:
        object - the object to compare with this SimpleIdentifiedObject.
        Returns:
        true if the given object is equals to this object.
      • toString

        public String toString()
        Returns a string representation of the name identifier. The default implementation build the string representation as below:
        • If this identifier has a code space, then returns the concatenation of the code space, the ':' character, then the code.
        • Otherwise returns the code directly.
        Overrides:
        toString in class Object