Class ReferenceSystemMetadata
java.lang.Object
org.apache.sis.internal.simple.SimpleIdentifiedObject
org.apache.sis.internal.jaxb.metadata.replace.ReferenceSystemMetadata
- All Implemented Interfaces:
Serializable,LenientComparable,org.opengis.referencing.IdentifiedObject,org.opengis.referencing.ReferenceSystem
- Direct Known Subclasses:
DirectReferenceSystem,IndirectReferenceSystem
public class ReferenceSystemMetadata
extends SimpleIdentifiedObject
implements org.opengis.referencing.ReferenceSystem
An implementation of
ReferenceSystem marshalled as specified in ISO 19115.
This is different than the ReferenceSystem implementation provided in the
referencing module, since the latter marshals the CRS as specified in GML (close
to ISO 19111 model). This class contains only CRS identification as below:
The referenceSystemType attribute is currently missing.
See SIS-470.
Note that this implementation is very simple and serves no other purpose than being
a container for XML parsing or formatting. For real referencing service, consider using
AbstractReferenceSystem subclasses instead.
- Since:
- 0.3
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleantrueif marshalling ISO 19115:2003 model, orfalseif marshalling ISO 19115:2014 model.private static final longFor cross-version compatibility.Fields inherited from class org.apache.sis.internal.simple.SimpleIdentifiedObject
nameFields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEYFields inherited from interface org.opengis.referencing.ReferenceSystem
DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY -
Constructor Summary
ConstructorsConstructorDescriptionCreates a reference system without identifier.ReferenceSystemMetadata(org.opengis.referencing.ReferenceIdentifier name) Creates a new reference system from the given identifier.ReferenceSystemMetadata(org.opengis.referencing.ReferenceSystem crs) Creates a new reference system from the given one. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidbeforeMarshal(Marshaller marshaller) Invoked by JAXBMarshallerbefore this object is marshalled to XML.booleanequals(Object object, ComparisonMode mode) Compares this object with the given one for equality.final org.opengis.referencing.ReferenceIdentifiergetName()Returns the primary name by which this object is identified.final voidsetName(org.opengis.referencing.ReferenceIdentifier name) Sets the primary name by which this object is identified.Methods inherited from class org.apache.sis.internal.simple.SimpleIdentifiedObject
equals, getAlias, getDomainOfValidity, getIdentifiers, getRemarks, getScope, hashCode, toString, toWKTMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getRemarks, toWKTMethods inherited from interface org.opengis.referencing.ReferenceSystem
getDomainOfValidity, getScope
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
isLegacyMetadata
private boolean isLegacyMetadatatrueif marshalling ISO 19115:2003 model, orfalseif marshalling ISO 19115:2014 model.
-
-
Constructor Details
-
ReferenceSystemMetadata
public ReferenceSystemMetadata()Creates a reference system without identifier. This constructor is mainly for JAXB. -
ReferenceSystemMetadata
public ReferenceSystemMetadata(org.opengis.referencing.ReferenceSystem crs) Creates a new reference system from the given one.- Parameters:
crs- the reference system to partially copy.
-
ReferenceSystemMetadata
public ReferenceSystemMetadata(org.opengis.referencing.ReferenceIdentifier name) Creates a new reference system from the given identifier.- Parameters:
name- the primary name by which this object is identified.
-
-
Method Details
-
beforeMarshal
Invoked by JAXBMarshallerbefore this object is marshalled to XML. -
getName
public final org.opengis.referencing.ReferenceIdentifier getName()Returns the primary name by which this object is identified. This method can be invoked during ISO 19115-3 marshalling.- Specified by:
getNamein interfaceorg.opengis.referencing.IdentifiedObject- Overrides:
getNamein classSimpleIdentifiedObject- Returns:
- the identifier given at construction time.
-
setName
public final void setName(org.opengis.referencing.ReferenceIdentifier name) Sets the primary name by which this object is identified.- Parameters:
name- the new primary name.
-
equals
Compares this object with the given one for equality.- Specified by:
equalsin interfaceLenientComparable- Overrides:
equalsin classSimpleIdentifiedObject- Parameters:
object- the object to compare with this reference system.mode- the strictness level of the comparison.- Returns:
trueif both objects are equal.- See Also:
-