Interface FormDocument
- All Superinterfaces:
EntityDocument
,StatementDocument
- All Known Implementing Classes:
FormDocumentImpl
Interface for lexemes forms.
- Author:
- Thomas Pellissier Tanon
-
Method Summary
Modifier and TypeMethodDescriptionReturns the ID of the entity that the data refers toReturn the IDs of the grammatical features of the form (masculine, singular...)Return the human readable representations of the form indexed by Wikimedia language codewithEntityId
(FormIdValue newEntityId) Returns a new version of this document with updated ID.withGrammaticalFeature
(ItemIdValue grammaticalFeature) withoutStatementIds
(Set<String> statementIds) Returns a new version of this document where all statements matching any of the statement ids provided have been removed.withRepresentation
(MonolingualTextValue representation) withRevisionId
(long newRevisionId) Returns a copy of this document with an updated revision id.withStatement
(Statement statement) Returns a new version of this document which includes the statement provided.Methods inherited from interface org.wikidata.wdtk.datamodel.interfaces.EntityDocument
getRevisionId
Methods inherited from interface org.wikidata.wdtk.datamodel.interfaces.StatementDocument
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
-
Method Details
-
getEntityId
FormIdValue getEntityId()Returns the ID of the entity that the data refers to- Specified by:
getEntityId
in interfaceEntityDocument
- Returns:
- form id
-
getRepresentations
Map<String,MonolingualTextValue> getRepresentations()Return the human readable representations of the form indexed by Wikimedia language code- Returns:
- a map from Wikimedia language code to the representations
-
getGrammaticalFeatures
List<ItemIdValue> getGrammaticalFeatures()Return the IDs of the grammatical features of the form (masculine, singular...)- Returns:
- item ids
-
withEntityId
Returns a new version of this document with updated ID.- Parameters:
newEntityId
- new ID of the document- Returns:
- document with updated ID
-
withRevisionId
Returns a copy of this document with an updated revision id.- Specified by:
withRevisionId
in interfaceEntityDocument
- Specified by:
withRevisionId
in interfaceStatementDocument
-
withRepresentation
-
withGrammaticalFeature
-
withStatement
Returns a new version of this document which includes the statement provided. If the identifier of this statement matches that of any other statement for the same property, then the existing statement will be replaced by the new one. Otherwise, the new statement will be added at the end of the list of statements in this group.- Specified by:
withStatement
in interfaceStatementDocument
- Parameters:
statement
- the statement to add or update in the document
-
withoutStatementIds
Returns a new version of this document where all statements matching any of the statement ids provided have been removed. These statements can use different properties.- Specified by:
withoutStatementIds
in interfaceStatementDocument
- Parameters:
statementIds
- the identifiers of the statements to remove
-