public class DefaultTemporalExtent extends ISOMetadata implements TemporalExtent
In addition to the standard properties, SIS provides the following methods:
getStartTime()
for fetching the start time from the temporal primitive.getEndTime()
for fetching the end time from the temporal primitive.setBounds(Date, Date)
for setting the extent from the given start and end time.setBounds(Envelope)
for setting the extent from the given envelope.XML
instead.Defined in the sis-metadata
module
identifiers, LOGGER
Constructor and Description |
---|
DefaultTemporalExtent()
Constructs an initially empty temporal extent.
|
DefaultTemporalExtent(TemporalExtent object)
Constructs a new instance initialized with the values from the specified metadata object.
|
Modifier and Type | Method and Description |
---|---|
static DefaultTemporalExtent |
castOrCopy(TemporalExtent object)
Returns a SIS metadata implementation with the values of the given arbitrary implementation.
|
Date |
getEndTime()
Returns the end date and time for the content of the dataset.
|
TemporalPrimitive |
getExtent()
Returns the date and time for the content of the dataset.
|
Date |
getStartTime()
The start date and time for the content of the dataset.
|
void |
setBounds(Date startTime,
Date endTime)
Sets the temporal extent to the specified values.
|
void |
setBounds(Envelope envelope)
Sets this temporal extent to values inferred from the specified envelope.
|
void |
setExtent(TemporalPrimitive newValue)
Sets the date and time for the content of the dataset.
|
getIdentifierMap, getIdentifiers, getStandard
checkWritePermission, clone, collectionType, copyCollection, copyList, copySet, freeze, isModifiable, nonNullCollection, nonNullList, nonNullSet, singleton, unmodifiable, writeCollection, writeList, writeSet
asMap, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, prune, toString
public DefaultTemporalExtent()
public DefaultTemporalExtent(TemporalExtent object)
object
- The metadata to copy values from, or null
if none.castOrCopy(TemporalExtent)
public static DefaultTemporalExtent castOrCopy(TemporalExtent object)
null
, then this method returns null
.SpatialTemporalExtent
,
then this method delegates to the castOrCopy(…)
method of the corresponding
SIS subclass.DefaultTemporalExtent
, then it is returned unchanged.DefaultTemporalExtent
instance is created using the
copy constructor
and returned. Note that this is a shallow copy operation, since the other
metadata 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 TemporalPrimitive getExtent()
getExtent
in interface TemporalExtent
null
.public void setExtent(TemporalPrimitive newValue)
newValue
- The new content date.public Date getStartTime()
null
if none.public Date getEndTime()
null
if none.public void setBounds(Date startTime, Date endTime) throws UnsupportedOperationException
setExtent(TemporalPrimitive)
.
Note: This method is available only if the sis-temporal
module is available on the classpath,
or any other module providing an implementation of the TemporalFactory
interface.
startTime
- The start date and time for the content of the dataset, or null
if none.endTime
- The end date and time for the content of the dataset, or null
if none.UnsupportedOperationException
- If no implementation of TemporalFactory
has been found
on the classpath.public void setBounds(Envelope envelope) throws TransformException
Note: This method is available only if the sis-referencing
module is
available on the classpath.
envelope
- The envelope to use for setting this temporal extent.UnsupportedOperationException
- if the referencing module or the temporal module is not on the classpath.TransformException
- if the envelope can not be transformed to a temporal extent.DefaultExtent.addElements(Envelope)
,
DefaultGeographicBoundingBox.setBounds(Envelope)
,
DefaultVerticalExtent.setBounds(Envelope)
Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.