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, getSiteIri
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findStatement, 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, hasStatementValue
getRevisionId
public SenseIdValue getEntityId()
SenseDocument
getEntityId
in interface EntityDocument
getEntityId
in interface SenseDocument
public Map<String,MonolingualTextValue> getGlosses()
SenseDocument
getGlosses
in interface SenseDocument
public SenseDocument withEntityId(SenseIdValue newEntityId)
SenseDocument
withEntityId
in interface SenseDocument
newEntityId
- new ID of the documentpublic SenseDocument withRevisionId(long newRevisionId)
SenseDocument
withRevisionId
in interface EntityDocument
withRevisionId
in interface SenseDocument
withRevisionId
in interface StatementDocument
public SenseDocument withGloss(MonolingualTextValue gloss)
withGloss
in interface SenseDocument
public SenseDocument withStatement(Statement statement)
SenseDocument
withStatement
in interface SenseDocument
withStatement
in interface StatementDocument
statement
- the statement to add or update in the documentpublic SenseDocument withoutStatementIds(Set<String> statementIds)
SenseDocument
withoutStatementIds
in interface SenseDocument
withoutStatementIds
in interface StatementDocument
statementIds
- the identifiers of the statements to removepublic List<StatementGroup> getStatementGroups()
StatementDocument
getStatementGroups
in interface StatementDocument
public StatementGroup findStatementGroup(String propertyIdValue)
findStatementGroup
in interface StatementDocument
propertyIdValue
- 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()
StatementDocument
getAllStatements
in interface StatementDocument
protected static Map<String,List<Statement>> addStatementToGroups(Statement statement, Map<String,List<Statement>> claims)
statement
- claims
- Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage