public abstract class JacksonTermedDocument extends Object implements TermedDocument
TermedDocument. Like all Jackson
objects, it is not technically immutable, but it is strongly recommended to
treat it as such in all contexts: the setters are for Jackson; never call
them in your code.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,List<JacksonMonolingualTextValue>> |
aliases |
protected Map<String,JacksonMonolingualTextValue> |
descriptions |
protected String |
entityId
The id of the entity that the document refers to.
|
static String |
JSON_TYPE_ITEM
String used to refer to items in JSON.
|
static String |
JSON_TYPE_PROPERTY
String used to refer to properties in JSON.
|
protected Map<String,JacksonMonolingualTextValue> |
labels |
protected String |
siteIri
The site IRI that this document refers to, or null if not specified.
|
| Constructor and Description |
|---|
JacksonTermedDocument()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,List<MonolingualTextValue>> |
getAliases()
Return a Map from Wikibase language codes to lists of alias labels for a
given language.
|
Map<String,MonolingualTextValue> |
getDescriptions()
Return a Map from Wikibase language codes to descriptions.
|
String |
getJsonId()
Returns the string id of the entity that this document refers to.
|
abstract String |
getJsonType()
Returns the JSON type string of the entity that this document refers to.
|
Map<String,MonolingualTextValue> |
getLabels()
Return a Map from Wikibase language codes to labels.
|
String |
getSiteIri() |
void |
setAliases(Map<String,List<JacksonMonolingualTextValue>> aliases)
Sets the aliases to the given value.
|
void |
setDescriptions(Map<String,JacksonMonolingualTextValue> descriptions)
Sets the descriptions to the given value.
|
void |
setJsonId(String id)
Sets the string id of the entity that this document refers to.
|
void |
setLabels(Map<String,JacksonMonolingualTextValue> labels)
Sets the labels to the given value.
|
void |
setSiteIri(String siteIri)
Sets the site iri to the given value.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEntityIdpublic static final String JSON_TYPE_ITEM
public static final String JSON_TYPE_PROPERTY
protected Map<String,List<JacksonMonolingualTextValue>> aliases
protected Map<String,JacksonMonolingualTextValue> labels
protected Map<String,JacksonMonolingualTextValue> descriptions
protected String entityId
The site IRI, which would also be required to create a complete
EntityIdValue, is not encoded in JSON. It needs to be injected
from the outside (if not, we default to Wikidata).
protected String siteIri
EntityIdValue.getSiteIri()public JacksonTermedDocument()
public void setAliases(Map<String,List<JacksonMonolingualTextValue>> aliases)
aliases - new valuepublic Map<String,List<MonolingualTextValue>> getAliases()
TermedDocumentgetAliases in interface TermedDocumentpublic void setDescriptions(Map<String,JacksonMonolingualTextValue> descriptions)
descriptions - new valuepublic Map<String,MonolingualTextValue> getDescriptions()
TermedDocumentgetDescriptions in interface TermedDocumentpublic void setLabels(Map<String,JacksonMonolingualTextValue> labels)
labels - new valuepublic Map<String,MonolingualTextValue> getLabels()
TermedDocumentgetLabels in interface TermedDocumentpublic void setJsonId(String id)
id - new valuepublic String getJsonId()
public void setSiteIri(String siteIri)
siteIri - the site IRIEntityIdValue.getSiteIri()public String getSiteIri()
public abstract String getJsonType()
JSON_TYPE_ITEM or
JSON_TYPE_PROPERTYCopyright © 2014 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage