Package org.ivoa.dm.proposal.prop
Class Observation
java.lang.Object
org.ivoa.dm.proposal.prop.Observation
- All Implemented Interfaces:
org.ivoa.vodml.jaxb.XmlIdManagement
,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>, org.ivoa.vodml.jaxb.XmlIdManagement
An observation - a pointing of the telescope at a part of the sky, occurs in a single non-overlapping time period.
objectType: Observation
-
Field Summary
Modifier and TypeFieldDescriptionprotected Long
inserted database keyprotected List<ObservingConstraint>
any constraints on the observation.protected Field
ReferenceObject field : The Field for the observation.ReferenceObject target : The actual target of the observation.protected TechnicalGoal
ReferenceObject technicalGoal : The technical goals of the observation. -
Constructor Summary
ConstructorDescriptionCreates a new ObservationObservation
(List<Target> target, Field field, TechnicalGoal technicalGoal, List<ObservingConstraint> constraints) full parameter constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a org.ivoa.dm.proposal.prop.ObservingConstraint to the composition.abstract Observation
copyMe()
make a clone of the object taking into account current polymorhic type.void
Returns constraints composition as an immutable list.getField()
Returns field ReferencegetId()
Returns target ReferenceReturns technicalGoal ReferencegetXmlId()
getter for XMLIDboolean
void
persistRefs
(jakarta.persistence.EntityManager _em) Deprecated.generally better to use the model level reference persistence as only this can deal with "contained" references properly.void
Remove a org.ivoa.dm.proposal.prop.ObservingConstraint from the composition.void
update a org.ivoa.dm.proposal.prop.ObservingConstraint in the composition.void
setConstraints
(List<ObservingConstraint> pConstraints) Defines whole constraints composition.void
Defines field Referencevoid
Defines target Referencevoid
setTechnicalGoal
(TechnicalGoal pTechnicalGoal) Defines technicalGoal Referencevoid
void
updates any cloned references that are contained within the hierarchy.void
updateUsing
(Observation other) Update this object with the content of the given object.
-
Field Details
-
_id
inserted database key -
constraints
@VoDml(id="proposal:Observation.constraints", role=composition, type="proposal:ObservingConstraint", typeRole=objectType) protected List<ObservingConstraint> constraintsany constraints on the observation. composition constraints : ( Multiplicity : 0..* ) -
target
@VoDml(id="proposal:Observation.target", role=reference, type="proposal:Target", typeRole=objectType) protected List<Target> targetReferenceObject target : The actual target of the observation. ( Multiplicity : 0..* ) -
field
@VoDml(id="proposal:Observation.field", role=reference, type="proposal:Field", typeRole=objectType) protected Field fieldReferenceObject field : The Field for the observation. ( Multiplicity : 1 ) -
technicalGoal
@VoDml(id="proposal:Observation.technicalGoal", role=reference, type="proposal:TechnicalGoal", typeRole=objectType) protected TechnicalGoal technicalGoalReferenceObject 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
- Specified by:
getId
in interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
- Returns:
- the id
-
getXmlId
getter for XMLID- Specified by:
getXmlId
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
setXmlId
- Specified by:
setXmlId
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
hasNaturalKey
public boolean hasNaturalKey()- Specified by:
hasNaturalKey
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
copyMe
make a clone of the object taking into account current polymorhic type.- Returns:
- the cloned object.
-
updateClonedReferences
public void updateClonedReferences()updates any cloned references that are contained within the hierarchy. -
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.
-
getTarget
Returns target Reference- Returns:
- target Reference
-
setTarget
Defines target Reference- Parameters:
pTarget
- references to set
-
getField
Returns field Reference- Returns:
- field Reference
-
setField
Defines field Reference- Parameters:
pField
- reference to set
-
getTechnicalGoal
Returns technicalGoal Reference- Returns:
- technicalGoal Reference
-
setTechnicalGoal
Defines technicalGoal Reference- Parameters:
pTechnicalGoal
- reference to set
-
getConstraints
Returns constraints composition as an immutable list.- Returns:
- constraints composition.
-
setConstraints
Defines whole constraints composition.- Parameters:
pConstraints
- composition to set.
-
addToConstraints
Add a org.ivoa.dm.proposal.prop.ObservingConstraint to the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.ObservingConstraint to add
-
removeFromConstraints
Remove a org.ivoa.dm.proposal.prop.ObservingConstraint from the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.ObservingConstraint to remove
-
replaceInConstraints
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 interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
persistRefs
Deprecated.generally better to use the model level reference persistence as only this can deal with "contained" references properly.- Specified by:
persistRefs
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
-