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
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • name

      @VoDml(id="caom2:Instrument.name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String name
      common name for the instrument. : Attribute name : multiplicity 1
    • keywords

      @VoDml(id="caom2:Instrument.keywords", role=attribute, type="ivoa:string", typeRole=primitiveType) protected List<String> 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). : Attribute keywords : multiplicity 0..*
  • Constructor Details

    • Instrument

      public Instrument()
      Creates a new Instrument
    • Instrument

      public Instrument(String name, List<String> keywords)
      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

      public Instrument(Instrument other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
      Returns:
      the id
    • updateUsing

      public void updateUsing(Instrument other)
      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

      public String getName()
      Returns name Attribute.
      Returns:
      name Attribute
    • setName

      public void setName(String pName)
      Set name Attribute.
      Parameters:
      pName - value to set
    • withName

      public Instrument withName(String pName)
      fluent setter for name Attribute.
      Parameters:
      pName - value to set
      Returns:
      Instrument
    • getKeywords

      public List<String> getKeywords()
      Returns keywords Attribute.
      Returns:
      keywords Attribute
    • setKeywords

      public void setKeywords(List<String> pKeywords)
      Set keywords Attribute.
      Parameters:
      pKeywords - value to set
    • withKeywords

      public Instrument withKeywords(List<String> pKeywords)
      fluent setter for keywords Attribute.
      Parameters:
      pKeywords - value to set
      Returns:
      Instrument
    • createInstrument

      public static Instrument createInstrument(Consumer<Instrument.InstrumentBuilder> f)
      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 interface org.ivoa.vodml.jpa.JPAManipulations
    • delete

      public void delete(jakarta.persistence.EntityManager em)
      Specified by:
      delete in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>