Class UnsupportedValueImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.ValueImpl
org.wikidata.wdtk.datamodel.implementation.UnsupportedValueImpl
- All Implemented Interfaces:
UnsupportedValue
,Value
Represents a value with an unsupported datatype.
We can still "deserialize" it by just storing its
JSON representation, so that it can be serialized
back to its original representation.
This avoids parsing failures on documents containing
these values.
- Author:
- 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
-
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(ValueVisitor<T> valueVisitor) Accept a ValueVisitor and return its output.boolean
We do not use the Equality helper as in other datamodel classes because this would require exposing the contents of the value publicly, which goes against the desired opacity of the representation.Returns the type string found in the JSON representation of this value.int
hashCode()
We do not use the Hash helper as in other datamodel classes because this would require exposing the contents of the value publicly, which goes against the desired opacity of the representation.protected void
loadContents
(String key, com.fasterxml.jackson.databind.JsonNode value) toString()
-
Method Details
-
accept
Description copied from interface:Value
Accept a ValueVisitor and return its output. -
getTypeJsonString
Description copied from interface:UnsupportedValue
Returns the type string found in the JSON representation of this value.- Specified by:
getTypeJsonString
in interfaceUnsupportedValue
- Returns:
- the value of "type" in the JSON representation of this value.
-
getContents
-
loadContents
-
toString
-
hashCode
public int hashCode()We do not use the Hash helper as in other datamodel classes because this would require exposing the contents of the value publicly, which goes against the desired opacity of the representation. -
equals
We do not use the Equality helper as in other datamodel classes because this would require exposing the contents of the value publicly, which goes against the desired opacity of the representation.
-