public class SenseDocumentImpl extends EntityDocumentImpl implements SenseDocument
SenseDocument.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,List<Statement>> |
claims
This is what is called claim in the JSON model.
|
entityId, revisionId, siteIri| Modifier and Type | Method and Description |
|---|---|
protected static Map<String,List<Statement>> |
addStatementToGroups(Statement statement,
Map<String,List<Statement>> claims)
Adds a Statement to a given collection of statement groups.
|
boolean |
equals(Object obj) |
StatementGroup |
findStatementGroup(String propertyIdValue)
Find a statement group by its property id, without checking for
equality with the site IRI.
|
Iterator<Statement> |
getAllStatements()
Returns an iterator that provides access to all statements, without
considering the statement groups.
|
SenseIdValue |
getEntityId()
Returns the ID of the entity that the data refers to
|
Map<String,MonolingualTextValue> |
getGlosses()
Return the human readable description of the sense indexed by Wikimedia language code
|
Map<String,List<Statement>> |
getJsonClaims()
Returns the "claims".
|
List<StatementGroup> |
getStatementGroups()
Return the list of all StatementGroups stored for this item.
|
int |
hashCode() |
protected static Map<String,List<Statement>> |
removeStatements(Set<String> statementIds,
Map<String,List<Statement>> claims)
Removes statement ids from a collection of statement groups.
|
String |
toString() |
SenseDocument |
withEntityId(SenseIdValue newEntityId)
Returns a new version of this document with updated ID.
|
SenseDocument |
withGloss(MonolingualTextValue gloss) |
SenseDocument |
withoutStatementIds(Set<String> statementIds)
Returns a new version of this document where all statements matching
any of the statement ids provided have been removed.
|
SenseDocument |
withRevisionId(long newRevisionId)
Returns a copy of this document with an updated revision id.
|
SenseDocument |
withStatement(Statement statement)
Returns a new version of this document which includes the
statement provided.
|
getJsonId, getRevisionId, getSiteIriclone, finalize, getClass, notify, notifyAll, wait, wait, waitfindStatement, findStatement, findStatementEntityIdValue, findStatementEntityIdValue, findStatementGlobeCoordinatesValue, findStatementGlobeCoordinatesValue, findStatementGroup, findStatementGroup, findStatementItemIdValue, findStatementItemIdValue, findStatementMonolingualTextValue, findStatementMonolingualTextValue, findStatementPropertyIdValue, findStatementPropertyIdValue, findStatementQuantityValue, findStatementQuantityValue, findStatementStringValue, findStatementStringValue, findStatementTimeValue, findStatementTimeValue, findStatementValue, findStatementValue, getAllStatements, getStatementGroups, hasStatement, hasStatement, hasStatementValue, hasStatementValue, hasStatementValue, hasStatementValuegetRevisionIdpublic SenseIdValue getEntityId()
SenseDocumentgetEntityId in interface EntityDocumentgetEntityId in interface SenseDocumentpublic Map<String,MonolingualTextValue> getGlosses()
SenseDocumentgetGlosses in interface SenseDocumentpublic SenseDocument withEntityId(SenseIdValue newEntityId)
SenseDocumentwithEntityId in interface SenseDocumentnewEntityId - new ID of the documentpublic SenseDocument withRevisionId(long newRevisionId)
SenseDocumentwithRevisionId in interface EntityDocumentwithRevisionId in interface SenseDocumentwithRevisionId in interface StatementDocumentpublic SenseDocument withGloss(MonolingualTextValue gloss)
withGloss in interface SenseDocumentpublic SenseDocument withStatement(Statement statement)
SenseDocumentwithStatement in interface SenseDocumentwithStatement in interface StatementDocumentstatement - the statement to add or update in the documentpublic SenseDocument withoutStatementIds(Set<String> statementIds)
SenseDocumentwithoutStatementIds in interface SenseDocumentwithoutStatementIds in interface StatementDocumentstatementIds - the identifiers of the statements to removepublic List<StatementGroup> getStatementGroups()
StatementDocumentgetStatementGroups in interface StatementDocumentpublic StatementGroup findStatementGroup(String propertyIdValue)
findStatementGroup in interface StatementDocumentpropertyIdValue - the property to search forStatementGroup or nullpublic Map<String,List<Statement>> getJsonClaims()
JSON "claims" correspond to statement groups in the WDTK model. You
should use StatementDocumentImpl.getStatementGroups() to obtain
this data.
public Iterator<Statement> getAllStatements()
StatementDocumentgetAllStatements in interface StatementDocumentprotected static Map<String,List<Statement>> addStatementToGroups(Statement statement, Map<String,List<Statement>> claims)
statement - claims - Copyright © 2014–2022 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage