Class DefaultExtendedElementInformation

Object
AbstractMetadata
ModifiableMetadata
ISOMetadata
DefaultExtendedElementInformation
All Implemented Interfaces:
Serializable, Emptiable, Lenient­Comparable, Identified­Object, Extended­Element­Information

@TitleProperty(name="name") public class DefaultExtendedElementInformation extends ISOMetadata implements ExtendedElementInformation
New metadata element, not found in ISO 19115, which is required to describe geographic data. Metadata elements are contained in a metadata extension information. The following properties are mandatory or conditional (i.e. mandatory under some circumstances) in a well-formed metadata according ISO 19115:
MD_Extended­Element­Information   ├─name……………………………………………………… Name of the extended metadata element.   ├─definition……………………………………… Definition of the extended element.   ├─obligation……………………………………… Obligation of the extended element.   ├─condition………………………………………… Condition under which the extended element is mandatory.   ├─data­Type…………………………………………… Code which identifies the kind of value provided in the extended element.   ├─maximum­Occurrence…………………… Maximum occurrence of the extended element.   ├─domain­Value…………………………………… Valid values that can be assigned to the extended element.   ├─parent­Entity………………………………… Name of the metadata entity(s) under which this extended metadata element may appear.   ├─rule……………………………………………………… Specifies how the extended element relates to other existing elements and entities.   └─source………………………………………………… Name of the person or organisation creating the extended element.       ├─party………………………………………… Information about the parties.       │   └─name………………………………… Name of the party.       └─role…………………………………………… Function performed by the responsible party.

Limitations

  • Instances of this class are not synchronized for multi-threading. Synchronization, if needed, is caller's responsibility.
  • Serialized objects of this class are not guaranteed to be compatible with future Apache SIS releases. Serialization support is appropriate for short term storage or RMI between applications running the same version of Apache SIS. For long term storage, use XML instead.
Since:
0.3
See Also:
  • Constructor Details

    • DefaultExtendedElementInformation

      public DefaultExtendedElementInformation()
      Construct an initially empty extended element information.
    • DefaultExtendedElementInformation

      public DefaultExtendedElementInformation(String name, CharSequence definition, CharSequence condition, Datatype dataType, String parentEntity, CharSequence rule, ResponsibleParty source)
      Create an extended element information initialized to the given values.
      Parameters:
      name - the name of the extended metadata element.
      definition - the definition of the extended element.
      condition - the condition under which the extended element is mandatory.
      data­Type - the code which identifies the kind of value provided in the extended element.
      parent­Entity - the name of the metadata entity(s) under which this extended metadata element may appear.
      rule - how the extended element relates to other existing elements and entities.
      source - the name of the person or organization creating the extended element.
    • DefaultExtendedElementInformation

      public DefaultExtendedElementInformation(ExtendedElementInformation object)
      Constructs a new instance initialized with the values from the specified metadata object. This is a shallow copy constructor, because the other metadata contained in the given object are not recursively copied.

      Note on properties validation

      This constructor does not verify the property values of the given metadata (e.g. whether it contains unexpected negative values). This is because invalid metadata exist in practice, and verifying their validity in this copy constructor is often too late. Note that this is not the only hole, as invalid metadata instances can also be obtained by unmarshalling an invalid XML document.
      Parameters:
      object - the metadata to copy values from, or null if none.
      See Also:
  • Method Details

    • castOrCopy

      Returns a SIS metadata implementation with the values of the given arbitrary implementation. This method performs the first applicable action in the following choices:
      • If the given object is null, then this method returns null.
      • Otherwise if the given object is already an instance of Default­Extended­Element­Information, then it is returned unchanged.
      • Otherwise a new Default­Extended­Element­Information instance is created using the copy constructor and returned. Note that this is a shallow copy operation, because the other metadata contained in the given object are not recursively copied.
      Parameters:
      object - the object to get as a SIS implementation, or null if none.
      Returns:
      a SIS implementation containing the values of the given object (may be the given object itself), or null if the argument was null.
    • getName

      public String getName()
      Name of the extended metadata element.
      Specified by:
      get­Name in interface Extended­Element­Information
      Returns:
      name of the extended metadata element, or null.
    • setName

      public void setName(String newValue)
      Sets the name of the extended metadata element.
      Parameters:
      new­Value - the new name.
    • getShortName

      @Deprecated(since="1.0") public String getShortName()
      Deprecated.
      Removed as of ISO 19115:2014.
      Short form suitable for use in an implementation method such as XML or SGML.
      Specified by:
      get­Short­Name in interface Extended­Element­Information
      Returns:
      short form suitable for use in an implementation method such as XML or SGML, or null.
    • setShortName

      @Deprecated(since="1.0") public void setShortName(String newValue)
      Deprecated.
      Removed as of ISO 19115:2014.
      Sets a short form suitable for use in an implementation method such as XML or SGML.
      Parameters:
      new­Value - the new short name.
    • getDomainCode

      @Deprecated(since="1.0") public Integer getDomainCode()
      Deprecated.
      Removed as of ISO 19115:2014.
      Three digit code assigned to the extended element. Returns a non-null value only if the data type is code list element.
      Specified by:
      get­Domain­Code in interface Extended­Element­Information
      Returns:
      three digit code assigned to the extended element, or null.
    • setDomainCode

      @Deprecated(since="1.0") public void setDomainCode(Integer newValue)
      Deprecated.
      Removed as of ISO 19115:2014.
      Sets a three digit code assigned to the extended element.
      Parameters:
      new­Value - the new domain code.
    • getDefinition

      public InternationalString getDefinition()
      Definition of the extended element.
      Specified by:
      get­Definition in interface Extended­Element­Information
      Returns:
      definition of the extended element, or null.
    • setDefinition

      public void setDefinition(InternationalString newValue)
      Sets the definition of the extended element.
      Parameters:
      new­Value - the new definition.
    • getObligation

      public Obligation getObligation()
      Obligation of the extended element.
      Specified by:
      get­Obligation in interface Extended­Element­Information
      Returns:
      obligation of the extended element, or null.
    • setObligation

      public void setObligation(Obligation newValue)
      Sets the obligation of the extended element.
      Parameters:
      new­Value - the new obligation.
    • getCondition

      public InternationalString getCondition()
      Condition under which the extended element is mandatory. Returns a non-null value only if the obligation is conditional.
      Specified by:
      get­Condition in interface Extended­Element­Information
      Returns:
      the condition under which the extended element is mandatory, or null.
    • setCondition

      public void setCondition(InternationalString newValue)
      Sets the condition under which the extended element is mandatory.
      Parameters:
      new­Value - the new condition.
    • getDataType

      public Datatype getDataType()
      Code which identifies the kind of value provided in the extended element.
      Specified by:
      get­Data­Type in interface Extended­Element­Information
      Returns:
      the kind of value provided in the extended element, or null.
    • setDataType

      public void setDataType(Datatype newValue)
      Sets the code which identifies the kind of value provided in the extended element.
      Parameters:
      new­Value - the new data type.
    • getMaximumOccurrence

      @ValueRange(minimum=0.0) public Integer getMaximumOccurrence()
      Maximum occurrence of the extended element. Returns null if it does not apply, for example if the data type is enumeration, code list or code list element.
      Specified by:
      get­Maximum­Occurrence in interface Extended­Element­Information
      Returns:
      maximum occurrence of the extended element, or null.
    • setMaximumOccurrence

      public void setMaximumOccurrence(Integer newValue)
      Sets the maximum occurrence of the extended element.
      Parameters:
      new­Value - the new maximum occurrence, or null.
      Throws:
      Illegal­Argument­Exception - if the given value is negative.
    • getDomainValue

      public InternationalString getDomainValue()
      Valid values that can be assigned to the extended element. Returns null if it doesn't apply, for example if the data type is enumeration, code list or code list element.
      Specified by:
      get­Domain­Value in interface Extended­Element­Information
      Returns:
      valid values that can be assigned to the extended element, or null.
    • setDomainValue

      public void setDomainValue(InternationalString newValue)
      Sets the valid values that can be assigned to the extended element.
      Parameters:
      new­Value - the new domain value.
    • getParentEntity

      public Collection<String> getParentEntity()
      Name of the metadata entity(s) under which this extended metadata element may appear. The name(s) may be standard metadata element(s) or other extended metadata element(s).
      Specified by:
      get­Parent­Entity in interface Extended­Element­Information
      Returns:
      name of the metadata entity(s) under which this extended metadata element may appear.
    • setParentEntity

      public void setParentEntity(Collection<? extends String> newValues)
      Sets the name of the metadata entity(s) under which this extended metadata element may appear.
      Parameters:
      new­Values - the new parent entity.
    • getRule

      public InternationalString getRule()
      Specifies how the extended element relates to other existing elements and entities.
      Specified by:
      get­Rule in interface Extended­Element­Information
      Returns:
      how the extended element relates to other existing elements and entities, or null.
    • setRule

      public void setRule(InternationalString newValue)
      Sets how the extended element relates to other existing elements and entities.
      Parameters:
      new­Value - the new rule.
    • getRationale

      Returns the reason for creating the extended element.
      Returns:
      reason for creating the extended element, or null.
      Since:
      0.5
    • setRationale

      public void setRationale(InternationalString newValue)
      Sets the reason for creating the extended element.
      Parameters:
      new­Value - the new rationale.
      Since:
      0.5
    • getRationales

      @Deprecated(since="1.0") public Collection<InternationalString> getRationales()
      Deprecated.
      As of ISO 19115:2014, replaced by get­Rationale().
      Specified by:
      get­Rationales in interface Extended­Element­Information
      Returns:
      reason for creating the extended element.
    • setRationales

      @Deprecated(since="1.0") public void setRationales(Collection<? extends InternationalString> newValues)
      Deprecated.
      As of ISO 19115:2014, replaced by set­Rationale(International­String).
      Parameters:
      new­Values - the new rationales.
    • getSources

      public Collection<ResponsibleParty> getSources()
      Name of the person or organization creating the extended element.
      Upcoming API change — generalization
      As of ISO 19115:2014, Responsible­Party is replaced by the Responsibility parent interface. This change may be applied in GeoAPI 4.0.
      Specified by:
      get­Sources in interface Extended­Element­Information
      Returns:
      name of the person or organization creating the extended element.
    • setSources

      public void setSources(Collection<? extends ResponsibleParty> newValues)
      Sets the name of the person or organization creating the extended element.
      Upcoming API change — generalization
      As of ISO 19115:2014, Responsible­Party is replaced by the Responsibility parent interface. This change may be applied in GeoAPI 4.0.
      Parameters:
      new­Values - the new sources.