Class TermImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.TermImpl
- All Implemented Interfaces:
MonolingualTextValue
,Value
Jackson representation of
MonolingualTextValue
data used in labels,
aliases, and descriptions in JSON. Note that this is distinct from the JSON
representation for property values of type MonolingualTextValue
,
which is implemented in MonolingualTextValueImpl
.- Author:
- Fredo Erxleben, Antonin Delpeuch
-
Constructor Summary
ConstructorDescriptionCreate a new object from the given data.TermImpl
(MonolingualTextValue other) Copy constructor. -
Method Summary
-
Constructor Details
-
TermImpl
Create a new object from the given data.- Parameters:
languageCode
- the language code of the valuetext
- the text content of the value
-
TermImpl
Copy constructor. This constructor is useful for converting fromMonolingualTextValueImpl
.- Parameters:
other
- monolingual text value to copy
-
-
Method Details
-
accept
Description copied from interface:Value
Accept a ValueVisitor and return its output. -
getText
Description copied from interface:MonolingualTextValue
Get the text of this value.- Specified by:
getText
in interfaceMonolingualTextValue
- Returns:
- a string
-
getLanguageCode
Description copied from interface:MonolingualTextValue
Get the language code of this value. The codes are usually based on the codes used internally in Wikibase, which in turn are the codes used in the Universal Language Selector extension. However, the data model as such does not restrict the strings that might be used here.- Specified by:
getLanguageCode
in interfaceMonolingualTextValue
- Returns:
- a string that represents language
-
hashCode
public int hashCode() -
equals
-
toString
-