Class Observatory

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

@Entity @VoDml(id="proposalManagement: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

    • homePage

      @VoDml(id="proposalManagement:Observatory.homePage", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String homePage
      the home page for the Observatory. : Attribute homePage : multiplicity 0..1
    • telescopes

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

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

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

      @VoDml(id="proposalManagement:Observatory.arrays", role=composition, type="proposalManagement: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(String homePage, 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:
      homePage - the home page for the Observatory.
      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, String homePage, List<Telescope> telescopes, List<Instrument> instruments, List<Backend> backends, List<TelescopeArray> arrays)
      Constructor from supertype instance.
      Parameters:
      superinstance - The supertype.
      homePage - the home page for the Observatory.
      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()
      make a clone of the object taking into account current polymorhic type.
      Overrides:
      copyMe in class Organization
      Returns:
      the cloned object.
    • 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.
    • getHomePage

      public String getHomePage()
      Returns homePage Attribute.
      Returns:
      homePage Attribute
    • setHomePage

      public void setHomePage(String pHomePage)
      Set homePage Attribute.
      Parameters:
      pHomePage - value to set
    • withHomePage

      public Observatory withHomePage(String pHomePage)
      fluent setter for homePage Attribute.
      Parameters:
      pHomePage - value to set
      Returns:
      Observatory
    • 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.management.Telescope to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.Telescope to add
    • removeFromTelescopes

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

      public void replaceInTelescopes(Telescope _p)
      update a org.ivoa.dm.proposal.management.Telescope in the composition.
      Parameters:
      _p - org.ivoa.dm.proposal.management.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.management.Instrument to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.Instrument to add
    • removeFromInstruments

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

      public void replaceInInstruments(Instrument _p)
      update a org.ivoa.dm.proposal.management.Instrument in the composition.
      Parameters:
      _p - org.ivoa.dm.proposal.management.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.management.Backend to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.Backend to add
    • removeFromBackends

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

      public void replaceInBackends(Backend _p)
      update a org.ivoa.dm.proposal.management.Backend in the composition.
      Parameters:
      _p - org.ivoa.dm.proposal.management.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.management.TelescopeArray to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.TelescopeArray to add
    • removeFromArrays

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

      public void replaceInArrays(TelescopeArray _p)
      update a org.ivoa.dm.proposal.management.TelescopeArray in the composition.
      Parameters:
      _p - org.ivoa.dm.proposal.management.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
    • persistRefs

      @Deprecated public 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.
      Specified by:
      persistRefs in interface org.ivoa.vodml.jpa.JPAManipulations
      Overrides:
      persistRefs in class Organization