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
Nested ClassesModifier and TypeClassDescriptionstatic classA 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
FieldsModifier and TypeFieldDescriptionprotected List<TelescopeArray>any arrays of telescopes that typically operate together.the backends that exist.protected Stringthe home page for the Observatory.protected List<Instrument>the instruments that are available for the telescopes.the telescopes that the observatory controls. -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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.Ivoid 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 TypeMethodDescriptionvoidAdd a org.ivoa.dm.proposal.management.TelescopeArray to the composition.voidAdd a org.ivoa.dm.proposal.management.Backend to the composition.voidAdd a org.ivoa.dm.proposal.management.Instrument to the composition.voidAdd a org.ivoa.dm.proposal.management.Telescope to the composition.copyMe()make a clone of the object taking into account current polymorhic type.static Observatorycreate a Observatory in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns 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.voidRemove a org.ivoa.dm.proposal.management.TelescopeArray from the composition.voidRemove a org.ivoa.dm.proposal.management.Backend from the composition.voidRemove a org.ivoa.dm.proposal.management.Instrument from the composition.voidRemove a org.ivoa.dm.proposal.management.Telescope from the composition.voidupdate a org.ivoa.dm.proposal.management.TelescopeArray in the composition.voidupdate a org.ivoa.dm.proposal.management.Backend in the composition.voidupdate a org.ivoa.dm.proposal.management.Instrument in the composition.voidupdate a org.ivoa.dm.proposal.management.Telescope in the composition.voidsetArrays(List<TelescopeArray> pArrays) Defines whole arrays composition.voidsetBackends(List<Backend> pBackends) Defines whole backends composition.voidsetHomePage(String pHomePage) Set homePage Attribute.voidsetInstruments(List<Instrument> pInstruments) Defines whole instruments composition.voidsetTelescopes(List<Telescope> pTelescopes) Defines whole telescopes composition.voidupdates any cloned references that are contained within the hierarchy.voidupdateUsing(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, withWikiIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getIdMethods 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.Ivoid 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:
copyMein classOrganization- Returns:
- the cloned object.
-
updateClonedReferences
public void updateClonedReferences()updates any cloned references that are contained within the hierarchy.- Overrides:
updateClonedReferencesin 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:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations- Overrides:
forceLoadin classOrganization
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>- Overrides:
deletein classOrganization
-