Class DefaultExtendedElementInformation
Object
AbstractMetadata
ModifiableMetadata
ISOMetadata
DefaultExtendedElementInformation
- All Implemented Interfaces:
Serializable, Emptiable, LenientComparable, IdentifiedObject, ExtendedElementInformation
@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_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
XMLinstead.
- Since:
- 0.3
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ModifiableMetadata
ModifiableMetadata.StateModifier and TypeClassDescriptionstatic enumWhether the metadata is still editable or has been made final. -
Field Summary
Fields inherited from class ISOMetadata
identifiersModifier and TypeFieldDescriptionprotected Collection<Identifier> All identifiers associated with this metadata, ornullif none. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct an initially empty extended element information.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.Constructs a new instance initialized with the values from the specified metadata object. -
Method Summary
Modifier and TypeMethodDescriptionReturns a SIS metadata implementation with the values of the given arbitrary implementation.Condition under which the extended element is mandatory.Code which identifies the kind of value provided in the extended element.Definition of the extended element.Deprecated.Removed as of ISO 19115:2014.Valid values that can be assigned to the extended element.Maximum occurrence of the extended element.getName()Name of the extended metadata element.Obligation of the extended element.Name of the metadata entity(s) under which this extended metadata element may appear.Returns the reason for creating the extended element.Deprecated.As of ISO 19115:2014, replaced bygetRationale().getRule()Specifies how the extended element relates to other existing elements and entities.Deprecated.Removed as of ISO 19115:2014.Name of the person or organization creating the extended element.voidsetCondition(InternationalString newValue) Sets the condition under which the extended element is mandatory.voidsetDataType(Datatype newValue) Sets the code which identifies the kind of value provided in the extended element.voidsetDefinition(InternationalString newValue) Sets the definition of the extended element.voidsetDomainCode(Integer newValue) Deprecated.Removed as of ISO 19115:2014.voidsetDomainValue(InternationalString newValue) Sets the valid values that can be assigned to the extended element.voidsetMaximumOccurrence(Integer newValue) Sets the maximum occurrence of the extended element.voidSets the name of the extended metadata element.voidsetObligation(Obligation newValue) Sets the obligation of the extended element.voidsetParentEntity(Collection<? extends String> newValues) Sets the name of the metadata entity(s) under which this extended metadata element may appear.voidsetRationale(InternationalString newValue) Sets the reason for creating the extended element.voidsetRationales(Collection<? extends InternationalString> newValues) Deprecated.As of ISO 19115:2014, replaced bysetRationale(InternationalString).voidsetRule(InternationalString newValue) Sets how the extended element relates to other existing elements and entities.voidsetShortName(String newValue) Deprecated.Removed as of ISO 19115:2014.voidsetSources(Collection<? extends ResponsibleParty> newValues) Sets the name of the person or organization creating the extended element.Methods inherited from class ISOMetadata
getIdentifier, getIdentifierMap, getIdentifiers, getStandard, setIdentifierModifier and TypeMethodDescriptionprotected IdentifierReturns the first identifier which is presumed to be defined by ISO 19115 conceptual model.A map view of the identifiers collection as (authority, code) entries.Returns all identifiers associated with this object (from conceptual model and from XML document).Returns the metadata standard implemented by subclasses, which is ISO 19115.protected voidsetIdentifier(Identifier newValue) Sets the identifier for metadata objects that are expected to contain at most one ISO 19115 identifier.Methods inherited from class ModifiableMetadata
checkWritePermission, copyCollection, copyList, copyMap, copySet, deepCopy, merge, nonNullCollection, nonNullList, nonNullMap, nonNullSet, singleton, state, writeCollection, writeList, writeMap, writeSetModifier and TypeMethodDescriptionprotected voidcheckWritePermission(Object current) Checks if changes in the metadata are allowed.protected static <E> Collection<E> copyCollection(Collection<? extends E> source, Class<E> elementType) Creates a list or set with the content of thesourcecollection, or returnsnullif the source isnullor empty.protected static <E> List<E> copyList(Collection<? extends E> source, Class<E> elementType) Creates a list with the content of thesourcecollection, or returnsnullif the source isnullor empty.protected static <K,V> Map <K, V> Creates a map with the content of thesourcemap, or returnsnullif the source isnullor empty.protected static <E> Set<E> copySet(Collection<? extends E> source, Class<E> elementType) Creates a set with the content of thesourcecollection, or returnsnullif the source isnullor empty.deepCopy(ModifiableMetadata.State target) Copies (if necessary) this metadata and all its children.voidMerges the data from the given source into this metadata.protected final <E> Collection<E> nonNullCollection(Collection<E> current, Class<E> elementType) Returns the specified collection, or a new one ifcurrentis null.protected final <E> List<E> nonNullList(List<E> current, Class<E> elementType) Returns the specified list, or a new one ifcurrentis null.protected final <K,V> Map <K, V> nonNullMap(Map<K, V> current, Class<K> keyType) Returns the specified map, or a new one ifcurrentis null.protected final <E> Set<E> nonNullSet(Set<E> current, Class<E> elementType) Returns the specified set, or a new one ifcurrentis null.protected static <E> Collection<E> Creates a singleton list or set containing only the given value, if non-null.state()Tells whether this instance of metadata is editable.protected final <E> Collection<E> writeCollection(Collection<? extends E> source, Collection<E> target, Class<E> elementType) Writes the content of thesourcecollection into thetargetlist or set, creating it if needed.protected final <E> List<E> writeList(Collection<? extends E> source, List<E> target, Class<E> elementType) Writes the content of thesourcecollection into thetargetlist, creating it if needed.protected final <K,V> Map <K, V> Writes the content of thesourcemap into thetargetmap, creating it if needed.protected final <E> Set<E> writeSet(Collection<? extends E> source, Set<E> target, Class<E> elementType) Writes the content of thesourcecollection into thetargetset, creating it if needed.Methods inherited from class AbstractMetadata
asMap, asTreeTable, clone, equals, equals, getInterface, getStandardType, hashCode, isEmpty, nilReasons, prune, toStringModifier and TypeMethodDescriptionasMap()Returns a view of the property values in aMap.Returns the property types and values as a tree table.protected AbstractMetadataclone()Returns a shallow clone of this metadata.final booleanPerforms a strict comparison of this metadata with the given object.booleanequals(Object object, ComparisonMode mode) Compares this metadata with the specified object for equality.final Class<?> Deprecated, for removal: This API element is subject to removal in a future version.RenamedAbstractMetadata.getStandardType()for integration withLenientComparable.Returns the metadata interface implemented by this class.intComputes a hash code value for this metadata using Java reflection.booleanisEmpty()Returns a view of the reasons why some properties are missing.voidprune()Removes all references to empty properties.Returns a string representation of this metadata.
-
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.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
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, ornullif 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 returnsnull. - Otherwise if the given object is already an instance of
DefaultExtendedElementInformation, then it is returned unchanged. - Otherwise a new
DefaultExtendedElementInformationinstance 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, ornullif none.- Returns:
- a SIS implementation containing the values of the given object (may be the
given object itself), or
nullif the argument was null.
- If the given object is
-
getName
Name of the extended metadata element.- Specified by:
getNamein interfaceExtendedElementInformation- 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:
getShortNamein interfaceExtendedElementInformation- 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:
getDomainCodein interfaceExtendedElementInformation- 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
Definition of the extended element.- Specified by:
getDefinitionin interfaceExtendedElementInformation- Returns:
- definition of the extended element, or
null.
-
setDefinition
Sets the definition of the extended element.- Parameters:
newValue- the new definition.
-
getObligation
Obligation of the extended element.- Specified by:
getObligationin interfaceExtendedElementInformation- Returns:
- obligation of the extended element, or
null.
-
setObligation
Sets the obligation of the extended element.- Parameters:
newValue- the new obligation.
-
getCondition
Condition under which the extended element is mandatory. Returns a non-null value only if the obligation is conditional.- Specified by:
getConditionin interfaceExtendedElementInformation- Returns:
- the condition under which the extended element is mandatory, or
null.
-
setCondition
Sets the condition under which the extended element is mandatory.- Parameters:
newValue- the new condition.
-
getDataType
Code which identifies the kind of value provided in the extended element.- Specified by:
getDataTypein interfaceExtendedElementInformation- Returns:
- the kind of value provided in the extended element, or
null.
-
setDataType
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. Returnsnullif it does not apply, for example if the data type is enumeration, code list or code list element.- Specified by:
getMaximumOccurrencein interfaceExtendedElementInformation- 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
Valid values that can be assigned to the extended element. Returnsnullif it doesn't apply, for example if the data type is enumeration, code list or code list element.- Specified by:
getDomainValuein interfaceExtendedElementInformation- Returns:
- valid values that can be assigned to the extended element, or
null.
-
setDomainValue
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:
getParentEntityin interfaceExtendedElementInformation- 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
Specifies how the extended element relates to other existing elements and entities.- Specified by:
getRulein interfaceExtendedElementInformation- Returns:
- how the extended element relates to other existing elements and entities, or
null.
-
setRule
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 InternationalString getRationale()Returns the reason for creating the extended element.- Returns:
- reason for creating the extended element, or
null. - Since:
- 0.5
-
setRationale
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().Description copied from interface:ExtendedElementInformationReason for creating the extended element.- Specified by:
getRationalesin interfaceExtendedElementInformation- 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 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,ResponsiblePartyis replaced by theResponsibilityparent interface. This change may be applied in GeoAPI 4.0.- Specified by:
getSourcesin interfaceExtendedElementInformation- Returns:
- name of the person or organization creating the extended element.
-
setSources
Sets the name of the person or organization creating the extended element.Upcoming API change — generalization
As of ISO 19115:2014,ResponsiblePartyis replaced by theResponsibilityparent interface. This change may be applied in GeoAPI 4.0.- Parameters:
newValues- the new sources.
-