Package org.ivoa.dm.caom2
Class Instrument
java.lang.Object
org.ivoa.dm.caom2.Instrument
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="caom2:Instrument",
role=objectType)
public class Instrument
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
the instrument used to acquire or create the observation; this could be used for both physical
instruments that acquire data or software that generates it (e.g. simulated data).
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 keyadditional keywords that describe the instrument or instrument configuration at the time of observation; keywords cannot contain the pipe (|) character - it is reserved for use in persistence systems (e.g.protected Stringcommon name for the instrument. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new InstrumentInstrument(String name, List<String> keywords) 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) voidgetId()Returns keywords Attribute.getName()Returns name Attribute.voidsetKeywords(List<String> pKeywords) Set keywords Attribute.voidSet name Attribute.voidupdateUsing(Instrument other) Update this object with the content of the given object.withKeywords(List<String> pKeywords) fluent setter for keywords Attribute.fluent setter for name Attribute.
-
Field Details
-
_id
inserted database key -
name
@VoDml(id="caom2:Instrument.name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String namecommon name for the instrument. : Attribute name : multiplicity 1 -
keywords
@VoDml(id="caom2:Instrument.keywords", role=attribute, type="ivoa:string", typeRole=primitiveType) protected List<String> keywordsadditional keywords that describe the instrument or instrument configuration at the time of observation; keywords cannot contain the pipe (|) character - it is reserved for use in persistence systems (e.g. to store all keywords in a single column in a table). : Attribute keywords : multiplicity 0..*
-
-
Constructor Details
-
Instrument
public Instrument()Creates a new Instrument -
Instrument
full parameter constructor.- Parameters:
name- common name for the instrument.keywords- additional keywords that describe the instrument or instrument configuration at the time of observation; keywords cannot contain the pipe (|) character - it is reserved for use in persistence systems (e.g. to store all keywords in a single column in a table).
-
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
-
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
-
getKeywords
Returns keywords Attribute.- Returns:
- keywords Attribute
-
setKeywords
Set keywords Attribute.- Parameters:
pKeywords- value to set
-
withKeywords
fluent setter for keywords Attribute.- Parameters:
pKeywords- 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>
-