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

    • _id

      protected Long _id
      inserted database key
    • name

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

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

      @VoDml(id="proposalManagement: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="proposalManagement: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="proposalManagement:Instrument.kind", role=attribute, type="proposalManagement:InstrumentKind", typeRole=enumeration) protected InstrumentKind kind
      the 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

      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)
      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
    • getDescription

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

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

      public Instrument withDescription(String pDescription)
      fluent setter for description Attribute.
      Parameters:
      pDescription - value to set
      Returns:
      Instrument
    • getWikiId

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

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

      public Instrument withWikiId(WikiDataId pWikiId)
      fluent setter for wikiId Attribute.
      Parameters:
      pWikiId - value to set
      Returns:
      Instrument
    • getReference

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

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

      public Instrument withReference(String pReference)
      fluent setter for reference Attribute.
      Parameters:
      pReference - value to set
      Returns:
      Instrument
    • getKind

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

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

      public Instrument withKind(InstrumentKind pKind)
      fluent setter for kind Attribute.
      Parameters:
      pKind - 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
    • persistRefs

      @Deprecated public 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.
      Specified by:
      persistRefs in interface org.ivoa.vodml.jpa.JPAManipulations