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
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for Instrument, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Longinserted database keyprotected Stringshort human readable description.protected InstrumentKindthe kind of instrument.protected Stringthe instrument name - human readable.protected Stringa URL that points to a more detailed description of the instrument.protected WikiDataIdthe wikidata id for the Instrument. -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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 Instrumentcreate a Instrument in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns description Attribute.getId()getKind()Returns kind Attribute.getName()Returns name Attribute.Returns reference Attribute.Returns wikiId Attribute.getXmlId()getter for XMLIDbooleanvoidsetDescription(String pDescription) Set description Attribute.voidsetKind(InstrumentKind pKind) Set kind Attribute.voidSet name Attribute.voidsetReference(String pReference) Set reference Attribute.voidsetWikiId(WikiDataId pWikiId) Set wikiId Attribute.voidvoidupdateUsing(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:
getIdin interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>- Returns:
- the id
-
getXmlId
getter for XMLID- Specified by:
getXmlIdin interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
setXmlId
- Specified by:
setXmlIdin interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
hasNaturalKey
public boolean hasNaturalKey()- Specified by:
hasNaturalKeyin 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:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-