Class ObservingMode

java.lang.Object
org.ivoa.dm.proposal.prop.ObservingMode
All Implemented Interfaces:
org.ivoa.vodml.jaxb.XmlIdManagement, org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="proposal:ObservingMode", role=objectType) public class ObservingMode extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>, org.ivoa.vodml.jaxb.XmlIdManagement
a collection of configs that can be chosen to observe with. objectType: ObservingMode
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • name

      @VoDml(id="proposal:ObservingMode.name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String name
      . : Attribute name : multiplicity 1
    • description

      @VoDml(id="proposal:ObservingMode.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String description
      . : Attribute description : multiplicity 1
    • configurations

      @VoDml(id="proposal:ObservingMode.configurations", role=composition, type="proposal:ObservingConfiguration", typeRole=objectType) protected List<ObservingConfiguration> configurations
      . composition configurations : ( Multiplicity : 1..* )
  • Constructor Details

    • ObservingMode

      public ObservingMode()
      Creates a new ObservingMode
    • ObservingMode

      public ObservingMode(String name, String description, List<ObservingConfiguration> configurations)
      full parameter constructor.
      Parameters:
      name - .
      description - .
      configurations - .
    • ObservingMode

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

    • getId

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

      public String getXmlId()
      getter for XMLID
      Specified by:
      getXmlId in interface org.ivoa.vodml.jaxb.XmlIdManagement
    • setXmlId

      public void setXmlId(String id)
      Specified by:
      setXmlId in interface org.ivoa.vodml.jaxb.XmlIdManagement
    • hasNaturalKey

      public boolean hasNaturalKey()
      Specified by:
      hasNaturalKey in interface org.ivoa.vodml.jaxb.XmlIdManagement
    • updateClonedReferences

      public void updateClonedReferences()
      updates any cloned references that are contained within the hierarchy.
    • updateUsing

      public void updateUsing(ObservingMode 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.
    • getName

      public String getName()
      Returns name Attribute
      Returns:
      name Attribute
    • setName

      public void setName(String pName)
      Defines name Attribute
      Parameters:
      pName - value to set
    • withName

      public ObservingMode withName(String pName)
    • getDescription

      public String getDescription()
      Returns description Attribute
      Returns:
      description Attribute
    • setDescription

      public void setDescription(String pDescription)
      Defines description Attribute
      Parameters:
      pDescription - value to set
    • withDescription

      public ObservingMode withDescription(String pDescription)
    • getConfigurations

      public List<ObservingConfiguration> getConfigurations()
      Returns configurations composition as an immutable list.
      Returns:
      configurations composition
    • setConfigurations

      public void setConfigurations(List<ObservingConfiguration> pConfigurations)
      Defines whole configurations composition.
      Parameters:
      pConfigurations - composition to set
    • addToConfigurations

      public void addToConfigurations(ObservingConfiguration p)
      Add a org.ivoa.dm.proposal.prop.ObservingConfiguration to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.ObservingConfiguration to add
    • removeFromConfigurations

      public void removeFromConfigurations(ObservingConfiguration p)
      Remove a org.ivoa.dm.proposal.prop.ObservingConfiguration from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.ObservingConfiguration to remove
    • replaceInConfigurations

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

      public static ObservingMode createObservingMode(Consumer<ObservingMode.ObservingModeBuilder> f)
      create a ObservingMode 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
    • 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