Class 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 Details

    • collection

      @VoDml(id="caom2:Observation.collection", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String collection
      The 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 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?. : Attribute uri : multiplicity 1
    • uriBucket

      @VoDml(id="caom2:Observation.uriBucket", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String 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). : Attribute uriBucket : multiplicity 1
    • metaRelease

      @VoDml(id="caom2:Observation.metaRelease", role=attribute, type="ivoa:datetime", typeRole=primitiveType) protected Date 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. : Attribute metaRelease : multiplicity 0..1
    • sequenceNumber

      @VoDml(id="caom2:Observation.sequenceNumber", role=attribute, type="ivoa:integer", typeRole=primitiveType) protected Integer sequenceNumber
      a 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 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. : Attribute type : multiplicity 0..1
    • intent

      @VoDml(id="caom2:Observation.intent", role=attribute, type="caom2:ObservationIntentType", typeRole=enumeration) protected ObservationIntentType intent
      This 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> metaReadGroups
      This 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 algorithm
      This 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 telescope
      Information 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 instrument
      Information 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 environment
      Information 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 proposal
      Information 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 target
      Information 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 targetPosition
      Information 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 requirements
      Information 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> 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. 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

      public Observation(Observation other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
  • Method Details

    • copyMe

      public abstract Entity copyMe()
      make a clone of the object taking into account current polymorhic type.
      Specified by:
      copyMe in class CaomEntity
      Returns:
      the cloned object.
    • updateUsing

      public void updateUsing(Observation other)
      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

      public String getCollection()
      Returns collection Attribute.
      Returns:
      collection Attribute
    • setCollection

      public void setCollection(String pCollection)
      Set collection Attribute.
      Parameters:
      pCollection - value to set
    • withCollection

      public Observation withCollection(String pCollection)
      fluent setter for collection Attribute.
      Parameters:
      pCollection - value to set
      Returns:
      Observation
    • getUri

      public String getUri()
      Returns uri Attribute.
      Returns:
      uri Attribute
    • setUri

      public void setUri(String pUri)
      Set uri Attribute.
      Parameters:
      pUri - value to set
    • withUri

      public Observation withUri(String pUri)
      fluent setter for uri Attribute.
      Parameters:
      pUri - value to set
      Returns:
      Observation
    • getUriBucket

      public String getUriBucket()
      Returns uriBucket Attribute.
      Returns:
      uriBucket Attribute
    • setUriBucket

      public void setUriBucket(String pUriBucket)
      Set uriBucket Attribute.
      Parameters:
      pUriBucket - value to set
    • withUriBucket

      public Observation withUriBucket(String pUriBucket)
      fluent setter for uriBucket Attribute.
      Parameters:
      pUriBucket - value to set
      Returns:
      Observation
    • getMetaRelease

      public Date getMetaRelease()
      Returns metaRelease Attribute.
      Returns:
      metaRelease Attribute
    • setMetaRelease

      public void setMetaRelease(Date pMetaRelease)
      Set metaRelease Attribute.
      Parameters:
      pMetaRelease - value to set
    • withMetaRelease

      public Observation withMetaRelease(Date pMetaRelease)
      fluent setter for metaRelease Attribute.
      Parameters:
      pMetaRelease - value to set
      Returns:
      Observation
    • getSequenceNumber

      public Integer getSequenceNumber()
      Returns sequenceNumber Attribute.
      Returns:
      sequenceNumber Attribute
    • setSequenceNumber

      public void setSequenceNumber(Integer pSequenceNumber)
      Set sequenceNumber Attribute.
      Parameters:
      pSequenceNumber - value to set
    • withSequenceNumber

      public Observation withSequenceNumber(Integer pSequenceNumber)
      fluent setter for sequenceNumber Attribute.
      Parameters:
      pSequenceNumber - value to set
      Returns:
      Observation
    • getType

      public String getType()
      Returns type Attribute.
      Returns:
      type Attribute
    • setType

      public void setType(String pType)
      Set type Attribute.
      Parameters:
      pType - value to set
    • withType

      public Observation withType(String pType)
      fluent setter for type Attribute.
      Parameters:
      pType - value to set
      Returns:
      Observation
    • getIntent

      public ObservationIntentType getIntent()
      Returns intent Attribute.
      Returns:
      intent Attribute
    • setIntent

      public void setIntent(ObservationIntentType pIntent)
      Set intent Attribute.
      Parameters:
      pIntent - value to set
    • withIntent

      public Observation withIntent(ObservationIntentType pIntent)
      fluent setter for intent Attribute.
      Parameters:
      pIntent - value to set
      Returns:
      Observation
    • getMetaReadGroups

      public List<String> getMetaReadGroups()
      Returns metaReadGroups Attribute.
      Returns:
      metaReadGroups Attribute
    • setMetaReadGroups

      public void setMetaReadGroups(List<String> pMetaReadGroups)
      Set metaReadGroups Attribute.
      Parameters:
      pMetaReadGroups - value to set
    • withMetaReadGroups

      public Observation withMetaReadGroups(List<String> pMetaReadGroups)
      fluent setter for metaReadGroups Attribute.
      Parameters:
      pMetaReadGroups - value to set
      Returns:
      Observation
    • getAlgorithm

      public Algorithm getAlgorithm()
      Returns algorithm Attribute.
      Returns:
      algorithm Attribute
    • setAlgorithm

      public void setAlgorithm(Algorithm pAlgorithm)
      Set algorithm Attribute.
      Parameters:
      pAlgorithm - value to set
    • withAlgorithm

      public Observation withAlgorithm(Algorithm pAlgorithm)
      fluent setter for algorithm Attribute.
      Parameters:
      pAlgorithm - value to set
      Returns:
      Observation
    • getTelescope

      public Telescope getTelescope()
      Returns telescope Attribute.
      Returns:
      telescope Attribute
    • setTelescope

      public void setTelescope(Telescope pTelescope)
      Set telescope Attribute.
      Parameters:
      pTelescope - value to set
    • withTelescope

      public Observation withTelescope(Telescope pTelescope)
      fluent setter for telescope Attribute.
      Parameters:
      pTelescope - value to set
      Returns:
      Observation
    • getInstrument

      public Instrument getInstrument()
      Returns instrument Attribute.
      Returns:
      instrument Attribute
    • setInstrument

      public void setInstrument(Instrument pInstrument)
      Set instrument Attribute.
      Parameters:
      pInstrument - value to set
    • withInstrument

      public Observation withInstrument(Instrument pInstrument)
      fluent setter for instrument Attribute.
      Parameters:
      pInstrument - value to set
      Returns:
      Observation
    • getEnvironment

      public Environment getEnvironment()
      Returns environment Attribute.
      Returns:
      environment Attribute
    • setEnvironment

      public void setEnvironment(Environment pEnvironment)
      Set environment Attribute.
      Parameters:
      pEnvironment - value to set
    • withEnvironment

      public Observation withEnvironment(Environment pEnvironment)
      fluent setter for environment Attribute.
      Parameters:
      pEnvironment - value to set
      Returns:
      Observation
    • getProposal

      public Proposal getProposal()
      Returns proposal Attribute.
      Returns:
      proposal Attribute
    • setProposal

      public void setProposal(Proposal pProposal)
      Set proposal Attribute.
      Parameters:
      pProposal - value to set
    • withProposal

      public Observation withProposal(Proposal pProposal)
      fluent setter for proposal Attribute.
      Parameters:
      pProposal - value to set
      Returns:
      Observation
    • getTarget

      public Target getTarget()
      Returns target Attribute.
      Returns:
      target Attribute
    • setTarget

      public void setTarget(Target pTarget)
      Set target Attribute.
      Parameters:
      pTarget - value to set
    • withTarget

      public Observation withTarget(Target pTarget)
      fluent setter for target Attribute.
      Parameters:
      pTarget - value to set
      Returns:
      Observation
    • getTargetPosition

      public TargetPosition getTargetPosition()
      Returns targetPosition Attribute.
      Returns:
      targetPosition Attribute
    • setTargetPosition

      public void setTargetPosition(TargetPosition pTargetPosition)
      Set targetPosition Attribute.
      Parameters:
      pTargetPosition - value to set
    • withTargetPosition

      public Observation withTargetPosition(TargetPosition pTargetPosition)
      fluent setter for targetPosition Attribute.
      Parameters:
      pTargetPosition - value to set
      Returns:
      Observation
    • getRequirements

      public Requirements getRequirements()
      Returns requirements Attribute.
      Returns:
      requirements Attribute
    • setRequirements

      public void setRequirements(Requirements pRequirements)
      Set requirements Attribute.
      Parameters:
      pRequirements - value to set
    • withRequirements

      public Observation withRequirements(Requirements pRequirements)
      fluent setter for requirements Attribute.
      Parameters:
      pRequirements - value to set
      Returns:
      Observation
    • getPlanes

      public List<Plane> getPlanes()
      Returns planes composition as an immutable list.
      Returns:
      planes composition.
    • setPlanes

      public void setPlanes(List<Plane> pPlanes)
      Defines whole planes composition.
      Parameters:
      pPlanes - composition to set.
    • addToPlanes

      public void addToPlanes(Plane p)
      Add a org.ivoa.dm.caom2.Plane to the composition.
      Parameters:
      p - org.ivoa.dm.caom2.Plane to add
    • removeFromPlanes

      public void removeFromPlanes(Plane p)
      Remove a org.ivoa.dm.caom2.Plane from the composition.
      Parameters:
      p - org.ivoa.dm.caom2.Plane to remove
    • replaceInPlanes

      public void replaceInPlanes(Plane _p)
      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:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations
      Overrides:
      forceLoad in class CaomEntity