Interface TermedStatementDocument
- All Superinterfaces:
EntityDocument,LabeledDocument,LabeledStatementDocument,StatementDocument,TermedDocument
- All Known Subinterfaces:
ItemDocument,PropertyDocument
- All Known Implementing Classes:
ItemDocumentImpl,PropertyDocumentImpl,TermedStatementDocumentImpl
This interface just joins
TermedDocument and StatementDocument.
It is necessary to introduce this interface because the conflict between
the return types of the withRevisionId method in both interfaces needs to be resolved.- Author:
- antonin
-
Method Summary
Modifier and TypeMethodDescriptionwithAliases(String language, List<MonolingualTextValue> aliases) Returns a new version of this document with a new list of aliases for the given language code.withDescription(MonolingualTextValue newDescription) Returns a new version of this document with a new description (which overrides any existing description).withLabel(MonolingualTextValue newLabel) Returns a new version of this document with a new label (which overrides any existing label for this language).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
getEntityId, getRevisionIdMethods inherited from interface org.wikidata.wdtk.datamodel.interfaces.LabeledDocument
findLabel, getLabelsMethods 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, hasStatementValueMethods inherited from interface org.wikidata.wdtk.datamodel.interfaces.TermedDocument
findDescription, getAliases, getDescriptions
-
Method Details
-
withRevisionId
Description copied from interface:TermedDocumentReturns a copy of this document with an updated revision id.- Specified by:
withRevisionIdin interfaceEntityDocument- Specified by:
withRevisionIdin interfaceLabeledDocument- Specified by:
withRevisionIdin interfaceLabeledStatementDocument- Specified by:
withRevisionIdin interfaceStatementDocument- Specified by:
withRevisionIdin interfaceTermedDocument
-
withLabel
Description copied from interface:TermedDocumentReturns a new version of this document with a new label (which overrides any existing label for this language).- Specified by:
withLabelin interfaceLabeledDocument- Specified by:
withLabelin interfaceLabeledStatementDocument- Specified by:
withLabelin interfaceTermedDocument
-
withDescription
Description copied from interface:TermedDocumentReturns a new version of this document with a new description (which overrides any existing description).- Specified by:
withDescriptionin interfaceTermedDocument
-
withAliases
Description copied from interface:TermedDocumentReturns a new version of this document with a new list of aliases for the given language code. Any existing aliases for this language will be discarded.- Specified by:
withAliasesin interfaceTermedDocument- Parameters:
language- the language code for which the aliases should be setaliases- the aliases to set for this language. The language codes they contain should all match the supplied language.
-
withStatement
Description copied from interface:StatementDocumentReturns 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 interfaceLabeledStatementDocument- Specified by:
withStatementin interfaceStatementDocument- Parameters:
statement- the statement to add or update in the document
-
withoutStatementIds
Description copied from interface:StatementDocumentReturns 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 interfaceLabeledStatementDocument- Specified by:
withoutStatementIdsin interfaceStatementDocument- Parameters:
statementIds- the identifiers of the statements to remove
-