Package org.ivoa.dm.proposal.prop
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder class for Observatory, mainly for use in the functional builder pattern.Nested classes/interfaces inherited from class org.ivoa.dm.proposal.prop.Organization
Organization.OrganizationBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<TelescopeArray>
any arrays of telescopes that typically operate together.the backends that exist.protected List<Instrument>
the instruments that are available for the telescopes.the telescopes that the observatory controls. -
Constructor Summary
ConstructorDescriptionCreates a new ObservatoryObservatory
(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.Observatory
(Observatory other) Copy Constructor.Observatory
(Organization superinstance, List<Telescope> telescopes, List<Instrument> instruments, List<Backend> backends, List<TelescopeArray> arrays) Constructor from supertype instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a org.ivoa.dm.proposal.prop.TelescopeArray to the composition.void
Add a org.ivoa.dm.proposal.prop.Backend to the composition.void
Add a org.ivoa.dm.proposal.prop.Instrument to the composition.void
Add a org.ivoa.dm.proposal.prop.Telescope to the composition.copyMe()
static Observatory
create a Observatory in functional builder style.void
Returns arrays composition as an immutable list.Returns backends composition as an immutable list.Returns instruments composition as an immutable list.Returns telescopes composition as an immutable list.void
jpaClone
(jakarta.persistence.EntityManager em) void
persistRefs
(jakarta.persistence.EntityManager _em) void
Remove a org.ivoa.dm.proposal.prop.TelescopeArray from the composition.void
Remove a org.ivoa.dm.proposal.prop.Backend from the composition.void
Remove a org.ivoa.dm.proposal.prop.Instrument from the composition.void
Remove a org.ivoa.dm.proposal.prop.Telescope from the composition.void
update a org.ivoa.dm.proposal.prop.TelescopeArray in the composition.void
update a org.ivoa.dm.proposal.prop.Backend in the composition.void
update a org.ivoa.dm.proposal.prop.Instrument in the composition.void
update a org.ivoa.dm.proposal.prop.Telescope in the composition.void
setArrays
(List<TelescopeArray> pArrays) Defines whole arrays composition.void
setBackends
(List<Backend> pBackends) Defines whole backends composition.void
setInstruments
(List<Instrument> pInstruments) Defines whole instruments composition.void
setTelescopes
(List<Telescope> pTelescopes) Defines whole telescopes composition.void
updates any cloned references that are contained within the hierarchy.void
updateUsing
(Observatory other) Update this object with the content of the given object.Methods inherited from class org.ivoa.dm.proposal.prop.Organization
createOrganization, getAddress, getId, getIvoid, getName, getWikiId, getXmlId, hasNaturalKey, setAddress, setIvoid, setName, setWikiId, setXmlId, updateUsing, withAddress, withIvoid, withName, withWikiId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getId
Methods inherited from interface org.ivoa.vodml.jaxb.XmlIdManagement
getXmlId, hasNaturalKey, setXmlId
-
Field Details
-
telescopes
@VoDml(id="proposal:Observatory.telescopes", role=composition, type="proposal:Telescope", typeRole=objectType) protected List<Telescope> telescopesthe 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> instrumentsthe 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> backendsthe backends that exist. composition backends : ( Multiplicity : 1..* ) -
arrays
@VoDml(id="proposal:Observatory.arrays", role=composition, type="proposal:TelescopeArray", typeRole=objectType) protected List<TelescopeArray> arraysany 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
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
- Overrides:
copyMe
in classOrganization
-
updateClonedReferences
public void updateClonedReferences()updates any cloned references that are contained within the hierarchy.- Overrides:
updateClonedReferences
in classOrganization
-
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.
-
getTelescopes
Returns telescopes composition as an immutable list.- Returns:
- telescopes composition
-
setTelescopes
Defines whole telescopes composition.- Parameters:
pTelescopes
- composition to set
-
addToTelescopes
Add a org.ivoa.dm.proposal.prop.Telescope to the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.Telescope to add
-
removeFromTelescopes
Remove a org.ivoa.dm.proposal.prop.Telescope from the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.Telescope to remove
-
replaceInTelescopes
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
Returns instruments composition as an immutable list.- Returns:
- instruments composition
-
setInstruments
Defines whole instruments composition.- Parameters:
pInstruments
- composition to set
-
addToInstruments
Add a org.ivoa.dm.proposal.prop.Instrument to the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.Instrument to add
-
removeFromInstruments
Remove a org.ivoa.dm.proposal.prop.Instrument from the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.Instrument to remove
-
replaceInInstruments
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
Returns backends composition as an immutable list.- Returns:
- backends composition
-
setBackends
Defines whole backends composition.- Parameters:
pBackends
- composition to set
-
addToBackends
Add a org.ivoa.dm.proposal.prop.Backend to the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.Backend to add
-
removeFromBackends
Remove a org.ivoa.dm.proposal.prop.Backend from the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.Backend to remove
-
replaceInBackends
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
Returns arrays composition as an immutable list.- Returns:
- arrays composition
-
setArrays
Defines whole arrays composition.- Parameters:
pArrays
- composition to set
-
addToArrays
Add a org.ivoa.dm.proposal.prop.TelescopeArray to the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.TelescopeArray to add
-
removeFromArrays
Remove a org.ivoa.dm.proposal.prop.TelescopeArray from the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.TelescopeArray to remove
-
replaceInArrays
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
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 interfaceorg.ivoa.vodml.jpa.JPAManipulations
- Overrides:
forceLoad
in classOrganization
-
jpaClone
public void jpaClone(jakarta.persistence.EntityManager em) - Specified by:
jpaClone
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
- Overrides:
jpaClone
in classOrganization
-
persistRefs
public void persistRefs(jakarta.persistence.EntityManager _em) - Specified by:
persistRefs
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
- Overrides:
persistRefs
in classOrganization
-