Class Instrument

java.lang.Object
org.ivoa.dm.proposal.prop.Instrument
All Implemented Interfaces:
org.ivoa.vodml.jaxb.XmlIdManagement, org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="proposal: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
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • name

      @VoDml(id="proposal:Instrument.name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String name
      the instrument name - human readable. : Attribute name : multiplicity 1
    • description

      @VoDml(id="proposal:Instrument.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String description
      short human readable description. : Attribute description : multiplicity 0..1
    • wikiId

      @VoDml(id="proposal:Instrument.wikiId", role=attribute, type="proposal:WikiDataId", typeRole=primitiveType) protected WikiDataId wikiId
      the wikidata id for the Instrument. : Attribute wikiId : multiplicity 0..1
    • reference

      @VoDml(id="proposal:Instrument.reference", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String reference
      a URL that points to a more detailed description of the instrument. : Attribute reference : multiplicity 0..1
    • kind

      @VoDml(id="proposal:Instrument.kind", role=attribute, type="proposal:InstrumentKind", typeRole=enumeration) protected InstrumentKind kind
      the kind of instrument. : Attribute kind : multiplicity 1
    • frequencyCoverage

      @VoDml(id="proposal:Instrument.frequencyCoverage", role=composition, type="proposal:SpectralWindowSetup", typeRole=objectType) protected SpectralWindowSetup frequencyCoverage
      the frequency range that the instrument covers. composition frequencyCoverage : ( Multiplicity : 1 )
  • Constructor Details

    • Instrument

      public Instrument()
      Creates a new Instrument
    • Instrument

      public Instrument(String name, String description, WikiDataId wikiId, String reference, InstrumentKind kind, SpectralWindowSetup frequencyCoverage)
      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.
      frequencyCoverage - the frequency range that the instrument covers.
    • 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
    • getXmlId

      public String getXmlId()
      getter for XMLID
      Specified by:
      getXmlId in interface org.ivoa.vodml.jaxb.XmlIdManagement
    • setXmlId

      public void setXmlId(String id)
      Specified by:
      setXmlId in interface org.ivoa.vodml.jaxb.XmlIdManagement
    • hasNaturalKey

      public boolean hasNaturalKey()
      Specified by:
      hasNaturalKey in interface org.ivoa.vodml.jaxb.XmlIdManagement
    • 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)
      Defines name Attribute
      Parameters:
      pName - value to set
    • withName

      public Instrument withName(String pName)
    • getDescription

      public String getDescription()
      Returns description Attribute
      Returns:
      description Attribute
    • setDescription

      public void setDescription(String pDescription)
      Defines description Attribute
      Parameters:
      pDescription - value to set
    • withDescription

      public Instrument withDescription(String pDescription)
    • getWikiId

      public WikiDataId getWikiId()
      Returns wikiId Attribute
      Returns:
      wikiId Attribute
    • setWikiId

      public void setWikiId(WikiDataId pWikiId)
      Defines wikiId Attribute
      Parameters:
      pWikiId - value to set
    • withWikiId

      public Instrument withWikiId(WikiDataId pWikiId)
    • getReference

      public String getReference()
      Returns reference Attribute
      Returns:
      reference Attribute
    • setReference

      public void setReference(String pReference)
      Defines reference Attribute
      Parameters:
      pReference - value to set
    • withReference

      public Instrument withReference(String pReference)
    • getKind

      public InstrumentKind getKind()
      Returns kind Attribute
      Returns:
      kind Attribute
    • setKind

      public void setKind(InstrumentKind pKind)
      Defines kind Attribute
      Parameters:
      pKind - value to set
    • withKind

      public Instrument withKind(InstrumentKind pKind)
    • getFrequencyCoverage

      public SpectralWindowSetup getFrequencyCoverage()
      Returns frequencyCoverage Attribute
      Returns:
      frequencyCoverage Attribute
    • setFrequencyCoverage

      public void setFrequencyCoverage(SpectralWindowSetup pFrequencyCoverage)
      Defines frequencyCoverage Attribute
      Parameters:
      pFrequencyCoverage - value to set
    • withFrequencyCoverage

      public Instrument withFrequencyCoverage(SpectralWindowSetup pFrequencyCoverage)
    • 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
    • jpaClone

      public void jpaClone(jakarta.persistence.EntityManager em)
      Specified by:
      jpaClone in interface org.ivoa.vodml.jpa.JPAManipulations
    • persistRefs

      public void persistRefs(jakarta.persistence.EntityManager _em)
      Specified by:
      persistRefs in interface org.ivoa.vodml.jpa.JPAManipulations