public class AbstractDatum extends AbstractIdentifiedObject implements Datum
Default instead.
Datum instances created using only SIS factories
and static constants can be shared by many objects and passed between threads without synchronization.AbstractCS,
AbstractCRS,
Serialized FormDefined in the sis-referencing module
DEPRECATED_KEY, LOCALE_KEYANCHOR_POINT_KEY, DOMAIN_OF_VALIDITY_KEY, REALIZATION_EPOCH_KEY, SCOPE_KEYALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDatum(Datum datum)
Creates a new datum with the same values than the specified one.
|
|
AbstractDatum(Map<String,?> properties)
Creates a datum from the given properties.
|
| Modifier and Type | Method and Description |
|---|---|
static AbstractDatum |
castOrCopy(Datum object)
Returns a SIS datum implementation with the values of the given arbitrary implementation.
|
protected long |
computeHashCode()
Invoked by
hashCode() for computing the hash code when first needed. |
boolean |
equals(Object object,
ComparisonMode mode)
Compares the specified object with this datum for equality.
|
protected String |
formatTo(Formatter formatter)
Formats the inner part of the Well Known Text (WKT) representation for this datum.
|
InternationalString |
getAnchorPoint()
Returns a description of the point(s) used to anchor the datum to the Earth.
|
Extent |
getDomainOfValidity()
Returns the region or timeframe in which this datum is valid, or
null if unspecified. |
Class<? extends Datum> |
getInterface()
Returns the GeoAPI interface implemented by this class.
|
Date |
getRealizationEpoch()
The time after which this datum definition is valid.
|
InternationalString |
getScope()
Returns the domain or limitations of usage, or
null if unspecified. |
boolean |
isHeuristicMatchForName(String name)
Returns
true if either the primary name or at least
one alias matches the given string according heuristic rules. |
castOrCopy, equals, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecatedprint, toString, toString, toWKTclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAlias, getIdentifiers, getName, getRemarks, toWKTpublic AbstractDatum(Map<String,?> properties)
| Property name | Value type | Returned by |
|---|---|---|
| "anchorPoint" | InternationalString or String |
getAnchorPoint() |
| "realizationEpoch" | Date |
getRealizationEpoch() |
| "domainOfValidity" | Extent |
getDomainOfValidity() |
| "scope" | InternationalString or String |
getScope() |
| Defined in parent class (reminder) | ||
| "name" | ReferenceIdentifier or String |
AbstractIdentifiedObject.getName() |
| "alias" | GenericName or CharSequence (optionally as array) |
AbstractIdentifiedObject.getAlias() |
| "identifiers" | ReferenceIdentifier (optionally as array) |
AbstractIdentifiedObject.getIdentifiers() |
| "remarks" | InternationalString or String |
AbstractIdentifiedObject.getRemarks() |
properties - the properties to be given to the identified object.protected AbstractDatum(Datum datum)
This constructor performs a shallow copy, i.e. the properties are not cloned.
datum - the datum to copy.public static AbstractDatum castOrCopy(Datum object)
null, then this method returns null.GeodeticDatum,
VerticalDatum,
TemporalDatum,
EngineeringDatum or
ImageDatum,
then this method delegates to the castOrCopy(…) method of the corresponding SIS subclass.
Note that if the given object implements more than one of the above-cited interfaces,
then the castOrCopy(…) method to be used is unspecified.AbstractDatum, then it is returned unchanged.AbstractDatum instance is created using the
copy constructor
and returned. Note that this is a shallow copy operation, since the other
properties contained in the given object are not recursively copied.object - the object to get as a SIS implementation, or null if none.null if the argument was null.public Class<? extends Datum> getInterface()
Datum.class.
Subclasses implementing a more specific GeoAPI interface shall override this method.getInterface in class AbstractIdentifiedObjectpublic InternationalString getAnchorPoint()
getAnchorPoint in interface Datumpublic Date getRealizationEpoch()
If an old datum is superseded by a new datum, then the realization epoch for the new datum defines the upper limit for the validity of the old datum.
getRealizationEpoch in interface Datumnull if none.public Extent getDomainOfValidity()
null if unspecified.getDomainOfValidity in interface Datumnull.DefaultExtentpublic InternationalString getScope()
null if unspecified.public boolean isHeuristicMatchForName(String name)
true if either the primary name or at least
one alias matches the given string according heuristic rules.
This method performs the comparison documented in the
super-class,
with the following additional flexibility:
"D_" prefix (used in ESRI datum names), if presents in the given name or in this datum name,
is ignored.DefaultGeodeticDatum, then the prime meridian name may also
be ignored.isHeuristicMatchForName in class AbstractIdentifiedObjectname - the name to compare.true if the primary name or at least one alias matches the specified name.IdentifiedObjects.isHeuristicMatchForName(IdentifiedObject, String),
Characters.Filter.LETTERS_AND_DIGITSpublic boolean equals(Object object, ComparisonMode mode)
mode argument value is STRICT or
BY_CONTRACT, then all available properties are compared including the
anchor point, realization epoch,
domain of validity and the scope.equals in interface LenientComparableequals in class AbstractIdentifiedObjectobject - the object to compare to this.mode - STRICT for performing a strict comparison, or
IGNORE_METADATA for comparing only
properties relevant to coordinate transformations.true if both objects are equal.AbstractIdentifiedObject.computeHashCode(),
Utilities.deepEquals(Object, Object, ComparisonMode)protected long computeHashCode()
hashCode() for computing the hash code when first needed.
See AbstractIdentifiedObject.computeHashCode()
for more information.computeHashCode in class AbstractIdentifiedObjectprotected String formatTo(Formatter formatter)
AbstractIdentifiedObject.formatTo(Formatter) for more information.formatTo in class AbstractIdentifiedObjectformatter - the formatter where to format the inner content of this WKT element.null if unknown.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.