Class VocabularyTerm

java.lang.Object
org.ivoa.dm.caom2.VocabularyTerm
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations
Direct Known Subclasses:
CalibrationStatus, Quality, Status, TargetType, Tracking, UCDTerm

@Embeddable @MappedSuperclass @VoDml(id="caom2:VocabularyTerm", role=dataType) public abstract class VocabularyTerm extends Object implements org.ivoa.vodml.jpa.JPAManipulations
This is a base class that defines a useful structure to handle terms from an external vocabulary. A specific subclass with a fixed namespace is used for values of fields within the model. odo{This could be extracted and reused in other contexts}. dataType: VocabularyTerm
  • Field Details

    • namespace

      @VoDml(id="caom2:VocabularyTerm.namespace", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String namespace
      This is the globally unique namespace for the vocabulary where definitions can be found. : Attribute namespace : multiplicity 1
    • term

      @VoDml(id="caom2:VocabularyTerm.term", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String term
      the word from the vocabulary. : Attribute term : multiplicity 1
  • Constructor Details

    • VocabularyTerm

      public VocabularyTerm()
      Creates a new VocabularyTerm
    • VocabularyTerm

      public VocabularyTerm(String namespace, String term)
      full parameter constructor.
      Parameters:
      namespace - This is the globally unique namespace for the vocabulary where definitions can be found.
      term - the word from the vocabulary.
    • VocabularyTerm

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

    • copyMe

      public abstract VocabularyTerm copyMe()
      make a clone of the object taking into account current polymorhic type.
      Returns:
      the cloned object.
    • updateUsing

      public void updateUsing(VocabularyTerm 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.
    • getNamespace

      public String getNamespace()
      Returns namespace Attribute.
      Returns:
      namespace Attribute
    • setNamespace

      public void setNamespace(String pNamespace)
      Set namespace Attribute.
      Parameters:
      pNamespace - value to set
    • withNamespace

      public VocabularyTerm withNamespace(String pNamespace)
      fluent setter for namespace Attribute.
      Parameters:
      pNamespace - value to set
      Returns:
      VocabularyTerm
    • getTerm

      public String getTerm()
      Returns term Attribute.
      Returns:
      term Attribute
    • setTerm

      public void setTerm(String pTerm)
      Set term Attribute.
      Parameters:
      pTerm - value to set
    • withTerm

      public VocabularyTerm withTerm(String pTerm)
      fluent setter for term Attribute.
      Parameters:
      pTerm - value to set
      Returns:
      VocabularyTerm
    • forceLoad

      public void forceLoad()
      Specified by:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations