Class DefaultAssociatedResource
java.lang.Object
org.apache.sis.metadata.AbstractMetadata
org.apache.sis.metadata.ModifiableMetadata
org.apache.sis.metadata.iso.ISOMetadata
org.apache.sis.metadata.iso.identification.DefaultAssociatedResource
- All Implemented Interfaces:
Serializable
,Emptiable
,LenientComparable
,IdentifiedObject
- Direct Known Subclasses:
DefaultAggregateInformation
@UML(identifier="MD_AssociatedResource",
specification=ISO_19115)
public class DefaultAssociatedResource
extends ISOMetadata
Associated resource information.
The following properties are mandatory or conditional (i.e. mandatory under some circumstances)
in a well-formed metadata according ISO 19115:
According ISO 19115, at least one of name and
metadata reference shall be provided.
MD_AssociatedResource
├─associationType…………
Type of relation between the resources.
├─metadataReference……
Reference to the metadata of the associated resource.
│ ├─title…………………………
Name by which the cited resource is known.
│ └─date……………………………
Reference date for the cited resource.
└─name………………………………………
Citation information about the associated resource.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.5
- 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.metadata.identification.AssociationType
Type of relation between the resources.private org.opengis.metadata.identification.InitiativeType
Type of initiative under which the associated resource was produced.private org.opengis.metadata.citation.Citation
Reference to the metadata of the associated resource.private org.opengis.metadata.citation.Citation
Citation information about the associated resource.private static final long
Serial number for compatibility with different versions.Fields inherited from class org.apache.sis.metadata.iso.ISOMetadata
identifiers
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an initially empty associated resource.Constructs a new instance initialized with the values from the specified metadata object.DefaultAssociatedResource
(org.opengis.metadata.citation.Citation name, org.opengis.metadata.identification.AssociationType associationType) Constructs an associated resource initialized to the specified values.DefaultAssociatedResource
(org.opengis.metadata.identification.AggregateInformation object) Constructs a new instance initialized with the values from the specified metadata object. -
Method Summary
Modifier and TypeMethodDescription(package private) static DefaultAssociatedResource
castOrCopy
(org.opengis.metadata.identification.AggregateInformation object) Returns a SIS metadata implementation with the values of the given arbitrary implementation.org.opengis.metadata.identification.AssociationType
Returns the type of relation between the resources.org.opengis.metadata.identification.InitiativeType
Returns the type of initiative under which the associated resource was produced, ornull
if none.org.opengis.metadata.citation.Citation
Return a reference to the metadata of the associated resource, ornull
if none.org.opengis.metadata.citation.Citation
getName()
Returns citation information about the associated resource, ornull
if none.void
setAssociationType
(org.opengis.metadata.identification.AssociationType newValue) Sets the type of relation between the resources.void
setInitiativeType
(org.opengis.metadata.identification.InitiativeType newValue) Sets a new type of initiative under which the associated resource was produced.void
setMetadataReference
(org.opengis.metadata.citation.Citation newValue) Sets the reference to the metadata of the associated resource.void
setName
(org.opengis.metadata.citation.Citation newValue) Sets citation information about the associated resource.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 compatibility with different versions.- See Also:
-
name
private org.opengis.metadata.citation.Citation nameCitation information about the associated resource. -
associationType
private org.opengis.metadata.identification.AssociationType associationTypeType of relation between the resources. -
initiativeType
private org.opengis.metadata.identification.InitiativeType initiativeTypeType of initiative under which the associated resource was produced. -
metadataReference
private org.opengis.metadata.citation.Citation metadataReferenceReference to the metadata of the associated resource.
-
-
Constructor Details
-
DefaultAssociatedResource
public DefaultAssociatedResource()Constructs an initially empty associated resource. -
DefaultAssociatedResource
public DefaultAssociatedResource(org.opengis.metadata.citation.Citation name, org.opengis.metadata.identification.AssociationType associationType) Constructs an associated resource initialized to the specified values.- Parameters:
name
- citation information about the associated resource.associationType
- type of relation between the resources.
-
DefaultAssociatedResource
DefaultAssociatedResource(DefaultAssociatedResource object) Constructs a new instance initialized with the values from the specified metadata object. This is a constructor forDefaultAggregateInformation
constructor only.- Parameters:
object
- The metadata to copy values from.
-
DefaultAssociatedResource
DefaultAssociatedResource(org.opengis.metadata.identification.AggregateInformation 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.- Parameters:
object
- the metadata to copy values from, ornull
if none.
-
-
Method Details
-
castOrCopy
static DefaultAssociatedResource castOrCopy(org.opengis.metadata.identification.AggregateInformation object) Returns a SIS metadata implementation with the values of the given arbitrary implementation.- 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.
-
getName
@UML(identifier="name", obligation=CONDITIONAL, specification=ISO_19115) public org.opengis.metadata.citation.Citation getName()Returns citation information about the associated resource, ornull
if none.- Returns:
- Citation information about the associated resource, or
null
if none.
-
setName
public void setName(org.opengis.metadata.citation.Citation newValue) Sets citation information about the associated resource.- Parameters:
newValue
- the new citation information, ornull
.
-
getAssociationType
@UML(identifier="associationType", obligation=MANDATORY, specification=ISO_19115) public org.opengis.metadata.identification.AssociationType getAssociationType()Returns the type of relation between the resources.- Returns:
- type of relation between the resources.
-
setAssociationType
public void setAssociationType(org.opengis.metadata.identification.AssociationType newValue) Sets the type of relation between the resources.- Parameters:
newValue
- the new type of relation.
-
getInitiativeType
@UML(identifier="initiativeType", obligation=OPTIONAL, specification=ISO_19115) public org.opengis.metadata.identification.InitiativeType getInitiativeType()Returns the type of initiative under which the associated resource was produced, ornull
if none.- Returns:
- the type of initiative under which the associated resource was produced, or
null
if none.
-
setInitiativeType
public void setInitiativeType(org.opengis.metadata.identification.InitiativeType newValue) Sets a new type of initiative under which the associated resource was produced.- Parameters:
newValue
- the new type of initiative.
-
getMetadataReference
@UML(identifier="metadataReference", obligation=CONDITIONAL, specification=ISO_19115) public org.opengis.metadata.citation.Citation getMetadataReference()Return a reference to the metadata of the associated resource, ornull
if none.- Returns:
- reference to the metadata of the associated resource, or
null
if none.
-
setMetadataReference
public void setMetadataReference(org.opengis.metadata.citation.Citation newValue) Sets the reference to the metadata of the associated resource.- Parameters:
newValue
- the new reference to the metadata.
-