EntityDocument, StatementDocument, TermedDocumentJacksonItemDocument, JacksonPropertyDocumentpublic abstract class JacksonTermedStatementDocument extends AbstractTermedStatementDocument
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 | Description |
|---|---|---|
protected java.util.Map<java.lang.String,java.util.List<JacksonMonolingualTextValue>> |
aliases |
|
protected java.util.Map<java.lang.String,JacksonMonolingualTextValue> |
descriptions |
|
protected java.lang.String |
entityId |
The id of the entity that the document refers to.
|
static java.lang.String |
JSON_TYPE_ITEM |
String used to refer to items in JSON.
|
static java.lang.String |
JSON_TYPE_PROPERTY |
String used to refer to properties in JSON.
|
protected java.util.Map<java.lang.String,JacksonMonolingualTextValue> |
labels |
|
protected long |
revisionId |
The revision id of this document.
|
protected java.lang.String |
siteIri |
The site IRI that this document refers to, or null if not specified.
|
| Constructor | Description |
|---|---|
JacksonTermedStatementDocument() |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Map<java.lang.String,java.util.List<MonolingualTextValue>> |
getAliases() |
Return a Map from Wikibase language codes to lists of alias labels for a
given language.
|
java.util.Map<java.lang.String,MonolingualTextValue> |
getDescriptions() |
Return a Map from Wikibase language codes to descriptions.
|
java.util.Map<java.lang.String,java.util.List<JacksonStatement>> |
getJsonClaims() |
Returns the "claims".
|
java.lang.String |
getJsonId() |
Returns the string id of the entity that this document refers to.
|
java.util.Map<java.lang.String,MonolingualTextValue> |
getLabels() |
Return a Map from Wikibase language codes to labels.
|
long |
getRevisionId() |
Returns the revision ID of this document, or 0 if no id is known.
|
java.lang.String |
getSiteIri() |
|
java.util.List<StatementGroup> |
getStatementGroups() |
Return the list of all StatementGroups stored for this item.
|
void |
setAliases(java.util.Map<java.lang.String,java.util.List<JacksonMonolingualTextValue>> aliases) |
Sets the aliases to the given value.
|
void |
setDescriptions(java.util.Map<java.lang.String,JacksonMonolingualTextValue> descriptions) |
Sets the descriptions to the given value.
|
void |
setJsonClaims(java.util.Map<java.lang.String,java.util.List<JacksonStatement>> claims) |
Sets the "claims" to the given value.
|
void |
setJsonId(java.lang.String id) |
Sets the string id of the entity that this document refers to.
|
void |
setLabels(java.util.Map<java.lang.String,JacksonMonolingualTextValue> labels) |
Sets the labels to the given value.
|
void |
setRevisionId(long revisionId) |
Sets the revision id of this document.
|
void |
setSiteIri(java.lang.String siteIri) |
Sets the site iri to the given value.
|
castValue, containsStatementValue, findDescription, findLabel, findStatement, findStatement, findStatementDatatypeIdValue, findStatementDatatypeIdValue, findStatementEntityIdValue, findStatementEntityIdValue, findStatementGlobeCoordinatesValue, findStatementGlobeCoordinatesValue, findStatementGroup, findStatementGroup, findStatementItemIdValue, findStatementItemIdValue, findStatementMonolingualTextValue, findStatementMonolingualTextValue, findStatementPropertyIdValue, findStatementPropertyIdValue, findStatementQuantityValue, findStatementQuantityValue, findStatementStringValue, findStatementStringValue, findStatementTimeValue, findStatementTimeValue, findStatementValue, findStatementValue, getAllStatements, getUniqueStatementFromStatementGroup, getValueFromStatement, hasStatement, hasStatement, hasStatementValue, hasStatementValue, hasStatementValue, hasStatementValuegetEntityIdpublic static final java.lang.String JSON_TYPE_ITEM
public static final java.lang.String JSON_TYPE_PROPERTY
protected java.util.Map<java.lang.String,java.util.List<JacksonMonolingualTextValue>> aliases
protected java.util.Map<java.lang.String,JacksonMonolingualTextValue> labels
protected java.util.Map<java.lang.String,JacksonMonolingualTextValue> descriptions
protected java.lang.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 java.lang.String siteIri
EntityIdValue.getSiteIri()protected long revisionId
EntityDocument.getRevisionId()public JacksonTermedStatementDocument()
public void setAliases(java.util.Map<java.lang.String,java.util.List<JacksonMonolingualTextValue>> aliases)
aliases - new valuepublic java.util.Map<java.lang.String,java.util.List<MonolingualTextValue>> getAliases()
TermedDocumentpublic void setDescriptions(java.util.Map<java.lang.String,JacksonMonolingualTextValue> descriptions)
descriptions - new valuepublic java.util.Map<java.lang.String,MonolingualTextValue> getDescriptions()
TermedDocumentpublic void setLabels(java.util.Map<java.lang.String,JacksonMonolingualTextValue> labels)
labels - new valuepublic java.util.Map<java.lang.String,MonolingualTextValue> getLabels()
TermedDocumentpublic void setJsonId(java.lang.String id)
id - new valuepublic java.lang.String getJsonId()
public void setSiteIri(java.lang.String siteIri)
siteIri - the site IRIEntityIdValue.getSiteIri()public java.lang.String getSiteIri()
public java.util.List<StatementGroup> getStatementGroups()
StatementDocumentpublic void setJsonClaims(java.util.Map<java.lang.String,java.util.List<JacksonStatement>> claims)
The name refers to the JSON model, where claims are similar to statement groups. This should not be confused with claims as used in the WDTK data model. This will probably only be used by the Jacksons' ObjectMapper.
claims - public java.util.Map<java.lang.String,java.util.List<JacksonStatement>> getJsonClaims()
JSON "claims" correspond to statement groups in the WDTK model. You
should use getStatementGroups() to obtain
this data.
public void setRevisionId(long revisionId)
revisionId - new valuepublic long getRevisionId()
EntityDocumentCopyright © 2014–2017 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage