Package org.apache.sis.metadata.iso
Class DefaultExtendedElementInformation
java.lang.Object
org.apache.sis.metadata.AbstractMetadata
org.apache.sis.metadata.ModifiableMetadata
org.apache.sis.metadata.iso.ISOMetadata
org.apache.sis.metadata.iso.DefaultExtendedElementInformation
- All Implemented Interfaces:
Serializable
,Emptiable
,LenientComparable
,IdentifiedObject
,org.opengis.metadata.ExtendedElementInformation
@TitleProperty(name="name")
public class DefaultExtendedElementInformation
extends ISOMetadata
implements org.opengis.metadata.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_ExtendedElementInformation
├─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.
├─dataType……………………………………………
Code which identifies the kind of value provided in the extended element.
├─maximumOccurrence……………………
Maximum occurrence of the extended element.
├─domainValue……………………………………
Valid values that can be assigned to the extended element.
├─parentEntity…………………………………
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
- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.metadata.ModifiableMetadata
ModifiableMetadata.State
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.opengis.util.InternationalString
Condition under which the extended element is mandatory.private org.opengis.metadata.Datatype
Code which identifies the kind of value provided in the extended element.private org.opengis.util.InternationalString
Definition of the extended element.private Integer
Deprecated.private org.opengis.util.InternationalString
Valid values that can be assigned to the extended element.private Integer
Maximum occurrence of the extended element.private String
Name of the extended metadata element.private org.opengis.metadata.Obligation
Obligation of the extended element.private Collection
<String> Name of the metadata entity(s) under which this extended metadata element may appear.private Collection
<org.opengis.util.InternationalString> Reason for creating the extended element.private org.opengis.util.InternationalString
Specifies how the extended element relates to other existing elements and entities.private static final long
Serial number for inter-operability with different versions.private String
Deprecated.private Collection
<org.opengis.metadata.citation.ResponsibleParty> Name of the person or organization creating the extended element.Fields inherited from class org.apache.sis.metadata.iso.ISOMetadata
identifiers
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct an initially empty extended element information.DefaultExtendedElementInformation
(String name, CharSequence definition, CharSequence condition, org.opengis.metadata.Datatype dataType, String parentEntity, CharSequence rule, org.opengis.metadata.citation.ResponsibleParty source) Create an extended element information initialized to the given values.DefaultExtendedElementInformation
(org.opengis.metadata.ExtendedElementInformation object) Constructs a new instance initialized with the values from the specified metadata object. -
Method Summary
Modifier and TypeMethodDescriptioncastOrCopy
(org.opengis.metadata.ExtendedElementInformation object) Returns a SIS metadata implementation with the values of the given arbitrary implementation.org.opengis.util.InternationalString
Condition under which the extended element is mandatory.org.opengis.metadata.Datatype
Code which identifies the kind of value provided in the extended element.org.opengis.util.InternationalString
Definition of the extended element.Deprecated.Removed as of ISO 19115:2014.org.opengis.util.InternationalString
Valid values that can be assigned to the extended element.Maximum occurrence of the extended element.private String
Returns the maximum occurrence as a string, since it is the way that ISO 19115 represents this information.getName()
Name of the extended metadata element.org.opengis.metadata.Obligation
Obligation of the extended element.Name of the metadata entity(s) under which this extended metadata element may appear.org.opengis.util.InternationalString
Returns the reason for creating the extended element.Collection
<org.opengis.util.InternationalString> Deprecated.As of ISO 19115:2014, replaced bygetRationale()
.org.opengis.util.InternationalString
getRule()
Specifies how the extended element relates to other existing elements and entities.Deprecated.Removed as of ISO 19115:2014.Collection
<org.opengis.metadata.citation.ResponsibleParty> Name of the person or organization creating the extended element.void
setCondition
(org.opengis.util.InternationalString newValue) Sets the condition under which the extended element is mandatory.void
setDataType
(org.opengis.metadata.Datatype newValue) Sets the code which identifies the kind of value provided in the extended element.void
setDefinition
(org.opengis.util.InternationalString newValue) Sets the definition of the extended element.void
setDomainCode
(Integer newValue) Deprecated.Removed as of ISO 19115:2014.void
setDomainValue
(org.opengis.util.InternationalString newValue) Sets the valid values that can be assigned to the extended element.void
setMaximumOccurrence
(Integer newValue) Sets the maximum occurrence of the extended element.private void
setMaxOccurs
(String value) Sets the maximum occurrence from a string.void
Sets the name of the extended metadata element.void
setObligation
(org.opengis.metadata.Obligation newValue) Sets the obligation of the extended element.void
setParentEntity
(Collection<? extends String> newValues) Sets the name of the metadata entity(s) under which this extended metadata element may appear.void
setRationale
(org.opengis.util.InternationalString newValue) Sets the reason for creating the extended element.void
setRationales
(Collection<? extends org.opengis.util.InternationalString> newValues) Deprecated.As of ISO 19115:2014, replaced bysetRationale(InternationalString)
.void
setRule
(org.opengis.util.InternationalString newValue) Sets how the extended element relates to other existing elements and entities.void
setShortName
(String newValue) Deprecated.Removed as of ISO 19115:2014.void
setSources
(Collection<? extends org.opengis.metadata.citation.ResponsibleParty> newValues) Sets the name of the person or organization creating the extended element.Methods inherited from class org.apache.sis.metadata.iso.ISOMetadata
getIdentifier, getIdentifierMap, getIdentifiers, getStandard, setIdentifier, transitionTo
Methods inherited from class org.apache.sis.metadata.ModifiableMetadata
checkWritePermission, collectionType, copyCollection, copyList, copyMap, copySet, deepCopy, nonNullCollection, nonNullList, nonNullMap, nonNullSet, singleton, state, writeCollection, writeList, writeMap, writeSet
Methods inherited from class org.apache.sis.metadata.AbstractMetadata
asMap, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, prune, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for inter-operability with different versions.- See Also:
-
name
Name of the extended metadata element. -
shortName
Deprecated.Short form suitable for use in an implementation method such as XML or SGML. -
domainCode
Deprecated.Three digit code assigned to the extended element. Non-null only if the data type is code list element. -
definition
private org.opengis.util.InternationalString definitionDefinition of the extended element. -
obligation
private org.opengis.metadata.Obligation obligationObligation of the extended element. -
condition
private org.opengis.util.InternationalString conditionCondition under which the extended element is mandatory. Non-null value only if the obligation is conditional. -
dataType
private org.opengis.metadata.Datatype dataTypeCode which identifies the kind of value provided in the extended element. -
maximumOccurrence
Maximum occurrence of the extended element. Returnsnull
if it doesn't apply, for example if the data type is enumeration, code list or code list element. -
domainValue
private org.opengis.util.InternationalString domainValueValid values that can be assigned to the extended element. Returnsnull
if it doesn't apply, for example if the data type is enumeration, code list or code list element. -
parentEntity
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). -
rule
private org.opengis.util.InternationalString ruleSpecifies how the extended element relates to other existing elements and entities. -
rationales
Reason for creating the extended element. -
sources
Name of the person or organization creating the extended element.
-
-
Constructor Details
-
DefaultExtendedElementInformation
public DefaultExtendedElementInformation()Construct an initially empty extended element information. -
DefaultExtendedElementInformation
public DefaultExtendedElementInformation(String name, CharSequence definition, CharSequence condition, org.opengis.metadata.Datatype dataType, String parentEntity, CharSequence rule, org.opengis.metadata.citation.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.dataType
- the code which identifies the kind of value provided in the extended element.parentEntity
- 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(org.opengis.metadata.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, ornull
if none.- See Also:
-
-
Method Details
-
castOrCopy
public static DefaultExtendedElementInformation castOrCopy(org.opengis.metadata.ExtendedElementInformation object) 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 returnsnull
. - Otherwise if the given object is already an instance of
DefaultExtendedElementInformation
, then it is returned unchanged. - Otherwise a new
DefaultExtendedElementInformation
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, ornull
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.
- If the given object is
-
getName
Name of the extended metadata element.- Specified by:
getName
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- name of the extended metadata element, or
null
.
-
setName
Sets the name of the extended metadata element.- Parameters:
newValue
- the new name.
-
getShortName
Deprecated.Removed as of ISO 19115:2014.Short form suitable for use in an implementation method such as XML or SGML.- Specified by:
getShortName
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- short form suitable for use in an implementation method such as XML or SGML, or
null
.
-
setShortName
Deprecated.Removed as of ISO 19115:2014.Sets a short form suitable for use in an implementation method such as XML or SGML.- Parameters:
newValue
- the new short name.
-
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:
getDomainCode
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- three digit code assigned to the extended element, or
null
.
-
setDomainCode
Deprecated.Removed as of ISO 19115:2014.Sets a three digit code assigned to the extended element.- Parameters:
newValue
- the new domain code.
-
getDefinition
public org.opengis.util.InternationalString getDefinition()Definition of the extended element.- Specified by:
getDefinition
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- definition of the extended element, or
null
.
-
setDefinition
public void setDefinition(org.opengis.util.InternationalString newValue) Sets the definition of the extended element.- Parameters:
newValue
- the new definition.
-
getObligation
public org.opengis.metadata.Obligation getObligation()Obligation of the extended element.- Specified by:
getObligation
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- obligation of the extended element, or
null
.
-
setObligation
public void setObligation(org.opengis.metadata.Obligation newValue) Sets the obligation of the extended element.- Parameters:
newValue
- the new obligation.
-
getCondition
public org.opengis.util.InternationalString getCondition()Condition under which the extended element is mandatory. Returns a non-null value only if the obligation is conditional.- Specified by:
getCondition
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- the condition under which the extended element is mandatory, or
null
.
-
setCondition
public void setCondition(org.opengis.util.InternationalString newValue) Sets the condition under which the extended element is mandatory.- Parameters:
newValue
- the new condition.
-
getDataType
public org.opengis.metadata.Datatype getDataType()Code which identifies the kind of value provided in the extended element.- Specified by:
getDataType
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- the kind of value provided in the extended element, or
null
.
-
setDataType
public void setDataType(org.opengis.metadata.Datatype newValue) Sets the code which identifies the kind of value provided in the extended element.- Parameters:
newValue
- the new data type.
-
getMaximumOccurrence
Maximum occurrence of the extended element. Returnsnull
if it does not apply, for example if the data type is enumeration, code list or code list element.- Specified by:
getMaximumOccurrence
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- maximum occurrence of the extended element, or
null
.
-
setMaximumOccurrence
Sets the maximum occurrence of the extended element.- Parameters:
newValue
- the new maximum occurrence, ornull
.- Throws:
IllegalArgumentException
- if the given value is negative.
-
getDomainValue
public org.opengis.util.InternationalString getDomainValue()Valid values that can be assigned to the extended element. Returnsnull
if it doesn't apply, for example if the data type is enumeration, code list or code list element.- Specified by:
getDomainValue
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- valid values that can be assigned to the extended element, or
null
.
-
setDomainValue
public void setDomainValue(org.opengis.util.InternationalString newValue) Sets the valid values that can be assigned to the extended element.- Parameters:
newValue
- the new domain value.
-
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:
getParentEntity
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- name of the metadata entity(s) under which this extended metadata element may appear.
-
setParentEntity
Sets the name of the metadata entity(s) under which this extended metadata element may appear.- Parameters:
newValues
- the new parent entity.
-
getRule
public org.opengis.util.InternationalString getRule()Specifies how the extended element relates to other existing elements and entities.- Specified by:
getRule
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- how the extended element relates to other existing elements and entities, or
null
.
-
setRule
public void setRule(org.opengis.util.InternationalString newValue) Sets how the extended element relates to other existing elements and entities.- Parameters:
newValue
- the new rule.
-
getRationale
@UML(identifier="rationale", obligation=OPTIONAL, specification=ISO_19115) public org.opengis.util.InternationalString 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(org.opengis.util.InternationalString newValue) Sets the reason for creating the extended element.- Parameters:
newValue
- the new rationale.- Since:
- 0.5
-
getRationales
Deprecated.As of ISO 19115:2014, replaced bygetRationale()
.- Specified by:
getRationales
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- reason for creating the extended element.
-
setRationales
@Deprecated public void setRationales(Collection<? extends org.opengis.util.InternationalString> newValues) Deprecated.As of ISO 19115:2014, replaced bysetRationale(InternationalString)
.- Parameters:
newValues
- the new rationales.
-
getSources
Name of the person or organization creating the extended element.Upcoming API change — generalization
As of ISO 19115:2014,ResponsibleParty
is replaced by theResponsibility
parent interface. This change may be applied in GeoAPI 4.0.- Specified by:
getSources
in interfaceorg.opengis.metadata.ExtendedElementInformation
- Returns:
- name of the person or organization creating the extended element.
-
setSources
public void setSources(Collection<? extends org.opengis.metadata.citation.ResponsibleParty> newValues) Sets the name of the person or organization creating the extended element.Upcoming API change — generalization
As of ISO 19115:2014,ResponsibleParty
is replaced by theResponsibility
parent interface. This change may be applied in GeoAPI 4.0.- Parameters:
newValues
- the new sources.
-
getMaxOccurs
Returns the maximum occurrence as a string, since it is the way that ISO 19115 represents this information. This method is invoked by JAXB at marshalling time. -
setMaxOccurs
Sets the maximum occurrence from a string. This method is invoked by JAXB at unmarshalling time.
-