Class DefaultCoupledResource
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.DefaultCoupledResource
- All Implemented Interfaces:
Serializable
,Emptiable
,LenientComparable
,IdentifiedObject
@UML(identifier="SV_CoupledResource",
specification=ISO_19115)
public class DefaultCoupledResource
extends ISOMetadata
Links a given operation name with a resource identified by an "identifier".
Note on International Standard versions
This class is derived from a new type defined in the ISO 19115 international standard published in 2014, while GeoAPI 3.0 is based on the version published in 2003. Consequently this implementation class does not yet implement a GeoAPI interface, but is expected to do so after the next GeoAPI releases. When the interface will become available, all references to this implementation class in Apache SIS will be replaced be references to the
This class is derived from a new type defined in the ISO 19115 international standard published in 2014, while GeoAPI 3.0 is based on the version published in 2003. Consequently this implementation class does not yet implement a GeoAPI interface, but is expected to do so after the next GeoAPI releases. When the interface will become available, all references to this implementation class in Apache SIS will be replaced be references to the
CoupledResource
interface.
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 DefaultOperationMetadata
The service operation.private Collection<org.opengis.metadata.citation.Citation>
References to the resource on which the services operates.private Collection<org.opengis.metadata.identification.DataIdentification>
The tightly coupled resources.private org.opengis.util.ScopedName
Scoped identifier of the resource in the context of the given service instance.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 coupled resource.Constructs a new instance initialized with the values from the specified metadata object.DefaultCoupledResource
(org.opengis.util.ScopedName name, org.opengis.metadata.citation.Citation reference, org.opengis.metadata.identification.DataIdentification resource, DefaultOperationMetadata operation) Constructs a new coupled resource initialized to the specified values. -
Method Summary
Modifier and TypeMethodDescriptionprivate String
getId()
Returns the resource identifier, which is assumed to be the name as a string.private String
Returns the<gco:ScopedName>
element to marshal in legacy ISO 19139:2007 element.Returns the service operation.private String
For JAXB marshalling of ISO 19139:2007 document only (XML based on legacy ISO 19115:2003 model).private Collection<org.opengis.metadata.identification.DataIdentification>
Invoked by JAXB at both marshalling and unmarshalling time.private Collection<org.opengis.metadata.citation.Citation>
Invoked by JAXB at both marshalling and unmarshalling time.Collection<org.opengis.metadata.citation.Citation>
Returns references to the resource on which the services operates.Collection<org.opengis.metadata.identification.DataIdentification>
Returns the tightly coupled resources.org.opengis.util.ScopedName
Returns scoped identifier of the resource in the context of the given service instance.private void
setLegacyName
(String value) Invoked by JAXB when unmarshalling a legacy ISO 19139:2007 documents.void
setOperation
(DefaultOperationMetadata newValue) Sets a new service operation.private void
setOperationName
(String name) For JAXB unmarhalling of ISO 19139:2007 document only.void
setResourceReferences
(Collection<? extends org.opengis.metadata.citation.Citation> newValues) Sets references to the resource on which the services operates.void
setResources
(Collection<? extends org.opengis.metadata.identification.DataIdentification> newValues) Sets the tightly coupled resources.void
setScopedName
(org.opengis.util.ScopedName newValue) Sets the identifier of the resource in the context of the given service instance.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:
-
scopedName
private org.opengis.util.ScopedName scopedNameScoped identifier of the resource in the context of the given service instance. -
resourceReferences
References to the resource on which the services operates. -
resources
The tightly coupled resources. -
operation
The service operation.
-
-
Constructor Details
-
DefaultCoupledResource
public DefaultCoupledResource()Constructs an initially empty coupled resource. -
DefaultCoupledResource
public DefaultCoupledResource(org.opengis.util.ScopedName name, org.opengis.metadata.citation.Citation reference, org.opengis.metadata.identification.DataIdentification resource, DefaultOperationMetadata operation) Constructs a new coupled resource initialized to the specified values.- Parameters:
name
- scoped identifier of the resource in the context of the given service instance.reference
- reference to the reference to the resource on which the services operates.resource
- the tightly coupled resource.operation
- the service operation.
-
DefaultCoupledResource
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
-
getScopedName
@UML(identifier="scopedName", obligation=OPTIONAL, specification=ISO_19115) public org.opengis.util.ScopedName getScopedName()Returns scoped identifier of the resource in the context of the given service instance.- Returns:
- identifier of the resource, or
null
if none.
-
setScopedName
public void setScopedName(org.opengis.util.ScopedName newValue) Sets the identifier of the resource in the context of the given service instance.- Parameters:
newValue
- the new identifier of the resource.
-
getResourceReferences
@UML(identifier="resourceReference", obligation=OPTIONAL, specification=ISO_19115) public Collection<org.opengis.metadata.citation.Citation> getResourceReferences()Returns references to the resource on which the services operates.- Returns:
- references to the resource on which the services operates.
-
setResourceReferences
public void setResourceReferences(Collection<? extends org.opengis.metadata.citation.Citation> newValues) Sets references to the resource on which the services operates.- Parameters:
newValues
- the new references to the resource on which the services operates.
-
getResources
@UML(identifier="resource", obligation=OPTIONAL, specification=ISO_19115) public Collection<org.opengis.metadata.identification.DataIdentification> getResources()Returns the tightly coupled resources.- Returns:
- tightly coupled resources.
-
setResources
public void setResources(Collection<? extends org.opengis.metadata.identification.DataIdentification> newValues) Sets the tightly coupled resources.- Parameters:
newValues
- the new tightly coupled resources.
-
getOperation
@UML(identifier="operation", obligation=OPTIONAL, specification=ISO_19115) public DefaultOperationMetadata getOperation()Returns the service operation.Upcoming API change — generalization
The return type will be changed to theOperationMetadata
interface when GeoAPI will provide it (tentatively in GeoAPI 3.1).- Returns:
- the service operation, or
null
if none.
-
setOperation
Sets a new service operation.Upcoming API change — generalization
The argument type will be changed to theOperationMetadata
interface when GeoAPI will provide it (tentatively in GeoAPI 3.1).- Parameters:
newValue
- the new service operation.
-
getOperationName
For JAXB marshalling of ISO 19139:2007 document only (XML based on legacy ISO 19115:2003 model). -
setOperationName
For JAXB unmarhalling of ISO 19139:2007 document only. Setsoperation
to a temporaryOperationName
placeholder. That temporary instance will be replaced by the real one when the enclosingDefaultServiceIdentification
is unmarshalled. -
getId
Returns the resource identifier, which is assumed to be the name as a string. Used in legacy ISO 19139:2007 documents. There is no setter method; we expect the XML to declare<srv:operationName>
instead. -
getLegacyName
Returns the<gco:ScopedName>
element to marshal in legacy ISO 19139:2007 element. The<srv:scopedName>
element wrapper (note the lower-case "s") was missing in that legacy specification. This departure from ISO patterns has been fixed in ISO 19115-3:2016.Note that the namespace is "http://standards.iso.org/iso/19115/-3/gco/1.0" rather than "http://www.isotc211.org/2005/gco" because this is the namespace of the
ScopedName
type, not the namespace of a property inSV_CoupledResource
. -
setLegacyName
Invoked by JAXB when unmarshalling a legacy ISO 19139:2007 documents. -
getResourceReference
Invoked by JAXB at both marshalling and unmarshalling time. This attribute has been added by ISO 19115:2014 standard. If (and only if) marshalling an older standard version, we omit this attribute. -
getResource
Invoked by JAXB at both marshalling and unmarshalling time. This attribute has been added by ISO 19115:2014 standard. If (and only if) marshalling an older standard version, we omit this attribute.
-