Package org.ivoa.dm.caom2
Class Observation
java.lang.Object
org.ivoa.dm.caom2.Entity
org.ivoa.dm.caom2.CaomEntity
org.ivoa.dm.caom2.Observation
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
- Direct Known Subclasses:
DerivedObservation,SimpleObservation
@Entity
@VoDml(id="caom2:Observation",
role=objectType)
public abstract class Observation
extends CaomEntity
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
The observation is the top-level metadata structure that describes astronomical
data in a data collection.
objectType: Observation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AlgorithmThis provides information about the algorithm or process that created this observation.protected StringThe name of the data collection to which this observation belongs.protected EnvironmentInformation about the environmental conditions at the time of observation.protected InstrumentInformation about the instrument or detector used to acquire the data.protected ObservationIntentTypeThis is an enumeration that describes the intent of the original creator of the observation.This is a set of groups with read permission on observation metadata for cases when the metadata is non-public (see metaRelease above).protected DateThis timestamp specifies the point where the metadata for the observation instance is public (can be viewed by anonymous users).The planes within an observation are the different data products that are produced from the observation.protected ProposalInformation about the science proposal that motivated the creation of this observation.protected RequirementsInformation about the observational requirements specified by the observer or proposal and whether this observation satisfies those requirements.protected Integera collection-specific sequence number for observations; re-use or reset is collection specific.protected TargetInformation about the intended target of the observation.protected TargetPositionInformation about the intended target position for this observation.protected TelescopeInformation about the telescope or facility where this observation was created.protected StringThis describes the general purpose of observation (e.g.protected StringA unique logical identifier for this observation.protected StringThis is a short string of hexadecimal digits generated from the uri to support operational use cases (mainly: dividing workload to perform validation in parallel).Fields inherited from class org.ivoa.dm.caom2.CaomEntity
accMetaChecksum, maxLastModifiedFields inherited from class org.ivoa.dm.caom2.Entity
id, lastModified, metaChecksum, metaProducer -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ObservationObservation(String collection, String uri, String uriBucket, Date metaRelease, Integer sequenceNumber, String type, ObservationIntentType intent, List<String> metaReadGroups, Algorithm algorithm, Telescope telescope, Instrument instrument, Environment environment, Proposal proposal, Target target, TargetPosition targetPosition, Requirements requirements, List<Plane> planes, Date maxLastModified, String accMetaChecksum, String id, Date lastModified, String metaChecksum, String metaProducer) full parameter constructor.Observation(Observation other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToPlanes(Plane p) Add a org.ivoa.dm.caom2.Plane to the composition.abstract EntitycopyMe()make a clone of the object taking into account current polymorhic type.voidReturns algorithm Attribute.Returns collection Attribute.Returns environment Attribute.Returns instrument Attribute.Returns intent Attribute.Returns metaReadGroups Attribute.Returns metaRelease Attribute.Returns planes composition as an immutable list.Returns proposal Attribute.Returns requirements Attribute.Returns sequenceNumber Attribute.Returns target Attribute.Returns targetPosition Attribute.Returns telescope Attribute.getType()Returns type Attribute.getUri()Returns uri Attribute.Returns uriBucket Attribute.voidRemove a org.ivoa.dm.caom2.Plane from the composition.voidreplaceInPlanes(Plane _p) update a org.ivoa.dm.caom2.Plane in the composition.voidsetAlgorithm(Algorithm pAlgorithm) Set algorithm Attribute.voidsetCollection(String pCollection) Set collection Attribute.voidsetEnvironment(Environment pEnvironment) Set environment Attribute.voidsetInstrument(Instrument pInstrument) Set instrument Attribute.voidsetIntent(ObservationIntentType pIntent) Set intent Attribute.voidsetMetaReadGroups(List<String> pMetaReadGroups) Set metaReadGroups Attribute.voidsetMetaRelease(Date pMetaRelease) Set metaRelease Attribute.voidDefines whole planes composition.voidsetProposal(Proposal pProposal) Set proposal Attribute.voidsetRequirements(Requirements pRequirements) Set requirements Attribute.voidsetSequenceNumber(Integer pSequenceNumber) Set sequenceNumber Attribute.voidSet target Attribute.voidsetTargetPosition(TargetPosition pTargetPosition) Set targetPosition Attribute.voidsetTelescope(Telescope pTelescope) Set telescope Attribute.voidSet type Attribute.voidSet uri Attribute.voidsetUriBucket(String pUriBucket) Set uriBucket Attribute.voidupdateUsing(Observation other) Update this object with the content of the given object.withAlgorithm(Algorithm pAlgorithm) fluent setter for algorithm Attribute.withCollection(String pCollection) fluent setter for collection Attribute.withEnvironment(Environment pEnvironment) fluent setter for environment Attribute.withInstrument(Instrument pInstrument) fluent setter for instrument Attribute.withIntent(ObservationIntentType pIntent) fluent setter for intent Attribute.withMetaReadGroups(List<String> pMetaReadGroups) fluent setter for metaReadGroups Attribute.withMetaRelease(Date pMetaRelease) fluent setter for metaRelease Attribute.withProposal(Proposal pProposal) fluent setter for proposal Attribute.withRequirements(Requirements pRequirements) fluent setter for requirements Attribute.withSequenceNumber(Integer pSequenceNumber) fluent setter for sequenceNumber Attribute.withTarget(Target pTarget) fluent setter for target Attribute.withTargetPosition(TargetPosition pTargetPosition) fluent setter for targetPosition Attribute.withTelescope(Telescope pTelescope) fluent setter for telescope Attribute.fluent setter for type Attribute.fluent setter for uri Attribute.withUriBucket(String pUriBucket) fluent setter for uriBucket Attribute.Methods inherited from class org.ivoa.dm.caom2.CaomEntity
getAccMetaChecksum, getMaxLastModified, setAccMetaChecksum, setMaxLastModified, updateUsing, withAccMetaChecksum, withMaxLastModifiedMethods 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
delete, getId
-
Field Details
-
collection
@VoDml(id="caom2:Observation.collection", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String collectionThe name of the data collection to which this observation belongs. : Attribute collection : multiplicity 1 -
uri
@VoDml(id="caom2:Observation.uri", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String uriA unique logical identifier for this observation. (NEW in CAOM-2.5) TODO: limit this to one of two forms that support use cases?. : Attribute uri : multiplicity 1 -
uriBucket
@VoDml(id="caom2:Observation.uriBucket", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String uriBucketThis is a short string of hexadecimal digits generated from the uri to support operational use cases (mainly: dividing workload to perform validation in parallel). The value is the first three characters of the hexadecimal representation of SHA-1 of the UTF-8 encoded bytes of the Observation.uri value. (NEW in CAOM-2.5). : Attribute uriBucket : multiplicity 1 -
metaRelease
@VoDml(id="caom2:Observation.metaRelease", role=attribute, type="ivoa:datetime", typeRole=primitiveType) protected Date metaReleaseThis timestamp specifies the point where the metadata for the observation instance is public (can be viewed by anonymous users). A null value means the metadata is nont public. : Attribute metaRelease : multiplicity 0..1 -
sequenceNumber
@VoDml(id="caom2:Observation.sequenceNumber", role=attribute, type="ivoa:integer", typeRole=primitiveType) protected Integer sequenceNumbera collection-specific sequence number for observations; re-use or reset is collection specific. : Attribute sequenceNumber : multiplicity 0..1 -
type
@VoDml(id="caom2:Observation.type", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String typeThis describes the general purpose of observation (e.g. FITS OBSTYPE keyword). Existing usage is usually OBJECT for intent = science and other values for intent = calibration. : Attribute type : multiplicity 0..1 -
intent
@VoDml(id="caom2:Observation.intent", role=attribute, type="caom2:ObservationIntentType", typeRole=enumeration) protected ObservationIntentType intentThis is an enumeration that describes the intent of the original creator of the observation. : Attribute intent : multiplicity 1 -
metaReadGroups
@VoDml(id="caom2:Observation.metaReadGroups", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected List<String> metaReadGroupsThis is a set of groups with read permission on observation metadata for cases when the metadata is non-public (see metaRelease above). : Attribute metaReadGroups : multiplicity 0..* -
algorithm
@VoDml(id="caom2:Observation.algorithm", role=composition, type="caom2:Algorithm", typeRole=objectType) protected Algorithm algorithmThis provides information about the algorithm or process that created this observation. composition algorithm : ( Multiplicity : 1 ) -
telescope
@VoDml(id="caom2:Observation.telescope", role=composition, type="caom2:Telescope", typeRole=objectType) protected Telescope telescopeInformation about the telescope or facility where this observation was created. composition telescope : ( Multiplicity : 0..1 ) -
instrument
@VoDml(id="caom2:Observation.instrument", role=composition, type="caom2:Instrument", typeRole=objectType) protected Instrument instrumentInformation about the instrument or detector used to acquire the data. composition instrument : ( Multiplicity : 0..1 ) -
environment
@VoDml(id="caom2:Observation.environment", role=composition, type="caom2:Environment", typeRole=objectType) protected Environment environmentInformation about the environmental conditions at the time of observation. composition environment : ( Multiplicity : 0..1 ) -
proposal
@VoDml(id="caom2:Observation.proposal", role=composition, type="caom2:Proposal", typeRole=objectType) protected Proposal proposalInformation about the science proposal that motivated the creation of this observation. composition proposal : ( Multiplicity : 0..1 ) -
target
@VoDml(id="caom2:Observation.target", role=composition, type="caom2:Target", typeRole=objectType) protected Target targetInformation about the intended target of the observation. composition target : ( Multiplicity : 0..1 ) -
targetPosition
@VoDml(id="caom2:Observation.targetPosition", role=composition, type="caom2:TargetPosition", typeRole=objectType) protected TargetPosition targetPositionInformation about the intended target position for this observation. This may differ from the coordinates of the target object itself. composition targetPosition : ( Multiplicity : 0..1 ) -
requirements
@VoDml(id="caom2:Observation.requirements", role=composition, type="caom2:Requirements", typeRole=objectType) protected Requirements requirementsInformation about the observational requirements specified by the observer or proposal and whether this observation satisfies those requirements. composition requirements : ( Multiplicity : 0..1 ) -
planes
@VoDml(id="caom2:Observation.planes", role=composition, type="caom2:Plane", typeRole=objectType) protected List<Plane> planesThe planes within an observation are the different data products that are produced from the observation. For SimpleObservation, there are usually different planes for raw data, calibrated data, etc. composition planes : ( Multiplicity : 0..* )
-
-
Constructor Details
-
Observation
public Observation()Creates a new Observation -
Observation
public Observation(String collection, String uri, String uriBucket, Date metaRelease, Integer sequenceNumber, String type, ObservationIntentType intent, List<String> metaReadGroups, Algorithm algorithm, Telescope telescope, Instrument instrument, Environment environment, Proposal proposal, Target target, TargetPosition targetPosition, Requirements requirements, List<Plane> planes, Date maxLastModified, String accMetaChecksum, String id, Date lastModified, String metaChecksum, String metaProducer) full parameter constructor.- Parameters:
collection- The name of the data collection to which this observation belongs.uri- A unique logical identifier for this observation. (NEW in CAOM-2.5) TODO: limit this to one of two forms that support use cases?.uriBucket- This is a short string of hexadecimal digits generated from the uri to support operational use cases (mainly: dividing workload to perform validation in parallel). The value is the first three characters of the hexadecimal representation of SHA-1 of the UTF-8 encoded bytes of the Observation.uri value. (NEW in CAOM-2.5).metaRelease- This timestamp specifies the point where the metadata for the observation instance is public (can be viewed by anonymous users). A null value means the metadata is nont public.sequenceNumber- a collection-specific sequence number for observations; re-use or reset is collection specific.type- This describes the general purpose of observation (e.g. FITS OBSTYPE keyword). Existing usage is usually OBJECT for intent = science and other values for intent = calibration.intent- This is an enumeration that describes the intent of the original creator of the observation.metaReadGroups- This is a set of groups with read permission on observation metadata for cases when the metadata is non-public (see metaRelease above).algorithm- This provides information about the algorithm or process that created this observation.telescope- Information about the telescope or facility where this observation was created.instrument- Information about the instrument or detector used to acquire the data.environment- Information about the environmental conditions at the time of observation.proposal- Information about the science proposal that motivated the creation of this observation.target- Information about the intended target of the observation.targetPosition- Information about the intended target position for this observation. This may differ from the coordinates of the target object itself.requirements- Information about the observational requirements specified by the observer or proposal and whether this observation satisfies those requirements.planes- The planes within an observation are the different data products that are produced from the observation. For SimpleObservation, there are usually different planes for raw data, calibrated data, etc.maxLastModified- The maximum last modification timestamp of this entity and all child entities is used to support incremental synchronization (of Observation instances). As with the instance lastModified timestamp above, this timestamp is intended to be set and/or updated when the entity is stored (e.g. in a database).accMetaChecksum- accumulated checksum of the metadata of this entity and all child entities; The URI must conform to the pattern {algorithm}:{hex value}, for example: \begin{verbatim}md5:4be91751541fd804e7207663a0822f56.\end{verbatim} The accumulated checksum of an entity is computed by accumulating the byte representation of entity checksums in the following order: (1) the metaChecksum of the current entity, (2) the accMetaChecksum of all child entities accumulated in order of the child's Entity.id. For an entity with no children, the accMetaChecksum is derived only from the metaChecksum but it is not equal to it because it is a checksum of that checksum and not a checksum of the same metadata directly.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.
-
Observation
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type.- Specified by:
copyMein classCaomEntity- Returns:
- the cloned object.
-
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.
-
getCollection
Returns collection Attribute.- Returns:
- collection Attribute
-
setCollection
Set collection Attribute.- Parameters:
pCollection- value to set
-
withCollection
fluent setter for collection Attribute.- Parameters:
pCollection- value to set- Returns:
- Observation
-
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:
- Observation
-
getUriBucket
Returns uriBucket Attribute.- Returns:
- uriBucket Attribute
-
setUriBucket
Set uriBucket Attribute.- Parameters:
pUriBucket- value to set
-
withUriBucket
fluent setter for uriBucket Attribute.- Parameters:
pUriBucket- value to set- Returns:
- Observation
-
getMetaRelease
Returns metaRelease Attribute.- Returns:
- metaRelease Attribute
-
setMetaRelease
Set metaRelease Attribute.- Parameters:
pMetaRelease- value to set
-
withMetaRelease
fluent setter for metaRelease Attribute.- Parameters:
pMetaRelease- value to set- Returns:
- Observation
-
getSequenceNumber
Returns sequenceNumber Attribute.- Returns:
- sequenceNumber Attribute
-
setSequenceNumber
Set sequenceNumber Attribute.- Parameters:
pSequenceNumber- value to set
-
withSequenceNumber
fluent setter for sequenceNumber Attribute.- Parameters:
pSequenceNumber- value to set- Returns:
- Observation
-
getType
Returns type Attribute.- Returns:
- type Attribute
-
setType
Set type Attribute.- Parameters:
pType- value to set
-
withType
fluent setter for type Attribute.- Parameters:
pType- value to set- Returns:
- Observation
-
getIntent
Returns intent Attribute.- Returns:
- intent Attribute
-
setIntent
Set intent Attribute.- Parameters:
pIntent- value to set
-
withIntent
fluent setter for intent Attribute.- Parameters:
pIntent- value to set- Returns:
- Observation
-
getMetaReadGroups
Returns metaReadGroups Attribute.- Returns:
- metaReadGroups Attribute
-
setMetaReadGroups
Set metaReadGroups Attribute.- Parameters:
pMetaReadGroups- value to set
-
withMetaReadGroups
fluent setter for metaReadGroups Attribute.- Parameters:
pMetaReadGroups- value to set- Returns:
- Observation
-
getAlgorithm
Returns algorithm Attribute.- Returns:
- algorithm Attribute
-
setAlgorithm
Set algorithm Attribute.- Parameters:
pAlgorithm- value to set
-
withAlgorithm
fluent setter for algorithm Attribute.- Parameters:
pAlgorithm- value to set- Returns:
- Observation
-
getTelescope
Returns telescope Attribute.- Returns:
- telescope Attribute
-
setTelescope
Set telescope Attribute.- Parameters:
pTelescope- value to set
-
withTelescope
fluent setter for telescope Attribute.- Parameters:
pTelescope- value to set- Returns:
- Observation
-
getInstrument
Returns instrument Attribute.- Returns:
- instrument Attribute
-
setInstrument
Set instrument Attribute.- Parameters:
pInstrument- value to set
-
withInstrument
fluent setter for instrument Attribute.- Parameters:
pInstrument- value to set- Returns:
- Observation
-
getEnvironment
Returns environment Attribute.- Returns:
- environment Attribute
-
setEnvironment
Set environment Attribute.- Parameters:
pEnvironment- value to set
-
withEnvironment
fluent setter for environment Attribute.- Parameters:
pEnvironment- value to set- Returns:
- Observation
-
getProposal
Returns proposal Attribute.- Returns:
- proposal Attribute
-
setProposal
Set proposal Attribute.- Parameters:
pProposal- value to set
-
withProposal
fluent setter for proposal Attribute.- Parameters:
pProposal- value to set- Returns:
- Observation
-
getTarget
Returns target Attribute.- Returns:
- target Attribute
-
setTarget
Set target Attribute.- Parameters:
pTarget- value to set
-
withTarget
fluent setter for target Attribute.- Parameters:
pTarget- value to set- Returns:
- Observation
-
getTargetPosition
Returns targetPosition Attribute.- Returns:
- targetPosition Attribute
-
setTargetPosition
Set targetPosition Attribute.- Parameters:
pTargetPosition- value to set
-
withTargetPosition
fluent setter for targetPosition Attribute.- Parameters:
pTargetPosition- value to set- Returns:
- Observation
-
getRequirements
Returns requirements Attribute.- Returns:
- requirements Attribute
-
setRequirements
Set requirements Attribute.- Parameters:
pRequirements- value to set
-
withRequirements
fluent setter for requirements Attribute.- Parameters:
pRequirements- value to set- Returns:
- Observation
-
getPlanes
Returns planes composition as an immutable list.- Returns:
- planes composition.
-
setPlanes
Defines whole planes composition.- Parameters:
pPlanes- composition to set.
-
addToPlanes
Add a org.ivoa.dm.caom2.Plane to the composition.- Parameters:
p- org.ivoa.dm.caom2.Plane to add
-
removeFromPlanes
Remove a org.ivoa.dm.caom2.Plane from the composition.- Parameters:
p- org.ivoa.dm.caom2.Plane to remove
-
replaceInPlanes
update a org.ivoa.dm.caom2.Plane in the composition.- Parameters:
_p- org.ivoa.dm.caom2.Plane to update the match is done via the database key
-
forceLoad
public void forceLoad()- Specified by:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations- Overrides:
forceLoadin classCaomEntity
-