public class ValueJsonConverter extends Object implements ValueVisitor<org.json.JSONObject>
Value to JSON for later
serialization.| Constructor and Description |
|---|
ValueJsonConverter() |
| Modifier and Type | Method and Description |
|---|---|
org.json.JSONObject |
visit(DatatypeIdValue value)
Visits a DatatypeIdValue and returns a result.
|
org.json.JSONObject |
visit(EntityIdValue value)
Visits a EntityIdValue and returns a result.
|
org.json.JSONObject |
visit(GlobeCoordinatesValue value)
Visits a GlobeCoordinatesValue and returns a result.
|
org.json.JSONObject |
visit(MonolingualTextValue value)
Visits a MonolingualTextValue and returns a result.
|
org.json.JSONObject |
visit(QuantityValue value)
Visits a QuantityValue and returns a result.
|
org.json.JSONObject |
visit(StringValue value)
Visits a StringValue and returns a result.
|
org.json.JSONObject |
visit(TimeValue value)
Visits a TimeValue and returns a result.
|
public org.json.JSONObject visit(DatatypeIdValue value)
ValueVisitorvisit in interface ValueVisitor<org.json.JSONObject>value - the value to visitpublic org.json.JSONObject visit(EntityIdValue value)
ValueVisitorItemIdValue and
PropertyIdValue. Since the set of possible subtypes can be
extended by extensions of Wikibase, the visitor only visits the general
(abstract) supertype. Implementations will have to decide if the given
specific type is supported and what to do with it.visit in interface ValueVisitor<org.json.JSONObject>value - the value to visitpublic org.json.JSONObject visit(GlobeCoordinatesValue value)
ValueVisitorvisit in interface ValueVisitor<org.json.JSONObject>value - the value to visitpublic org.json.JSONObject visit(MonolingualTextValue value)
ValueVisitorvisit in interface ValueVisitor<org.json.JSONObject>value - the value to visitpublic org.json.JSONObject visit(QuantityValue value)
ValueVisitorvisit in interface ValueVisitor<org.json.JSONObject>value - the value to visitpublic org.json.JSONObject visit(StringValue value)
ValueVisitorvisit in interface ValueVisitor<org.json.JSONObject>value - the value to visitpublic org.json.JSONObject visit(TimeValue value)
ValueVisitorvisit in interface ValueVisitor<org.json.JSONObject>value - the value to visitCopyright © 2014 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage