Class MonolingualTextValueImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.ValueImpl
org.wikidata.wdtk.datamodel.implementation.MonolingualTextValueImpl
- All Implemented Interfaces:
MonolingualTextValue
,Value
Jackson implementation of
MonolingualTextValue
. Java attributes are
named equally to the JSON fields. Deviations are due to different naming in
the implemented interfaces. The "value" in this JSON context is called
"text".
The class extends ValueImpl
which adds a type association done by
the JSON.
- Author:
- Fredo Erxleben, Antonin Delpeuch
-
Field Summary
Fields inherited from class org.wikidata.wdtk.datamodel.implementation.ValueImpl
JSON_VALUE_TYPE_ENTITY_ID, JSON_VALUE_TYPE_GLOBE_COORDINATES, JSON_VALUE_TYPE_MONOLINGUAL_TEXT, JSON_VALUE_TYPE_QUANTITY, JSON_VALUE_TYPE_STRING, JSON_VALUE_TYPE_TIME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(ValueVisitor<T> valueVisitor) Accept a ValueVisitor and return its output.boolean
Get the language code of this value.getText()
Get the text of this value.org.wikidata.wdtk.datamodel.implementation.MonolingualTextValueImpl.JacksonInnerMonolingualText
getValue()
Returns the inner value helper object.int
hashCode()
toString()
-
Constructor Details
-
MonolingualTextValueImpl
Constructor.
-
-
Method Details
-
getValue
public org.wikidata.wdtk.datamodel.implementation.MonolingualTextValueImpl.JacksonInnerMonolingualText getValue()Returns the inner value helper object. Only for use by Jackson during serialization.- Returns:
- the inner monolingual text value
-
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
-
accept
Description copied from interface:Value
Accept a ValueVisitor and return its output. -
hashCode
public int hashCode() -
equals
-
toString
-