Class SimpleObservation

All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>

@Entity @VoDml(id="caom2:SimpleObservation", role=objectType) public class SimpleObservation extends Observation implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
A simple observation is created directly by operating a telescope and instrument (for empirical data) or by a process (for simulation data). Existing usage: the Algorithm.name values 'exposure' and 'simulation' are reserved for these cases respectively. objectType: SimpleObservation
  • Constructor Details

    • SimpleObservation

      public SimpleObservation()
      Creates a new SimpleObservation
    • SimpleObservation

      public SimpleObservation(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.
    • SimpleObservation

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

      public SimpleObservation(Observation superinstance)
      Constructor from supertype instance.
      Parameters:
      superinstance - The supertype.
  • Method Details

    • copyMe

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

      public void updateUsing(SimpleObservation 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.
    • createSimpleObservation

      public static SimpleObservation createSimpleObservation(Consumer<SimpleObservation.SimpleObservationBuilder> f)
      create a SimpleObservation in functional builder style.
      Parameters:
      f - the functional builder.
      Returns:
      an object initialized from the builder.
    • forceLoad

      public void forceLoad()
      Specified by:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations
      Overrides:
      forceLoad in class Observation
    • delete

      public void delete(jakarta.persistence.EntityManager em)
      Specified by:
      delete in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>