Class DefaultEvent
java.lang.Object
org.apache.sis.metadata.AbstractMetadata
org.apache.sis.metadata.ModifiableMetadata
org.apache.sis.metadata.iso.ISOMetadata
org.apache.sis.metadata.iso.acquisition.DefaultEvent
- All Implemented Interfaces:
Serializable
,Emptiable
,LenientComparable
,IdentifiedObject
,org.opengis.metadata.acquisition.Event
Identification of a significant collection point within an operation.
The following properties are mandatory in a well-formed metadata according ISO 19115:
MI_Event
├─identifier……
Event name or number.
│ └─code…………
Alphanumeric value identifying an instance in the namespace.
├─trigger……………
Initiator of the event.
├─context……………
Meaning of the event.
├─sequence…………
Relative time ordering of the event.
└─time……………………
Time the event occurred.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.3
- 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 org.opengis.metadata.acquisition.Context
Meaning of the event.private Collection
<org.opengis.metadata.acquisition.Objective> Objective or objectives satisfied by an event.private org.opengis.metadata.acquisition.PlatformPass
Pass during which an event occurs.private Collection
<org.opengis.metadata.acquisition.Instrument> Instrument or instruments for which the event is meaningful.private org.opengis.metadata.acquisition.Sequence
Relative time ordering of the event.private static final long
Serial number for inter-operability with different versions.private long
Time the event occurred, orLong.MIN_VALUE
if none.private org.opengis.metadata.acquisition.Trigger
Initiator of the event.Fields inherited from class org.apache.sis.metadata.iso.ISOMetadata
identifiers
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an initially empty acquisition information.DefaultEvent
(org.opengis.metadata.acquisition.Event object) Constructs a new instance initialized with the values from the specified metadata object. -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultEvent
castOrCopy
(org.opengis.metadata.acquisition.Event object) Returns a SIS metadata implementation with the values of the given arbitrary implementation.org.opengis.metadata.acquisition.Context
Meaning of the event.Collection
<org.opengis.metadata.acquisition.Objective> Returns the objective or objectives satisfied by an event.org.opengis.metadata.Identifier
Returns the event name or number.org.opengis.metadata.acquisition.PlatformPass
Returns the pass during which an event occurs.Collection
<? extends org.opengis.metadata.acquisition.Instrument> Returns the instrument or instruments for which the event is meaningful.org.opengis.metadata.acquisition.Sequence
Returns the relative time ordering of the event.getTime()
Returns the time the event occurred.org.opengis.metadata.acquisition.Trigger
Returns the initiator of the event.void
setContext
(org.opengis.metadata.acquisition.Context newValue) Sets the meaning of the event.void
setExpectedObjectives
(Collection<? extends org.opengis.metadata.acquisition.Objective> newValues) Sets the objective or objectives satisfied by an event.void
setIdentifier
(org.opengis.metadata.Identifier newValue) Sets the event name or number.void
setRelatedPass
(org.opengis.metadata.acquisition.PlatformPass newValue) Sets the pass during which an event occurs.void
setRelatedSensors
(Collection<? extends org.opengis.metadata.acquisition.Instrument> newValues) Sets the instrument or instruments for which the event is meaningful.void
setSequence
(org.opengis.metadata.acquisition.Sequence newValue) Sets the relative time ordering of the event.void
Sets the time the event occurred.void
setTrigger
(org.opengis.metadata.acquisition.Trigger newValue) Sets the initiator of the event.Methods inherited from class org.apache.sis.metadata.iso.ISOMetadata
getIdentifierMap, getIdentifiers, getStandard, 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 inter-operability with different versions.- See Also:
-
trigger
private org.opengis.metadata.acquisition.Trigger triggerInitiator of the event. -
context
private org.opengis.metadata.acquisition.Context contextMeaning of the event. -
sequence
private org.opengis.metadata.acquisition.Sequence sequenceRelative time ordering of the event. -
time
private long timeTime the event occurred, orLong.MIN_VALUE
if none. -
expectedObjectives
Objective or objectives satisfied by an event.
-
-
Constructor Details
-
DefaultEvent
public DefaultEvent()Constructs an initially empty acquisition information. -
DefaultEvent
public DefaultEvent(org.opengis.metadata.acquisition.Event object) 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.- See Also:
-
-
Method Details
-
castOrCopy
Returns a SIS metadata implementation with the values of the given arbitrary implementation. This method performs the first applicable action in the following choices:- If the given object is
null
, then this method returnsnull
. - Otherwise if the given object is already an instance of
DefaultEvent
, then it is returned unchanged. - Otherwise a new
DefaultEvent
instance is created using the copy constructor and returned. Note that this is a shallow copy operation, because the other metadata contained in the given object are not recursively copied.
- Parameters:
object
- the object to get as a SIS implementation, ornull
if none.- Returns:
- a SIS implementation containing the values of the given object (may be the
given object itself), or
null
if the argument was null.
- If the given object is
-
getIdentifier
public org.opengis.metadata.Identifier getIdentifier()Returns the event name or number.- Specified by:
getIdentifier
in interfaceorg.opengis.metadata.acquisition.Event
- Overrides:
getIdentifier
in classISOMetadata
- Returns:
- event name or number, or
null
.
-
setIdentifier
public void setIdentifier(org.opengis.metadata.Identifier newValue) Sets the event name or number.- Overrides:
setIdentifier
in classISOMetadata
- Parameters:
newValue
- the event identifier value.
-
getTrigger
public org.opengis.metadata.acquisition.Trigger getTrigger()Returns the initiator of the event.- Specified by:
getTrigger
in interfaceorg.opengis.metadata.acquisition.Event
- Returns:
- initiator of the event, or
null
.
-
setTrigger
public void setTrigger(org.opengis.metadata.acquisition.Trigger newValue) Sets the initiator of the event.- Parameters:
newValue
- the new trigger value.
-
getContext
public org.opengis.metadata.acquisition.Context getContext()Meaning of the event.- Specified by:
getContext
in interfaceorg.opengis.metadata.acquisition.Event
- Returns:
- meaning of the event, or
null
.
-
setContext
public void setContext(org.opengis.metadata.acquisition.Context newValue) Sets the meaning of the event.- Parameters:
newValue
- the new context value.
-
getSequence
public org.opengis.metadata.acquisition.Sequence getSequence()Returns the relative time ordering of the event.- Specified by:
getSequence
in interfaceorg.opengis.metadata.acquisition.Event
- Returns:
- relative time ordering, or
null
.
-
setSequence
public void setSequence(org.opengis.metadata.acquisition.Sequence newValue) Sets the relative time ordering of the event.- Parameters:
newValue
- the new sequence value.
-
getTime
Returns the time the event occurred.- Specified by:
getTime
in interfaceorg.opengis.metadata.acquisition.Event
- Returns:
- time the event occurred, or
null
.
-
setTime
Sets the time the event occurred.- Parameters:
newValue
- the new time value.
-
getExpectedObjectives
Returns the objective or objectives satisfied by an event.- Specified by:
getExpectedObjectives
in interfaceorg.opengis.metadata.acquisition.Event
- Returns:
- objectives satisfied by an event.
-
setExpectedObjectives
public void setExpectedObjectives(Collection<? extends org.opengis.metadata.acquisition.Objective> newValues) Sets the objective or objectives satisfied by an event.- Parameters:
newValues
- the new expected objectives values.
-
getRelatedPass
public org.opengis.metadata.acquisition.PlatformPass getRelatedPass()Returns the pass during which an event occurs.null
if unspecified.- Specified by:
getRelatedPass
in interfaceorg.opengis.metadata.acquisition.Event
- Returns:
- pass during which an event occurs, or
null
.
-
setRelatedPass
public void setRelatedPass(org.opengis.metadata.acquisition.PlatformPass newValue) Sets the pass during which an event occurs.- Parameters:
newValue
- the new platform pass value.
-
getRelatedSensors
Returns the instrument or instruments for which the event is meaningful.- Specified by:
getRelatedSensors
in interfaceorg.opengis.metadata.acquisition.Event
- Returns:
- instruments for which the event is meaningful.
-
setRelatedSensors
public void setRelatedSensors(Collection<? extends org.opengis.metadata.acquisition.Instrument> newValues) Sets the instrument or instruments for which the event is meaningful.- Parameters:
newValues
- the new instrument values.
-