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, 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 FormIdValue getEntityId()
FormDocument
getEntityId
in interface EntityDocument
getEntityId
in interface FormDocument
public List<ItemIdValue> getGrammaticalFeatures()
FormDocument
getGrammaticalFeatures
in interface FormDocument
public Map<String,MonolingualTextValue> getRepresentations()
FormDocument
getRepresentations
in interface FormDocument
public FormDocument withEntityId(FormIdValue newEntityId)
FormDocument
withEntityId
in interface FormDocument
newEntityId
- new ID of the documentpublic FormDocument withRevisionId(long newRevisionId)
FormDocument
withRevisionId
in interface EntityDocument
withRevisionId
in interface FormDocument
withRevisionId
in interface StatementDocument
public FormDocument withRepresentation(MonolingualTextValue representation)
withRepresentation
in interface FormDocument
public FormDocument withGrammaticalFeature(ItemIdValue grammaticalFeature)
withGrammaticalFeature
in interface FormDocument
public FormDocument withStatement(Statement statement)
FormDocument
withStatement
in interface FormDocument
withStatement
in interface StatementDocument
statement
- the statement to add or update in the documentpublic FormDocument withoutStatementIds(Set<String> statementIds)
FormDocument
withoutStatementIds
in interface FormDocument
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