public class DefaultTemporalDatum extends AbstractDatum implements TemporalDatum
TemporalDatum
from one of the static convenience shortcuts listed in
CommonCRS.Temporal.datum()
.TemporalDatum
from an identifier in a database by invoking
DatumAuthorityFactory.createTemporalDatum(String)
.TemporalDatum
by invoking the DatumFactory.createTemporalDatum(…)
method,
(implemented for example by GeodeticObjectFactory
).DefaultTemporalDatum
by invoking the
constructor.TemporalDatum datum = CommonCRS.Temporal.JULIAN.datum();
CommonCRS.Temporal.datum()
,
DefaultTimeCS
,
DefaultTemporalCRS
,
Serialized FormDefined in the sis-referencing
module
DEPRECATED_KEY, LOCALE_KEY
ANCHOR_POINT_KEY, DOMAIN_OF_VALIDITY_KEY, REALIZATION_EPOCH_KEY, SCOPE_KEY
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Modifier | Constructor and Description |
---|---|
|
DefaultTemporalDatum(Map<String,?> properties,
Date origin)
Creates a temporal datum from the given properties.
|
protected |
DefaultTemporalDatum(TemporalDatum datum)
Creates a new datum with the same values than the specified one.
|
Modifier and Type | Method and Description |
---|---|
static DefaultTemporalDatum |
castOrCopy(TemporalDatum object)
Returns a SIS datum implementation with the same values than 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 this temporal datum with the specified object for equality.
|
protected String |
formatTo(Formatter formatter)
Formats this datum as a Well Known Text
TimeDatum[…] element. |
Class<? extends TemporalDatum> |
getInterface()
Returns the GeoAPI interface implemented by this class.
|
Date |
getOrigin()
Returns the date and time origin of this temporal datum.
|
castOrCopy, getAnchorPoint, getDomainOfValidity, getRealizationEpoch, getScope, isHeuristicMatchForName
castOrCopy, equals, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated
print, toString, toString, toWKT
getAnchorPoint, getRealizationEpoch
getDomainOfValidity, getScope
getAlias, getIdentifiers, getName, getRemarks, toWKT
public DefaultTemporalDatum(Map<String,?> properties, Date origin)
Property name | Value type | Returned by |
---|---|---|
"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() |
"anchorPoint" | InternationalString or String |
AbstractDatum.getAnchorPoint() |
"realizationEpoch" | Date |
AbstractDatum.getRealizationEpoch() |
"domainOfValidity" | Extent |
AbstractDatum.getDomainOfValidity() |
"scope" | InternationalString or String |
AbstractDatum.getScope() |
properties
- The properties to be given to the identified object.origin
- The date and time origin of this temporal datum.protected DefaultTemporalDatum(TemporalDatum datum)
This constructor performs a shallow copy, i.e. the properties are not cloned.
datum
- The datum to copy.castOrCopy(TemporalDatum)
public static DefaultTemporalDatum castOrCopy(TemporalDatum object)
null
, then this method returns null
.
Otherwise if the given object is already a SIS implementation, then the given object is returned unchanged.
Otherwise a new SIS implementation is created and initialized to the attribute values of the given object.object
- The object to get as a SIS implementation, or null
if none.null
if the argument was null.public Class<? extends TemporalDatum> getInterface()
TemporalDatum.class
.
TemporalDatum
sub-interface. Overriding possibility is left mostly for implementors who wish to extend GeoAPI with their
own set of interfaces.getInterface
in class AbstractDatum
TemporalDatum.class
or a user-defined sub-interface.public Date getOrigin()
getOrigin
in interface TemporalDatum
public boolean equals(Object object, ComparisonMode mode)
equals
in interface LenientComparable
equals
in class AbstractDatum
object
- 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 AbstractDatum
protected String formatTo(Formatter formatter)
TimeDatum[…]
element.
TimeDatum
is defined in the WKT 2 specification only.formatTo
in class AbstractDatum
formatter
- The formatter where to format the inner content of this WKT element."TimeDatum"
.Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.