public interface DataObjectFactory
ItemIdValue getItemIdValue(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 inputPropertyIdValue getPropertyIdValue(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 inputLexemeIdValue getLexemeIdValue(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 inputFormIdValue getFormIdValue(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 inputSenseIdValue getSenseIdValue(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 inputMediaInfoIdValue getMediaInfoIdValue(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 inputDatatypeIdValue getDatatypeIdValue(String id)
getDatatypeIdValueFromJsonId(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 inputDatatypeIdValue getDatatypeIdValueFromJsonId(String jsonId)
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. The JSON
string is its representation in the JSON serialization of properties.jsonId
- the JSON representation of this datatype, which cannot be nullDatatypeIdValue
corresponding to the inputTimeValue getTimeValue(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()
calendarModel
- the IRI of the calendar model preferred when displaying the
date; usually TimeValue.CM_GREGORIAN_PRO
or
TimeValue.CM_JULIAN_PRO
timezoneOffset
- offset in minutes that should be applied when displaying this
timeTimeValue
corresponding to the inputGlobeCoordinatesValue getGlobeCoordinatesValue(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 inputStringValue getStringValue(String string)
StringValue
.string
- StringValue
corresponding to the inputMonolingualTextValue getMonolingualTextValue(String text, String languageCode)
MonolingualTextValue
.text
- the text of the valuelanguageCode
- the language code of the valueMonolingualTextValue
corresponding to the inputQuantityValue getQuantityValue(BigDecimal numericValue)
QuantityValue
without a unit of measurement and bounds.numericValue
- the numeric value of this quantityQuantityValue
corresponding to the inputQuantityValue getQuantityValue(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound)
QuantityValue
without a unit of measurement.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 input@Deprecated QuantityValue getQuantityValue(BigDecimal numericValue, String unit)
getQuantityValue(BigDecimal, ItemIdValue)
QuantityValue
without bounds.numericValue
- the numeric value of this quantityunit
- the unit of this quantity, or the empty string if there is no
unitQuantityValue
corresponding to the inputQuantityValue getQuantityValue(BigDecimal numericValue, ItemIdValue unit)
QuantityValue
without bounds.numericValue
- the numeric value of this quantityunit
- the unit of this quantity, or null if there is no
unitQuantityValue
corresponding to the input@Deprecated QuantityValue getQuantityValue(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound, String 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 of this quantity, or the empty string if there is no
unitQuantityValue
corresponding to the inputQuantityValue getQuantityValue(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 of this quantity, or null if there is no
unitQuantityValue
corresponding to the inputValueSnak getValueSnak(PropertyIdValue propertyId, Value value)
ValueSnak
.propertyId
- value
- ValueSnak
corresponding to the inputSomeValueSnak getSomeValueSnak(PropertyIdValue propertyId)
SomeValueSnak
.propertyId
- SomeValueSnak
corresponding to the inputNoValueSnak getNoValueSnak(PropertyIdValue propertyId)
NoValueSnak
.propertyId
- NoValueSnak
corresponding to the inputSnakGroup getSnakGroup(List<? extends Snak> snaks)
SnakGroup
.snaks
- a non-empty list of snaks that use the same propertySnakGroup
corresponding to the inputClaim getClaim(EntityIdValue subject, Snak mainSnak, List<SnakGroup> qualifiers)
Claim
. It might be more convenient to use
getStatement(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 inputReference getReference(List<SnakGroup> snakGroups)
Reference
. It might be more convenient to use
ReferenceBuilder
instead.snakGroups
- list of snak groupsReference
corresponding to the inputStatement getStatement(EntityIdValue subject, Snak mainSnak, List<SnakGroup> qualifiers, List<Reference> references, StatementRank rank, String statementId)
Statement
. It might be more convenient to use
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 inputStatement getStatement(Claim claim, List<Reference> references, StatementRank rank, String statementId)
Statement
. It might be more convenient to use
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 inputStatementGroup getStatementGroup(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 inputSiteLink getSiteLink(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 inputPropertyDocument getPropertyDocument(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 inputItemDocument getItemDocument(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 inputLexemeDocument getLexemeDocument(LexemeIdValue lexemeIdValue, ItemIdValue lexicalCategory, ItemIdValue language, List<MonolingualTextValue> lemmas, List<StatementGroup> statementGroups, List<FormDocument> forms, List<SenseDocument> senses, long revisionId)
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 lexemerevisionId
- the revision ID or 0 if not known; see
EntityDocument.getRevisionId()
LexemeDocument
corresponding to the inputFormDocument getFormDocument(FormIdValue formIdValue, List<MonolingualTextValue> representations, List<ItemIdValue> grammaticalFeatures, List<StatementGroup> statementGroups, long revisionId)
FormDocument
.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 subjectrevisionId
- the revision ID or 0 if not known; see
EntityDocument.getRevisionId()
FormDocument
corresponding to the inputSenseDocument getSenseDocument(SenseIdValue senseIdValue, List<MonolingualTextValue> glosses, List<StatementGroup> statementGroups, long revisionId)
SenseDocument
.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 subjectrevisionId
- the revision ID or 0 if not known; see
EntityDocument.getRevisionId()
SenseDocument
corresponding to the inputMediaInfoDocument getMediaInfoDocument(MediaInfoIdValue mediaInfoIdValue, List<MonolingualTextValue> labels, List<StatementGroup> statementGroups, long revisionId)
MediaInfoDocument
.mediaInfoIdValue
- the id of the form that data is aboutlabels
- the list of labels of this media info, with at most one label for
each language codestatementGroups
- the list of statement groups of this lexeme; all of them must
have the given mediaInfoIdValue as their subjectrevisionId
- the revision ID or 0 if not known; see
EntityDocument.getRevisionId()
MediaInfoDocument
corresponding to the inputTermUpdate getTermUpdate(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 invalidAliasUpdate getAliasUpdate(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.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 parametersStatementUpdate getStatementUpdate(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 invalidSenseUpdate getSenseUpdate(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 invalidFormUpdate getFormUpdate(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 invalidLexemeUpdate getLexemeUpdate(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 invalidMediaInfoUpdate getMediaInfoUpdate(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 invalidItemUpdate getItemUpdate(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 invalidPropertyUpdate getPropertyUpdate(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