public class FormDocumentImpl extends EntityDocumentImpl implements FormDocument
FormDocument.| 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.
|
FormIdValue |
getEntityId()
Returns the ID of the entity that the data refers to
|
List<ItemIdValue> |
getGrammaticalFeatures()
Return the IDs of the grammatical features of the form (masculine, singular...)
|
Map<String,List<Statement>> |
getJsonClaims()
Returns the "claims".
|
Map<String,MonolingualTextValue> |
getRepresentations()
Return the human readable representations of the form indexed by Wikimedia language code
|
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() |
FormDocument |
withEntityId(FormIdValue newEntityId)
Returns a new version of this document with updated ID.
|
FormDocument |
withGrammaticalFeature(ItemIdValue grammaticalFeature) |
FormDocument |
withoutStatementIds(Set<String> statementIds)
Returns a new version of this document where all statements matching
any of the statement ids provided have been removed.
|
FormDocument |
withRepresentation(MonolingualTextValue representation) |
FormDocument |
withRevisionId(long newRevisionId)
Returns a copy of this document with an updated revision id.
|
FormDocument |
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 FormIdValue getEntityId()
FormDocumentgetEntityId in interface EntityDocumentgetEntityId in interface FormDocumentpublic List<ItemIdValue> getGrammaticalFeatures()
FormDocumentgetGrammaticalFeatures in interface FormDocumentpublic Map<String,MonolingualTextValue> getRepresentations()
FormDocumentgetRepresentations in interface FormDocumentpublic FormDocument withEntityId(FormIdValue newEntityId)
FormDocumentwithEntityId in interface FormDocumentnewEntityId - new ID of the documentpublic FormDocument withRevisionId(long newRevisionId)
FormDocumentwithRevisionId in interface EntityDocumentwithRevisionId in interface FormDocumentwithRevisionId in interface StatementDocumentpublic FormDocument withRepresentation(MonolingualTextValue representation)
withRepresentation in interface FormDocumentpublic FormDocument withGrammaticalFeature(ItemIdValue grammaticalFeature)
withGrammaticalFeature in interface FormDocumentpublic FormDocument withStatement(Statement statement)
FormDocumentwithStatement in interface FormDocumentwithStatement in interface StatementDocumentstatement - the statement to add or update in the documentpublic FormDocument withoutStatementIds(Set<String> statementIds)
FormDocumentwithoutStatementIds in interface FormDocumentwithoutStatementIds 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