Class Observation

java.lang.Object
org.ivoa.dm.proposal.prop.Observation
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Direct Known Subclasses:
CalibrationObservation, TargetObservation

@Entity @VoDml(id="proposal:Observation", role=objectType) public abstract class Observation extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
An observation - occurs in a single non-overlapping time period. objectType: Observation
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • constraints

      @VoDml(id="proposal:Observation.constraints", role=composition, type="proposal:ObservingConstraint", typeRole=objectType) protected List<ObservingConstraint> constraints
      any constraints on the observation. composition constraints : ( Multiplicity : 0..* )
    • target

      @VoDml(id="proposal:Observation.target", role=reference, type="proposal:Target", typeRole=objectType) protected List<Target> target
      ReferenceObject target : The actual target of the observation. ( Multiplicity : 1..* )
    • field

      @VoDml(id="proposal:Observation.field", role=reference, type="proposal:Field", typeRole=objectType) protected Field field
      ReferenceObject field : The Field for the observation. ( Multiplicity : 1 )
    • technicalGoal

      @VoDml(id="proposal:Observation.technicalGoal", role=reference, type="proposal:TechnicalGoal", typeRole=objectType) protected TechnicalGoal technicalGoal
      ReferenceObject technicalGoal : The technical goals of the observation. ( Multiplicity : 1 )
  • Constructor Details

    • Observation

      public Observation()
      Creates a new Observation
    • Observation

      public Observation(List<Target> target, Field field, TechnicalGoal technicalGoal, List<ObservingConstraint> constraints)
      full parameter constructor.
      Parameters:
      target - The actual target of the observation.
      field - The Field for the observation.
      technicalGoal - The technical goals of the observation.
      constraints - any constraints on the observation.
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
      Returns:
      the id
    • copyMe

      public abstract Observation copyMe()
    • updateClonedReferences

      public void updateClonedReferences()
      updates any cloned references that are contained within the hierarchy.
    • 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.
    • getTarget

      public List<Target> getTarget()
      Returns target Reference
      Returns:
      target Reference
    • setTarget

      public void setTarget(List<Target> pTarget)
      Defines target Reference
      Parameters:
      pTarget - references to set
    • getField

      public Field getField()
      Returns field Reference
      Returns:
      field Reference
    • setField

      public void setField(Field pField)
      Defines field Reference
      Parameters:
      pField - reference to set
    • getTechnicalGoal

      public TechnicalGoal getTechnicalGoal()
      Returns technicalGoal Reference
      Returns:
      technicalGoal Reference
    • setTechnicalGoal

      public void setTechnicalGoal(TechnicalGoal pTechnicalGoal)
      Defines technicalGoal Reference
      Parameters:
      pTechnicalGoal - reference to set
    • getConstraints

      public List<ObservingConstraint> getConstraints()
      Returns constraints composition as an immutable list.
      Returns:
      constraints composition
    • setConstraints

      public void setConstraints(List<ObservingConstraint> pConstraints)
      Defines whole constraints composition.
      Parameters:
      pConstraints - composition to set
    • addToConstraints

      public void addToConstraints(ObservingConstraint p)
      Add a org.ivoa.dm.proposal.prop.ObservingConstraint to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.ObservingConstraint to add
    • removeFromConstraints

      public void removeFromConstraints(ObservingConstraint p)
      Remove a org.ivoa.dm.proposal.prop.ObservingConstraint from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.ObservingConstraint to remove
    • replaceInConstraints

      public void replaceInConstraints(ObservingConstraint _p)
      update a org.ivoa.dm.proposal.prop.ObservingConstraint in the composition.
      Parameters:
      _p - org.ivoa.dm.proposal.prop.ObservingConstraint to update the match is done via the database key
    • forceLoad

      public void forceLoad()
      Specified by:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations
    • jpaClone

      public void jpaClone(jakarta.persistence.EntityManager em)
      Specified by:
      jpaClone in interface org.ivoa.vodml.jpa.JPAManipulations
    • persistRefs

      public void persistRefs(jakarta.persistence.EntityManager _em)
      Specified by:
      persistRefs in interface org.ivoa.vodml.jpa.JPAManipulations