public interface ItemDocument extends TermedStatementDocument
EntityDocument
with information about site links and statements.Modifier and Type | Method and Description |
---|---|
ItemIdValue |
getEntityId()
Return the ID of the item that the data refers to.
|
Map<String,SiteLink> |
getSiteLinks()
Get a Map of site keys to
SiteLink objects. |
ItemDocument |
withAliases(String language,
List<MonolingualTextValue> aliases)
Returns a new version of this document with a new list of aliases
for the given language code.
|
ItemDocument |
withDescription(MonolingualTextValue newDescription)
Returns a new version of this document with a new description
(which overrides any existing description).
|
ItemDocument |
withEntityId(ItemIdValue newEntityId)
Returns a new version of this document with updated ID.
|
ItemDocument |
withLabel(MonolingualTextValue newLabel)
Returns a new version of this document with a new label
(which overrides any existing label for this language).
|
ItemDocument |
withoutStatementIds(Set<String> statementIds)
Returns a new version of this document where all statements matching
any of the statement ids provided have been removed.
|
ItemDocument |
withRevisionId(long newRevisionId)
Returns a copy of this document with an updated revision id.
|
ItemDocument |
withStatement(Statement statement)
Returns a new version of this document which includes the
statement provided.
|
findDescription, getAliases, getDescriptions
findLabel, getLabels
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
ItemIdValue getEntityId()
getEntityId
in interface EntityDocument
Map<String,SiteLink> getSiteLinks()
SiteLink
objects.ItemDocument withEntityId(ItemIdValue newEntityId)
newEntityId
- new ID of the documentItemDocument withRevisionId(long newRevisionId)
TermedDocument
withRevisionId
in interface EntityDocument
withRevisionId
in interface LabeledDocument
withRevisionId
in interface LabeledStatementDocument
withRevisionId
in interface StatementDocument
withRevisionId
in interface TermedDocument
withRevisionId
in interface TermedStatementDocument
ItemDocument withLabel(MonolingualTextValue newLabel)
TermedDocument
withLabel
in interface LabeledDocument
withLabel
in interface LabeledStatementDocument
withLabel
in interface TermedDocument
withLabel
in interface TermedStatementDocument
ItemDocument withDescription(MonolingualTextValue newDescription)
TermedDocument
withDescription
in interface TermedDocument
withDescription
in interface TermedStatementDocument
ItemDocument withAliases(String language, List<MonolingualTextValue> aliases)
TermedDocument
withAliases
in interface TermedDocument
withAliases
in interface TermedStatementDocument
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.ItemDocument withStatement(Statement statement)
StatementDocument
withStatement
in interface LabeledStatementDocument
withStatement
in interface StatementDocument
withStatement
in interface TermedStatementDocument
statement
- the statement to add or update in the documentItemDocument withoutStatementIds(Set<String> statementIds)
StatementDocument
withoutStatementIds
in interface LabeledStatementDocument
withoutStatementIds
in interface StatementDocument
withoutStatementIds
in interface TermedStatementDocument
statementIds
- the identifiers of the statements to removeCopyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage