Interface SenseDocument
- All Superinterfaces:
EntityDocument,StatementDocument
- All Known Implementing Classes:
SenseDocumentImpl
Interface for lexemes senses.
- Author:
- Thomas Pellissier Tanon
-
Method Summary
Modifier and TypeMethodDescriptionReturns the ID of the entity that the data refers toReturn the human readable description of the sense indexed by Wikimedia language codewithEntityId(SenseIdValue newEntityId) Returns a new version of this document with updated ID.withGloss(MonolingualTextValue gloss) withoutStatementIds(Set<String> statementIds) Returns a new version of this document where all statements matching any of the statement ids provided have been removed.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
getRevisionIdMethods 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
SenseIdValue getEntityId()Returns the ID of the entity that the data refers to- Specified by:
getEntityIdin interfaceEntityDocument- Returns:
- sense id
-
getGlosses
Map<String,MonolingualTextValue> getGlosses()Return the human readable description of the sense indexed by Wikimedia language code- Returns:
- a map from Wikimedia language code to the representations
-
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:
withRevisionIdin interfaceEntityDocument- Specified by:
withRevisionIdin interfaceStatementDocument
-
withGloss
-
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:
withStatementin 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:
withoutStatementIdsin interfaceStatementDocument- Parameters:
statementIds- the identifiers of the statements to remove
-