public class JacksonItemDocument extends JacksonTermedDocument implements ItemDocument
ItemDocument. 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.aliases, descriptions, entityId, JSON_TYPE_ITEM, JSON_TYPE_PROPERTY, labels, siteIri| Constructor and Description |
|---|
JacksonItemDocument()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Iterator<Statement> |
getAllStatements()
Returns an iterator that provides access to all statements, without
considering the statement groups.
|
EntityIdValue |
getEntityId()
Return the ID of the entity that the data refers to
|
ItemIdValue |
getItemId()
Return the ID of the item that the data refers to.
|
Map<String,List<JacksonStatement>> |
getJsonClaims()
Returns the "claims".
|
String |
getJsonType()
Returns the JSON type string of the entity that this document refers to.
|
Map<String,SiteLink> |
getSiteLinks()
Get a Map of site keys to
SiteLink objects. |
List<StatementGroup> |
getStatementGroups()
Return the list of all StatementGroups stored for this item.
|
int |
hashCode() |
void |
setJsonClaims(Map<String,List<JacksonStatement>> claims)
Sets the "claims" to the given value.
|
void |
setSiteLinks(Map<String,JacksonSiteLink> sitelinks)
Sets the site links to the given value.
|
String |
toString() |
getAliases, getDescriptions, getJsonId, getLabels, getSiteIri, setAliases, setDescriptions, setJsonId, setLabels, setSiteIriclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAliases, getDescriptions, getLabelspublic JacksonItemDocument()
public String getJsonType()
JacksonTermedDocumentgetJsonType in class JacksonTermedDocumentJacksonTermedDocument.JSON_TYPE_ITEM or
JacksonTermedDocument.JSON_TYPE_PROPERTYpublic ItemIdValue getItemId()
ItemDocumentEntityDocument.getEntityId(), but declared with a more
specific result type.getItemId in interface ItemDocumentpublic EntityIdValue getEntityId()
EntityDocumentgetEntityId in interface EntityDocumentpublic List<StatementGroup> getStatementGroups()
ItemDocumentgetStatementGroups in interface ItemDocumentpublic void setSiteLinks(Map<String,JacksonSiteLink> sitelinks)
sitelinks - new valuepublic Map<String,SiteLink> getSiteLinks()
ItemDocumentSiteLink objects.getSiteLinks in interface ItemDocumentpublic void setJsonClaims(Map<String,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 Map<String,List<JacksonStatement>> getJsonClaims()
JSON "claims" correspond to statement groups in the WDTK model. You
should use getStatementGroups() to obtain
this data.
public Iterator<Statement> getAllStatements()
ItemDocumentgetAllStatements in interface ItemDocumentCopyright © 2014 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage