public class Datamodel extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SITE_WIKIDATA
The site IRI of Wikidata.
|
static String |
SITE_WIKIMEDIA_COMMONS
The site IRI of Wikimedia Commons.
|
Constructor and Description |
---|
Datamodel() |
public static final String SITE_WIKIDATA
public static final String SITE_WIKIMEDIA_COMMONS
public static ItemIdValue makeItemIdValue(String id, String siteIri)
ItemIdValue
.id
- a string of the form Qn... where n... is the string
representation of a positive integer numbersiteIri
- IRI to identify the site, usually the first part of the entity
IRI of the site this belongs to, e.g.,
"http://www.wikidata.org/entity/"ItemIdValue
corresponding to the inputpublic static ItemIdValue makeWikidataItemIdValue(String id)
ItemIdValue
for Wikidata.id
- a string of the form Qn... where n... is the string
representation of a positive integer numberItemIdValue
corresponding to the inputpublic static PropertyIdValue makePropertyIdValue(String id, String siteIri)
PropertyIdValue
.id
- a string of the form Pn... where n... is the string
representation of a positive integer numbersiteIri
- IRI to identify the site, usually the first part of the entity
IRI of the site this belongs to, e.g.,
"http://www.wikidata.org/entity/"PropertyIdValue
corresponding to the inputpublic static PropertyIdValue makeWikidataPropertyIdValue(String id)
PropertyIdValue
.id
- a string of the form Pn... where n... is the string
representation of a positive integer numberPropertyIdValue
corresponding to the inputpublic static LexemeIdValue makeLexemeIdValue(String id, String siteIri)
LexemeIdValue
.id
- a string of the form Ln... where n... is the string
representation of a positive integer numbersiteIri
- IRI to identify the site, usually the first part of the entity
IRI of the site this belongs to, e.g.,
"http://www.wikidata.org/entity/"LexemeIdValue
corresponding to the inputpublic static LexemeIdValue makeWikidataLexemeIdValue(String id)
LexemeIdValue
for Wikidata.id
- a string of the form Ln... where n... is the string
representation of a positive integer numberLexemeIdValue
corresponding to the inputpublic static FormIdValue makeFormIdValue(String id, String siteIri)
FormIdValue
.id
- a string of the form Ln...-Fm... where n... and m... are the string
representation of a positive integer numbersiteIri
- IRI to identify the site, usually the first part of the entity
IRI of the site this belongs to, e.g.,
"http://www.wikidata.org/entity/"FormIdValue
corresponding to the inputpublic static FormIdValue makeWikidataFormIdValue(String id)
FormIdValue
for Wikidata.id
- a string of the form Ln...-F... where n... and m... are the string
representation of a positive integer numberFormIdValue
corresponding to the inputpublic static SenseIdValue makeSenseIdValue(String id, String siteIri)
SenseIdValue
.id
- a string of the form Ln...-Sm... where n... and m... are the string
representation of a positive integer numbersiteIri
- IRI to identify the site, usually the first part of the entity
IRI of the site this belongs to, e.g.,
"http://www.wikidata.org/entity/"SenseIdValue
corresponding to the inputpublic static SenseIdValue makeWikidataSenseIdValue(String id)
SenseIdValue
for Wikidata.id
- a string of the form Ln...-S... where n... and m... are the string
representation of a positive integer numberSenseIdValue
corresponding to the inputpublic static MediaInfoIdValue makeMediaInfoIdValue(String id, String siteIri)
MediaInfoIdValue
.id
- a string of the form Mn... where n... is the string
representation of a positive integer numbersiteIri
- IRI to identify the site, usually the first part of the entity
IRI of the site this belongs to, e.g.,
"http://www.wikidata.org/entity/"MediaInfoIdValue
corresponding to the inputpublic static MediaInfoIdValue makeWikimediaCommonsMediaInfoIdValue(String id)
MediaInfoIdValue
for Wikimedia Commons.id
- a string of the form Mn... where n... is the string
representation of a positive integer numberMediaInfoIdValue
corresponding to the inputpublic static DatatypeIdValue makeDatatypeIdValue(String id)
makeDatatypeIdValueFromJsonString(String)
DatatypeIdValue
. The datatype IRI is usually one of the
constants defined in DatatypeIdValue
, but this is not enforced,
since there might be extensions that provide additional types.id
- the IRI string that identifies the datatypeDatatypeIdValue
corresponding to the inputpublic static DatatypeIdValue makeDatatypeIdValueFromJsonString(String jsonString)
DatatypeIdValue
. The string is an identifier used in
the JSON serialization of properties to identify the datatype, and is one
of the constants defined in DatatypeIdValue
, but this is not enforced,
since there are extensions that provide additional types.jsonString
- the string that identifies the datatypeDatatypeIdValue
corresponding to the inputpublic static TimeValue makeTimeValue(long year, byte month, byte day, byte hour, byte minute, byte second, byte precision, int beforeTolerance, int afterTolerance, int timezoneOffset, String calendarModel)
TimeValue
.year
- a year number, where 0 refers to 1BCEmonth
- a month number between 1 and 12day
- a day number between 1 and 31hour
- an hour number between 0 and 23minute
- a minute number between 0 and 59second
- a second number between 0 and 60 (possible leap second)precision
- a value in the range of TimeValue.PREC_DAY
, ...,
TimeValue.PREC_1GY
beforeTolerance
- non-negative integer tolerance before the value; see
TimeValue.getBeforeTolerance()
afterTolerance
- non-zero, positive integer tolerance before the value; see
TimeValue.getAfterTolerance()
timezoneOffset
- offset in minutes that should be applied when displaying this
timecalendarModel
- the IRI of the calendar model preferred when displaying the
date; usually TimeValue.CM_GREGORIAN_PRO
or
TimeValue.CM_JULIAN_PRO
TimeValue
corresponding to the inputpublic static TimeValue makeTimeValue(long year, byte month, byte day, byte hour, byte minute, byte second, int timezoneOffset, String calendarModel)
TimeValue
for a given date and time. The precision is
automatically set to TimeValue.PREC_SECOND
.year
- a year number, where 0 refers to 1BCEmonth
- a month number between 1 and 12day
- a day number between 1 and 31hour
- an hour number between 0 and 23minute
- a minute number between 0 and 59second
- a second number between 0 and 60 (possible leap second)timezoneOffset
- offset in minutes that should be applied when displaying this
timecalendarModel
- the IRI of the calendar model preferred when displaying the
date; usually TimeValue.CM_GREGORIAN_PRO
or
TimeValue.CM_JULIAN_PRO
TimeValue
corresponding to the inputpublic static TimeValue makeTimeValue(long year, byte month, byte day, String calendarModel)
TimeValue
for a given date. The precision is
automatically set to TimeValue.PREC_DAY
.year
- a year number, where 0 refers to 1BCEmonth
- a month number between 1 and 12day
- a day number between 1 and 31calendarModel
- the IRI of the calendar model preferred when displaying the
date; usually TimeValue.CM_GREGORIAN_PRO
or
TimeValue.CM_JULIAN_PRO
TimeValue
corresponding to the inputpublic static GlobeCoordinatesValue makeGlobeCoordinatesValue(double latitude, double longitude, double precision, String globeIri)
GlobeCoordinatesValue
.latitude
- the latitude of the coordinates in degreeslongitude
- the longitude of the coordinates in degreesprecision
- the precision of the coordinates in degreesglobeIri
- IRI specifying the celestial objects of the coordinatesGlobeCoordinatesValue
corresponding to the inputpublic static StringValue makeStringValue(String string)
StringValue
.string
- StringValue
corresponding to the inputpublic static MonolingualTextValue makeMonolingualTextValue(String text, String languageCode)
MonolingualTextValue
.text
- the text of the valuelanguageCode
- the language code of the valueMonolingualTextValue
corresponding to the inputpublic static QuantityValue makeQuantityValue(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound, ItemIdValue unit)
QuantityValue
.numericValue
- the numeric value of this quantitylowerBound
- the lower bound of the numeric value of this quantityupperBound
- the upper bound of the numeric value of this quantityunit
- the unit identifier to use for this quantityQuantityValue
corresponding to the inputpublic static QuantityValue makeQuantityValue(BigDecimal numericValue, ItemIdValue unit)
QuantityValue
without bounds.numericValue
- the numeric value of this quantityunit
- the unit identifier to use for this quantityQuantityValue
corresponding to the inputpublic static QuantityValue makeQuantityValue(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound)
QuantityValue
with an empty unit.numericValue
- the numeric value of this quantitylowerBound
- the lower bound of the numeric value of this quantityupperBound
- the upper bound of the numeric value of this quantityQuantityValue
corresponding to the inputpublic static QuantityValue makeQuantityValue(BigDecimal numericValue)
QuantityValue
with an empty unit and without bounds.numericValue
- the numeric value of this quantityQuantityValue
corresponding to the inputpublic static QuantityValue makeQuantityValue(long numericValue, long lowerBound, long upperBound)
QuantityValue
from long numbers.numericValue
- the numeric value of this quantitylowerBound
- the lower bound of the numeric value of this quantityupperBound
- the upper bound of the numeric value of this quantityQuantityValue
corresponding to the inputpublic static ValueSnak makeValueSnak(PropertyIdValue propertyId, Value value)
ValueSnak
.propertyId
- value
- ValueSnak
corresponding to the inputpublic static SomeValueSnak makeSomeValueSnak(PropertyIdValue propertyId)
SomeValueSnak
.propertyId
- SomeValueSnak
corresponding to the inputpublic static NoValueSnak makeNoValueSnak(PropertyIdValue propertyId)
NoValueSnak
.propertyId
- NoValueSnak
corresponding to the inputpublic static SnakGroup makeSnakGroup(List<? extends Snak> snaks)
SnakGroup
.snaks
- a non-empty list of snaks that use the same propertySnakGroup
corresponding to the inputpublic static Claim makeClaim(EntityIdValue subject, Snak mainSnak, List<SnakGroup> qualifiers)
Claim
. It might be more convenient to use
makeStatement(org.wikidata.wdtk.datamodel.interfaces.EntityIdValue, org.wikidata.wdtk.datamodel.interfaces.Snak, java.util.List<org.wikidata.wdtk.datamodel.interfaces.SnakGroup>, java.util.List<org.wikidata.wdtk.datamodel.interfaces.Reference>, org.wikidata.wdtk.datamodel.interfaces.StatementRank, java.lang.String)
directly if you want to build a statement.subject
- the subject the Statement refers tomainSnak
- the main Snak of the Statementqualifiers
- the qualifiers of the Statement, grouped in SnakGroupsClaim
corresponding to the inputpublic static Reference makeReference(List<SnakGroup> snakGroups)
Reference
. It might be more convenient to use the
ReferenceBuilder
instead.snakGroups
- list of snak groupsReference
corresponding to the inputpublic static Statement makeStatement(EntityIdValue subject, Snak mainSnak, List<SnakGroup> qualifiers, List<Reference> references, StatementRank rank, String statementId)
Statement
. It might be more convenient to use the
StatementBuilder
instead.
The string id is used mainly for communication with a Wikibase site, in order to refer to statements of that site. When creating new statements that are not on any site, the empty string can be used.
subject
- the subject the Statement refers tomainSnak
- the main Snak of the Statementqualifiers
- the qualifiers of the Statement, grouped in SnakGroupsreferences
- the references for the Statementrank
- the rank of the StatementstatementId
- the string id of the StatementStatement
corresponding to the inputpublic static Statement makeStatement(Claim claim, List<Reference> references, StatementRank rank, String statementId)
Statement
. It might be more convenient to use the
StatementBuilder
instead.
The string id is used mainly for communication with a Wikibase site, in order to refer to statements of that site. When creating new statements that are not on any site, the empty string can be used.
claim
- the main claim the Statement refers toreferences
- the references for the Statementrank
- the rank of the StatementstatementId
- the string id of the StatementStatement
corresponding to the inputpublic static StatementGroup makeStatementGroup(List<Statement> statements)
StatementGroup
.statements
- a non-empty list of statements that use the same subject and
main-snak property in their claimStatementGroup
corresponding to the inputpublic static SiteLink makeSiteLink(String title, String siteKey, List<ItemIdValue> badges)
SiteLink
.title
- the title string of the linked page, including namespace
prefixes if anysiteKey
- the string key of the site of the linked articlebadges
- the list of badges of the linked articleSiteLink
corresponding to the inputpublic static SiteLink makeSiteLink(String title, String siteKey)
SiteLink
without badges.title
- the title string of the linked page, including namespace
prefixes if anysiteKey
- the string key of the site of the linked articleSiteLink
corresponding to the inputpublic static PropertyDocument makePropertyDocument(PropertyIdValue propertyId, DatatypeIdValue datatypeId)
PropertyDocument
.propertyId
- the id of the property that data is aboutdatatypeId
- the datatype of that propertyPropertyDocument
corresponding to the inputpublic static PropertyDocument makePropertyDocument(PropertyIdValue propertyId, List<MonolingualTextValue> labels, List<MonolingualTextValue> descriptions, List<MonolingualTextValue> aliases, List<StatementGroup> statementGroups, DatatypeIdValue datatypeId)
PropertyDocument
with empty revision id. It might be
more convenient to use the PropertyDocumentBuilder
instead.propertyId
- the id of the property that data is aboutlabels
- the list of labels of this property, with at most one label
for each language codedescriptions
- the list of descriptions of this property, with at most one
description for each language codealiases
- the list of aliases of this propertystatementGroups
- the list of statement groups of this item; all of them must
have the given itemIdValue as their subjectdatatypeId
- the datatype of that propertyPropertyDocument
corresponding to the inputpublic static PropertyDocument makePropertyDocument(PropertyIdValue propertyId, List<MonolingualTextValue> labels, List<MonolingualTextValue> descriptions, List<MonolingualTextValue> aliases, List<StatementGroup> statementGroups, DatatypeIdValue datatypeId, long revisionId)
PropertyDocument
. It might be more convenient to use
the PropertyDocumentBuilder
instead.propertyId
- the id of the property that data is aboutlabels
- the list of labels of this property, with at most one label
for each language codedescriptions
- the list of descriptions of this property, with at most one
description for each language codealiases
- the list of aliases of this propertystatementGroups
- the list of statement groups of this item; all of them must
have the given itemIdValue as their subjectdatatypeId
- the datatype of that propertyrevisionId
- the revision ID or 0 if not known; see
EntityDocument.getRevisionId()
PropertyDocument
corresponding to the inputpublic static ItemDocument makeItemDocument(ItemIdValue itemIdValue)
ItemDocument
.itemIdValue
- the id of the item that data is aboutItemDocument
corresponding to the inputpublic static ItemDocument makeItemDocument(ItemIdValue itemIdValue, List<MonolingualTextValue> labels, List<MonolingualTextValue> descriptions, List<MonolingualTextValue> aliases, List<StatementGroup> statementGroups, Map<String,SiteLink> siteLinks)
ItemDocument
with empty revision id. It might be more
convenient to use the ItemDocumentBuilder
instead.itemIdValue
- the id of the item that data is aboutlabels
- the list of labels of this item, with at most one label for
each language codedescriptions
- the list of descriptions of this item, with at most one
description for each language codealiases
- the list of aliases of this itemstatementGroups
- the list of statement groups of this item; all of them must
have the given itemIdValue as their subjectsiteLinks
- the sitelinks of this item by site keyItemDocument
corresponding to the inputpublic static ItemDocument makeItemDocument(ItemIdValue itemIdValue, List<MonolingualTextValue> labels, List<MonolingualTextValue> descriptions, List<MonolingualTextValue> aliases, List<StatementGroup> statementGroups, Map<String,SiteLink> siteLinks, long revisionId)
ItemDocument
. It might be more convenient to use the
ItemDocumentBuilder
instead.itemIdValue
- the id of the item that data is aboutlabels
- the list of labels of this item, with at most one label for
each language codedescriptions
- the list of descriptions of this item, with at most one
description for each language codealiases
- the list of aliases of this itemstatementGroups
- the list of statement groups of this item; all of them must
have the given itemIdValue as their subjectsiteLinks
- the sitelinks of this item by site keyrevisionId
- the revision ID or 0 if not known; see
EntityDocument.getRevisionId()
ItemDocument
corresponding to the inputpublic static LexemeDocument makeLexemeDocument(LexemeIdValue lexemeIdValue, ItemIdValue lexicalCategory, ItemIdValue language, List<MonolingualTextValue> lemmas)
LexemeDocument
.lexemeIdValue
- the id of the lexeme that data is aboutlexicalCategory
- the lexical category to which the lexeme belongs
(noun, verb...)language
- the language to which the lexeme belongs
(French, British English...)lemmas
- the human readable representations of the lexemeLexemeDocument
corresponding to the inputpublic static LexemeDocument makeLexemeDocument(LexemeIdValue lexemeIdValue, ItemIdValue lexicalCategory, ItemIdValue language, List<MonolingualTextValue> lemmas, List<StatementGroup> statementGroups, List<FormDocument> forms, List<SenseDocument> senses)
LexemeDocument
.lexemeIdValue
- the id of the lexeme that data is aboutlexicalCategory
- the lexical category to which the lexeme belongs
(noun, verb...)language
- the language to which the lexeme belongs
(French, British English...)lemmas
- the human readable representations of the lexemestatementGroups
- the list of statement groups of this lexeme; all of them must
have the given lexemeIdValue as their subjectforms
- the forms of the lexemesenses
- the senses of the lexemeLexemeDocument
corresponding to the inputpublic static FormDocument makeFormDocument(FormIdValue formIdValue, List<MonolingualTextValue> representations, List<ItemIdValue> grammaticalFeatures, List<StatementGroup> statementGroups)
FormDocument
.
If you plan to add this form to a specific lexeme,
it might be easier to use LexemeDocument.createForm(List)
.formIdValue
- the id of the form that data is aboutrepresentations
- the list of representations of this lexeme, with at most one
lemma for each language codegrammaticalFeatures
- the grammatical features of the lexemestatementGroups
- the list of statement groups of this lexeme; all of them must
have the given lexemeIdValue as their subjectLexemeDocument
corresponding to the inputpublic static SenseDocument makeSenseDocument(SenseIdValue senseIdValue, List<MonolingualTextValue> glosses, List<StatementGroup> statementGroups)
SenseDocument
.
If you plan to add this sense to a specific lexeme,
it might be easier to use LexemeDocument.createSense(List)
)}.senseIdValue
- the id of the form that data is aboutglosses
- the list of glosses of this lexeme, with at most one
gloss for each language codestatementGroups
- the list of statement groups of this lexeme; all of them must
have the given lexemeIdValue as their subjectSenseDocument
corresponding to the inputpublic static MediaInfoDocument makeMediaInfoDocument(MediaInfoIdValue mediaInfoIdValue)
MediaInfoDocument
.mediaInfoIdValue
- the id of the media that data is aboutMediaInfoDocument
corresponding to the inputpublic static MediaInfoDocument makeMediaInfoDocument(MediaInfoIdValue mediaInfoIdValue, List<MonolingualTextValue> labels, List<StatementGroup> statementGroups)
MediaInfoDocument
.mediaInfoIdValue
- the id of the media that data is aboutlabels
- the list of labels of this media, with at most one label for
each language codestatementGroups
- the list of statement groups of this media info; all of them must
have the given mediaInfoIdValue as their subjectMediaInfoDocument
corresponding to the inputpublic static TermUpdate makeTermUpdate(Collection<MonolingualTextValue> modified, Collection<String> removed)
TermUpdate
. It might be more convenient to
use TermUpdateBuilder
.modified
- added or changed valuesremoved
- language codes of removed valuesTermUpdate
NullPointerException
- if any required parameter is null
IllegalArgumentException
- if any parameters or their combination is invalidpublic static AliasUpdate makeAliasUpdate(List<MonolingualTextValue> recreated, List<MonolingualTextValue> added, Collection<MonolingualTextValue> removed)
AliasUpdate
. Callers should specify either
recreated
parameter or added
and removed
parameters,
because combination of the two update approaches is not possible. To remove
all aliases, pass empty list in recreated
parameter.
In most cases, it is more convenient to use makeAliasUpdate(List)
,
makeAliasUpdate(List, Collection)
, or AliasUpdateBuilder
.
recreated
- new list of aliases that completely replaces the old ones or
null
to not recreate aliasesadded
- aliases added in this update or empty collection for no additionsremoved
- aliases removed in this update or empty collection for no removalsAliasUpdate
NullPointerException
- if added
, removed
, or any alias is null
IllegalArgumentException
- if given invalid combination of parameterspublic static AliasUpdate makeAliasUpdate(List<MonolingualTextValue> recreated)
AliasUpdate
that completely replaces all aliases.recreated
- new list of aliases that completely replaces the old onesAliasUpdate
NullPointerException
- if the parameter or any alias is null
IllegalArgumentException
- if language codes are inconsistent or there are alias duplicatespublic static AliasUpdate makeAliasUpdate(List<MonolingualTextValue> added, Collection<MonolingualTextValue> removed)
AliasUpdate
that adds and/or removes some of the aliases.
It might be more convenient to use AliasUpdateBuilder
.added
- aliases to addremoved
- aliases to removeAliasUpdate
NullPointerException
- if any parameter or any alias is null
IllegalArgumentException
- if language codes are inconsistent or there are alias duplicatespublic static StatementUpdate makeStatementUpdate(Collection<Statement> added, Collection<Statement> replaced, Collection<String> removed)
StatementUpdate
. It might be more convenient to use
StatementUpdateBuilder
.added
- added statementsreplaced
- replaced statementsremoved
- IDs of removed statementsStatementUpdate
NullPointerException
- if any required parameter is null
IllegalArgumentException
- if any parameters or their combination is invalidpublic static SenseUpdate makeSenseUpdate(SenseIdValue entityId, long revisionId, TermUpdate glosses, StatementUpdate statements)
SenseUpdate
. It might be more convenient to use
SenseUpdateBuilder
.entityId
- ID of the sense that is to be updatedrevisionId
- base sense revision to be updated or zero if not availableglosses
- changes in sense glosses or null
for no changestatements
- changes in entity statements, possibly emptySenseUpdate
NullPointerException
- if any required parameter is null
IllegalArgumentException
- if any parameters or their combination is invalidpublic static FormUpdate makeFormUpdate(FormIdValue entityId, long revisionId, TermUpdate representations, Collection<ItemIdValue> grammaticalFeatures, StatementUpdate statements)
FormUpdate
. It might be more convenient to use
FormUpdateBuilder
.entityId
- ID of the form that is to be updatedrevisionId
- base form revision to be updated or zero if not availablerepresentations
- changes in form representations or null
for no changegrammaticalFeatures
- new grammatical features of the form or null
for no changestatements
- changes in entity statements, possibly emptyFormUpdate
NullPointerException
- if any required parameter is null
IllegalArgumentException
- if any parameters or their combination is invalidpublic static LexemeUpdate makeLexemeUpdate(LexemeIdValue entityId, long revisionId, ItemIdValue language, ItemIdValue lexicalCategory, TermUpdate lemmas, StatementUpdate statements, Collection<SenseDocument> addedSenses, Collection<SenseUpdate> updatedSenses, Collection<SenseIdValue> removedSenses, Collection<FormDocument> addedForms, Collection<FormUpdate> updatedForms, Collection<FormIdValue> removedForms)
LexemeUpdate
. It might be more convenient to use
LexemeUpdateBuilder
.entityId
- ID of the lexeme that is to be updatedrevisionId
- base lexeme revision to be updated or zero if not availablelanguage
- new lexeme language or null
for no changelexicalCategory
- new lexical category of the lexeme or null
for no changelemmas
- changes in lemmas or null
for no changestatements
- changes in entity statements, possibly emptyaddedSenses
- added sensesupdatedSenses
- updated sensesremovedSenses
- IDs of removed sensesaddedForms
- added formsupdatedForms
- updated formsremovedForms
- IDs of removed formsLexemeUpdate
NullPointerException
- if any required parameter is null
IllegalArgumentException
- if any parameters or their combination is invalidpublic static MediaInfoUpdate makeMediaInfoUpdate(MediaInfoIdValue entityId, long revisionId, TermUpdate labels, StatementUpdate statements)
MediaInfoUpdate
. It might be more convenient to use
MediaInfoUpdateBuilder
.entityId
- ID of the media that is to be updatedrevisionId
- base media revision to be updated or zero if not availablelabels
- changes in entity labels or null
for no changestatements
- changes in entity statements, possibly emptyMediaInfoUpdate
NullPointerException
- if any required parameter is null
IllegalArgumentException
- if any parameters or their combination is invalidpublic static ItemUpdate makeItemUpdate(ItemIdValue entityId, long revisionId, TermUpdate labels, TermUpdate descriptions, Map<String,AliasUpdate> aliases, StatementUpdate statements, Collection<SiteLink> modifiedSiteLinks, Collection<String> removedSiteLinks)
ItemUpdate
. It might be more convenient to use
ItemUpdateBuilder
.entityId
- ID of the item that is to be updatedrevisionId
- base item revision to be updated or zero if not availablelabels
- changes in entity labels or null
for no changedescriptions
- changes in entity descriptions or null
for no changealiases
- changes in entity aliases, possibly emptystatements
- changes in entity statements, possibly emptymodifiedSiteLinks
- added or replaced site linksremovedSiteLinks
- site keys of removed site linksItemUpdate
NullPointerException
- if any required parameter is null
IllegalArgumentException
- if any parameters or their combination is invalidpublic static PropertyUpdate makePropertyUpdate(PropertyIdValue entityId, long revisionId, TermUpdate labels, TermUpdate descriptions, Map<String,AliasUpdate> aliases, StatementUpdate statements)
PropertyUpdate
. It might be more convenient to use
PropertyUpdateBuilder
.entityId
- ID of the property entity that is to be updatedrevisionId
- base property revision to be updated or zero if not availablelabels
- changes in entity labels or null
for no changedescriptions
- changes in entity descriptions or null
for no changealiases
- changes in entity aliases, possibly emptystatements
- changes in entity statements, possibly emptyPropertyUpdate
NullPointerException
- if any required parameter is null
IllegalArgumentException
- if any parameters or their combination is invalidCopyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage