Class NilReferencingObject

java.lang.Object
org.apache.sis.internal.referencing.NilReferencingObject
All Implemented Interfaces:
NilObject, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.ReferenceSystem

public final class NilReferencingObject extends Object implements NilObject, org.opengis.referencing.ReferenceSystem
A referencing object for which every methods return null or a neutral value. This is not a valid object. It is used only for initialization of objects to be used by JAXB at unmarshalling time, as a way to simulate "no-argument" constructor required by JAXB.
Since:
0.4
Version:
0.6
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The unique instance.
    static final org.opengis.referencing.ReferenceIdentifier
    The default name of NilReferencingObject instances.

    Fields inherited from interface org.opengis.referencing.IdentifiedObject

    ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY

    Fields inherited from interface org.opengis.referencing.ReferenceSystem

    DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Do not allow other instantiation of INSTANCE.
  • Method Summary

    Modifier and Type
    Method
    Description
    Collection<org.opengis.util.GenericName>
     
    org.opengis.metadata.extent.Extent
     
    Set<org.opengis.referencing.ReferenceIdentifier>
     
    org.opengis.referencing.ReferenceIdentifier
     
    This object is empty because the value will be provided later.
    org.opengis.util.InternationalString
     
    org.opengis.util.InternationalString
     
    Throws the exception in all cases.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UNNAMED

      public static final org.opengis.referencing.ReferenceIdentifier UNNAMED
      The default name of NilReferencingObject instances. We use this value because IdentifiedObject.getName() is a mandatory property and not all code is tolerant to null name.
      Note: in theory we do not need a default name because it will be replaced by the value of the <gml:name> element anyway at XML unmarshalling time. But not all XML documents are valid, so the <gml:name> may be missing.
      Since:
      0.6
    • INSTANCE

      public static final NilReferencingObject INSTANCE
      The unique instance.
  • Constructor Details

    • NilReferencingObject

      private NilReferencingObject()
      Do not allow other instantiation of INSTANCE.
  • Method Details

    • getNilReason

      public NilReason getNilReason()
      This object is empty because the value will be provided later.
      Specified by:
      getNilReason in interface NilObject
      Returns:
      the reason why this object contains no information.
      See Also:
    • getName

      public org.opengis.referencing.ReferenceIdentifier getName()
      Specified by:
      getName in interface org.opengis.referencing.IdentifiedObject
    • getAlias

      public Collection<org.opengis.util.GenericName> getAlias()
      Specified by:
      getAlias in interface org.opengis.referencing.IdentifiedObject
    • getIdentifiers

      public Set<org.opengis.referencing.ReferenceIdentifier> getIdentifiers()
      Specified by:
      getIdentifiers in interface org.opengis.referencing.IdentifiedObject
    • getRemarks

      public org.opengis.util.InternationalString getRemarks()
      Specified by:
      getRemarks in interface org.opengis.referencing.IdentifiedObject
    • getScope

      public org.opengis.util.InternationalString getScope()
      Specified by:
      getScope in interface org.opengis.referencing.ReferenceSystem
    • getDomainOfValidity

      public org.opengis.metadata.extent.Extent getDomainOfValidity()
      Specified by:
      getDomainOfValidity in interface org.opengis.referencing.ReferenceSystem
    • toWKT

      public String toWKT() throws UnformattableObjectException
      Throws the exception in all cases.
      Specified by:
      toWKT in interface org.opengis.referencing.IdentifiedObject
      Returns:
      never return.
      Throws:
      UnformattableObjectException - always thrown.