Package org.ivoa.dm.proposal.management
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
-
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 String
the home page for the Observatory.protected List<Instrument>
the instruments that are available for the telescopes.the telescopes that the observatory controls. -
Constructor Summary
ConstructorDescriptionCreates a new ObservatoryObservatory
(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.Observatory
(Observatory other) Copy Constructor.Observatory
(Organization superinstance, String homePage, 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.management.TelescopeArray to the composition.void
Add a org.ivoa.dm.proposal.management.Backend to the composition.void
Add a org.ivoa.dm.proposal.management.Instrument to the composition.void
Add a org.ivoa.dm.proposal.management.Telescope to the composition.copyMe()
make a clone of the object taking into account current polymorhic type.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 homePage Attribute.Returns instruments composition as an immutable list.Returns telescopes composition as an immutable list.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.management.TelescopeArray from the composition.void
Remove a org.ivoa.dm.proposal.management.Backend from the composition.void
Remove a org.ivoa.dm.proposal.management.Instrument from the composition.void
Remove a org.ivoa.dm.proposal.management.Telescope from the composition.void
update a org.ivoa.dm.proposal.management.TelescopeArray in the composition.void
update a org.ivoa.dm.proposal.management.Backend in the composition.void
update a org.ivoa.dm.proposal.management.Instrument in the composition.void
update a org.ivoa.dm.proposal.management.Telescope in the composition.void
setArrays
(List<TelescopeArray> pArrays) Defines whole arrays composition.void
setBackends
(List<Backend> pBackends) Defines whole backends composition.void
setHomePage
(String pHomePage) Set homePage Attribute.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.withHomePage
(String pHomePage) fluent setter for homePage Attribute.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
-
homePage
@VoDml(id="proposalManagement:Observatory.homePage", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String homePagethe 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> telescopesthe 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> instrumentsthe 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> backendsthe backends that exist. composition backends : ( Multiplicity : 1..* ) -
arrays
@VoDml(id="proposalManagement:Observatory.arrays", role=composition, type="proposalManagement: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(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
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
make a clone of the object taking into account current polymorhic type.- Overrides:
copyMe
in classOrganization
- Returns:
- the cloned object.
-
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.
-
getHomePage
Returns homePage Attribute.- Returns:
- homePage Attribute
-
setHomePage
Set homePage Attribute.- Parameters:
pHomePage
- value to set
-
withHomePage
fluent setter for homePage Attribute.- Parameters:
pHomePage
- value to set- Returns:
- Observatory
-
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.management.Telescope to the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.Telescope to add
-
removeFromTelescopes
Remove a org.ivoa.dm.proposal.management.Telescope from the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.Telescope to remove
-
replaceInTelescopes
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
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.management.Instrument to the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.Instrument to add
-
removeFromInstruments
Remove a org.ivoa.dm.proposal.management.Instrument from the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.Instrument to remove
-
replaceInInstruments
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
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.management.Backend to the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.Backend to add
-
removeFromBackends
Remove a org.ivoa.dm.proposal.management.Backend from the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.Backend to remove
-
replaceInBackends
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
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.management.TelescopeArray to the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.TelescopeArray to add
-
removeFromArrays
Remove a org.ivoa.dm.proposal.management.TelescopeArray from the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.TelescopeArray to remove
-
replaceInArrays
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
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
-
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
- Overrides:
persistRefs
in classOrganization
-