Package org.ivoa.dm.caom2
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new VocabularyTermVocabularyTerm(String namespace, String term) full parameter constructor.VocabularyTerm(VocabularyTerm other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract VocabularyTermcopyMe()make a clone of the object taking into account current polymorhic type.voidReturns namespace Attribute.getTerm()Returns term Attribute.voidsetNamespace(String pNamespace) Set namespace Attribute.voidSet term Attribute.voidupdateUsing(VocabularyTerm other) Update this object with the content of the given object.withNamespace(String pNamespace) fluent setter for namespace Attribute.fluent setter for term Attribute.
-
Field Details
-
namespace
@VoDml(id="caom2:VocabularyTerm.namespace", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String namespaceThis 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 termthe word from the vocabulary. : Attribute term : multiplicity 1
-
-
Constructor Details
-
VocabularyTerm
public VocabularyTerm()Creates a new VocabularyTerm -
VocabularyTerm
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
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type.- Returns:
- the cloned object.
-
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.
-
getNamespace
Returns namespace Attribute.- Returns:
- namespace Attribute
-
setNamespace
Set namespace Attribute.- Parameters:
pNamespace- value to set
-
withNamespace
fluent setter for namespace Attribute.- Parameters:
pNamespace- value to set- Returns:
- VocabularyTerm
-
getTerm
Returns term Attribute.- Returns:
- term Attribute
-
setTerm
Set term Attribute.- Parameters:
pTerm- value to set
-
withTerm
fluent setter for term Attribute.- Parameters:
pTerm- value to set- Returns:
- VocabularyTerm
-
forceLoad
public void forceLoad()- Specified by:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations
-