Package org.ivoa.dm.proposal.management
Class Instrument
java.lang.Object
org.ivoa.dm.proposal.management.Instrument
- All Implemented Interfaces:
org.ivoa.vodml.jaxb.XmlIdManagement
,org.ivoa.vodml.jpa.JPAManipulations
,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="proposalManagement:Instrument",
role=objectType)
public class Instrument
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>, org.ivoa.vodml.jaxb.XmlIdManagement
An instrument that can be attached to a telescope - e.g. CCD, Radio Receiver.
objectType: Instrument
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder class for Instrument, mainly for use in the functional builder pattern. -
Field Summary
Modifier and TypeFieldDescriptionprotected Long
inserted database keyprotected String
short human readable description.protected InstrumentKind
the kind of instrument.protected String
the instrument name - human readable.protected String
a URL that points to a more detailed description of the instrument.protected WikiDataId
the wikidata id for the Instrument. -
Constructor Summary
ConstructorDescriptionCreates a new InstrumentInstrument
(String name, String description, WikiDataId wikiId, String reference, InstrumentKind kind) full parameter constructor.Instrument
(Instrument other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic Instrument
create a Instrument in functional builder style.void
Returns description Attribute.getId()
getKind()
Returns kind Attribute.getName()
Returns name Attribute.Returns reference Attribute.Returns wikiId Attribute.getXmlId()
getter for XMLIDboolean
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
setDescription
(String pDescription) Set description Attribute.void
setKind
(InstrumentKind pKind) Set kind Attribute.void
Set name Attribute.void
setReference
(String pReference) Set reference Attribute.void
setWikiId
(WikiDataId pWikiId) Set wikiId Attribute.void
void
updateUsing
(Instrument other) Update this object with the content of the given object.withDescription
(String pDescription) fluent setter for description Attribute.withKind
(InstrumentKind pKind) fluent setter for kind Attribute.fluent setter for name Attribute.withReference
(String pReference) fluent setter for reference Attribute.withWikiId
(WikiDataId pWikiId) fluent setter for wikiId Attribute.
-
Field Details
-
_id
inserted database key -
name
@VoDml(id="proposalManagement:Instrument.name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String namethe instrument name - human readable. : Attribute name : multiplicity 1 -
description
@VoDml(id="proposalManagement:Instrument.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String descriptionshort human readable description. : Attribute description : multiplicity 0..1 -
wikiId
@VoDml(id="proposalManagement:Instrument.wikiId", role=attribute, type="proposal:WikiDataId", typeRole=primitiveType) protected WikiDataId wikiIdthe wikidata id for the Instrument. : Attribute wikiId : multiplicity 0..1 -
reference
@VoDml(id="proposalManagement:Instrument.reference", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String referencea URL that points to a more detailed description of the instrument. : Attribute reference : multiplicity 0..1 -
kind
@VoDml(id="proposalManagement:Instrument.kind", role=attribute, type="proposalManagement:InstrumentKind", typeRole=enumeration) protected InstrumentKind kindthe kind of instrument. : Attribute kind : multiplicity 1
-
-
Constructor Details
-
Instrument
public Instrument()Creates a new Instrument -
Instrument
public Instrument(String name, String description, WikiDataId wikiId, String reference, InstrumentKind kind) full parameter constructor.- Parameters:
name
- the instrument name - human readable.description
- short human readable description.wikiId
- the wikidata id for the Instrument.reference
- a URL that points to a more detailed description of the instrument.kind
- the kind of instrument.
-
Instrument
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other
- the object to be copied.
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
- Returns:
- the id
-
getXmlId
getter for XMLID- Specified by:
getXmlId
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
setXmlId
- Specified by:
setXmlId
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
hasNaturalKey
public boolean hasNaturalKey()- Specified by:
hasNaturalKey
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
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.
-
getName
Returns name Attribute.- Returns:
- name Attribute
-
setName
Set name Attribute.- Parameters:
pName
- value to set
-
withName
fluent setter for name Attribute.- Parameters:
pName
- value to set- Returns:
- Instrument
-
getDescription
Returns description Attribute.- Returns:
- description Attribute
-
setDescription
Set description Attribute.- Parameters:
pDescription
- value to set
-
withDescription
fluent setter for description Attribute.- Parameters:
pDescription
- value to set- Returns:
- Instrument
-
getWikiId
Returns wikiId Attribute.- Returns:
- wikiId Attribute
-
setWikiId
Set wikiId Attribute.- Parameters:
pWikiId
- value to set
-
withWikiId
fluent setter for wikiId Attribute.- Parameters:
pWikiId
- value to set- Returns:
- Instrument
-
getReference
Returns reference Attribute.- Returns:
- reference Attribute
-
setReference
Set reference Attribute.- Parameters:
pReference
- value to set
-
withReference
fluent setter for reference Attribute.- Parameters:
pReference
- value to set- Returns:
- Instrument
-
getKind
Returns kind Attribute.- Returns:
- kind Attribute
-
setKind
Set kind Attribute.- Parameters:
pKind
- value to set
-
withKind
fluent setter for kind Attribute.- Parameters:
pKind
- value to set- Returns:
- Instrument
-
createInstrument
create a Instrument 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
-
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
-