Package org.ivoa.dm.caom2
Class DeletedObservationEvent
java.lang.Object
org.ivoa.dm.caom2.Entity
org.ivoa.dm.caom2.DeletedObservationEvent
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
@Entity
@VoDml(id="caom2:DeletedObservationEvent",
role=objectType)
public class DeletedObservationEvent
extends Entity
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
an event signifiying that a previously persisted Observation was deleted;
this event can be synchronized to propagate deletions; the Entity.id of the event
is equal to the Entity.id of the deleted observation and this identifier is used
when performing deletions.
objectType: DeletedObservationEvent
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for DeletedObservationEvent, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe logical identifier of the Observation: the Observation.uri value; this is for informational purposes only.Fields inherited from class org.ivoa.dm.caom2.Entity
id, lastModified, metaChecksum, metaProducer -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DeletedObservationEventDeletedObservationEvent(String uri, String id, Date lastModified, String metaChecksum, String metaProducer) full parameter constructor.Copy Constructor.DeletedObservationEvent(Entity superinstance, String uri) Constructor from supertype instance. -
Method Summary
Modifier and TypeMethodDescriptioncopyMe()make a clone of the object taking into account current polymorhic type.static DeletedObservationEventcreate a DeletedObservationEvent in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidgetUri()Returns uri Attribute.voidSet uri Attribute.voidUpdate this object with the content of the given object.fluent setter for uri Attribute.Methods inherited from class org.ivoa.dm.caom2.Entity
getId, getLastModified, getMetaChecksum, getMetaProducer, setId, setLastModified, setMetaChecksum, setMetaProducer, updateUsing, withId, withLastModified, withMetaChecksum, withMetaProducerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getId
-
Field Details
-
uri
@VoDml(id="caom2:DeletedObservationEvent.uri", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String uriThe logical identifier of the Observation: the Observation.uri value; this is for informational purposes only. : Attribute uri : multiplicity 1
-
-
Constructor Details
-
DeletedObservationEvent
public DeletedObservationEvent()Creates a new DeletedObservationEvent -
DeletedObservationEvent
public DeletedObservationEvent(String uri, String id, Date lastModified, String metaChecksum, String metaProducer) full parameter constructor.- Parameters:
uri- The logical identifier of the Observation: the Observation.uri value; this is for informational purposes only.id- The id is a globally unique identifier (primary key) for an instance.lastModified- The timestamp of last modification of this entity tracks changes in metadata and supports incremental operations. The timestamp is intended to be set and/or updated when the entity is stored (e.g. in a database).metaChecksum- This checksum of the metadata in this entity signals a change in the metadata of an instance and supports validation (e.g. to compare metadata before and after serialisation or persistence). A change in the metaChecksum can also be used to optimise operations like updating a row in the database only when the metaChecksum changed. A change in metaChecksum normally triggers a change in the lastModified timestamp. The URI must conform to the pattern {algorithm}:{hex value}, for example: \begin{verbatim}md5:4be91751541fd804e7207663a0822f56.\end{verbatim} The checksum of an entity is computed by accumulating byte representation of individual metadata values in the following order: (1) Entity.id for entities, (2) Entity.metaProducer, (3) state fields in alphabetic order (foo.a comes before foo.b) and using depth-first recursion (foo.abc.x comes before foo.def). The lastModified timestamp is not included in the metaChecksum calculation. Null values are ignored so that the addition of new fields in future versions will not change/invalidate existing checksums. Non-null values are converted to bytes as follows: \begin{itemize} \item string: UTF-8 encoded bytes \item URI: UTF-8 encoded bytes of the string representation \item VocabularyTerm: UTF-8 encoded bytes of the term (do not include the namespace) \item enumeration: the literal value converted to bytes \item float: IEEE754 single (4 bytes) \item double: IEEE754 double (8 bytes) \item boolean: convert to single byte, false=0, true=1 (1 byte) \item byte: as-is (1 byte) \item short: (2 bytes, network byte order == big endian)) \item integer: (4 bytes, network byte order == big endian) \item long: (8 bytes, network byte order == big endian) \item date: treat as a long (milliseconds since 1970-01-01 00:00:00 UTC) \end{itemize} TODO: truncatedDates=false, digestFieldNames=true, digestFieldnamesLowerCase=true TODO: external data model components: recursion or specify conversion above (interval, point, shape, multishape) .metaProducer- This identifier is used to identify the tools used to produce the metadata. It also implicitly applies to child entities with null metaProducer. The form of the URI is not specified; implementations are free to use this to track metadata curation. For example, a pattern like {organisation}:{software name}-{version} is useful to support a variety of operational uses: query for metadata created by a version with a known bug or query for metadata created by an older version of the software and perform updates.
-
DeletedObservationEvent
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
DeletedObservationEvent
Constructor from supertype instance.- Parameters:
superinstance- The supertype.uri- The logical identifier of the Observation: the Observation.uri value; this is for informational purposes only.
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type. -
updateUsing
Update this object with the content of the given object. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
getUri
Returns uri Attribute.- Returns:
- uri Attribute
-
setUri
Set uri Attribute.- Parameters:
pUri- value to set
-
withUri
fluent setter for uri Attribute.- Parameters:
pUri- value to set- Returns:
- DeletedObservationEvent
-
createDeletedObservationEvent
public static DeletedObservationEvent createDeletedObservationEvent(Consumer<DeletedObservationEvent.DeletedObservationEventBuilder> f) create a DeletedObservationEvent in functional builder style.- Parameters:
f- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad() -
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
-