Class Observatory

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

@Entity @VoDml(id="proposal:Observatory", role=objectType) public class Observatory extends Organization implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>, org.ivoa.vodml.jaxb.XmlIdManagement
An organisation that can perform astronomical observations. objectType: Observatory
  • Field Details

    • telescopes

      @VoDml(id="proposal:Observatory.telescopes", role=composition, type="proposal:Telescope", typeRole=objectType) protected List<Telescope> telescopes
      the telescopes that the observatory controls. composition telescopes : ( Multiplicity : 1..* )
    • instruments

      @VoDml(id="proposal:Observatory.instruments", role=composition, type="proposal:Instrument", typeRole=objectType) protected List<Instrument> instruments
      the instruments that are available for the telescopes. composition instruments : ( Multiplicity : 1..* )
    • backends

      @VoDml(id="proposal:Observatory.backends", role=composition, type="proposal:Backend", typeRole=objectType) protected List<Backend> backends
      the backends that exist. composition backends : ( Multiplicity : 1..* )
    • arrays

      @VoDml(id="proposal:Observatory.arrays", role=composition, type="proposal:TelescopeArray", typeRole=objectType) protected List<TelescopeArray> arrays
      any arrays of telescopes that typically operate together. composition arrays : ( Multiplicity : 0..* )
  • Constructor Details

    • Observatory

      public Observatory()
      Creates a new Observatory
    • Observatory

      public Observatory(List<Telescope> telescopes, List<Instrument> instruments, List<Backend> backends, List<TelescopeArray> arrays, String name, String address, org.ivoa.dm.ivoa.Ivorn ivoid, WikiDataId wikiId)
      full parameter constructor.
      Parameters:
      telescopes - the telescopes that the observatory controls.
      instruments - the instruments that are available for the telescopes.
      backends - the backends that exist.
      arrays - any arrays of telescopes that typically operate together.
      name - The name of the organization.
      address - .
      ivoid - the registry identifier for the organization.
      wikiId - the wikidata id for the Organization.
    • Observatory

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

      public Observatory(Organization superinstance, List<Telescope> telescopes, List<Instrument> instruments, List<Backend> backends, List<TelescopeArray> arrays)
      Constructor from supertype instance.
      Parameters:
      superinstance - The supertype.
      telescopes - the telescopes that the observatory controls.
      instruments - the instruments that are available for the telescopes.
      backends - the backends that exist.
      arrays - any arrays of telescopes that typically operate together.
  • Method Details

    • copyMe

      public Organization copyMe()
      Overrides:
      copyMe in class Organization
    • updateClonedReferences

      public void updateClonedReferences()
      updates any cloned references that are contained within the hierarchy.
      Overrides:
      updateClonedReferences in class Organization
    • updateUsing

      public void updateUsing(Observatory 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.
    • getTelescopes

      public List<Telescope> getTelescopes()
      Returns telescopes composition as an immutable list.
      Returns:
      telescopes composition
    • setTelescopes

      public void setTelescopes(List<Telescope> pTelescopes)
      Defines whole telescopes composition.
      Parameters:
      pTelescopes - composition to set
    • addToTelescopes

      public void addToTelescopes(Telescope p)
      Add a org.ivoa.dm.proposal.prop.Telescope to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.Telescope to add
    • removeFromTelescopes

      public void removeFromTelescopes(Telescope p)
      Remove a org.ivoa.dm.proposal.prop.Telescope from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.Telescope to remove
    • replaceInTelescopes

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

      public List<Instrument> getInstruments()
      Returns instruments composition as an immutable list.
      Returns:
      instruments composition
    • setInstruments

      public void setInstruments(List<Instrument> pInstruments)
      Defines whole instruments composition.
      Parameters:
      pInstruments - composition to set
    • addToInstruments

      public void addToInstruments(Instrument p)
      Add a org.ivoa.dm.proposal.prop.Instrument to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.Instrument to add
    • removeFromInstruments

      public void removeFromInstruments(Instrument p)
      Remove a org.ivoa.dm.proposal.prop.Instrument from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.Instrument to remove
    • replaceInInstruments

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

      public List<Backend> getBackends()
      Returns backends composition as an immutable list.
      Returns:
      backends composition
    • setBackends

      public void setBackends(List<Backend> pBackends)
      Defines whole backends composition.
      Parameters:
      pBackends - composition to set
    • addToBackends

      public void addToBackends(Backend p)
      Add a org.ivoa.dm.proposal.prop.Backend to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.Backend to add
    • removeFromBackends

      public void removeFromBackends(Backend p)
      Remove a org.ivoa.dm.proposal.prop.Backend from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.Backend to remove
    • replaceInBackends

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

      public List<TelescopeArray> getArrays()
      Returns arrays composition as an immutable list.
      Returns:
      arrays composition
    • setArrays

      public void setArrays(List<TelescopeArray> pArrays)
      Defines whole arrays composition.
      Parameters:
      pArrays - composition to set
    • addToArrays

      public void addToArrays(TelescopeArray p)
      Add a org.ivoa.dm.proposal.prop.TelescopeArray to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.TelescopeArray to add
    • removeFromArrays

      public void removeFromArrays(TelescopeArray p)
      Remove a org.ivoa.dm.proposal.prop.TelescopeArray from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.TelescopeArray to remove
    • replaceInArrays

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

      public static Observatory createObservatory(Consumer<Observatory.ObservatoryBuilder> f)
      create a Observatory 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 Organization
    • jpaClone

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

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