Class DataObjectFactoryImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.DataObjectFactoryImpl
- All Implemented Interfaces:
DataObjectFactory
Factory implementation to create Jackson versions of the datamodel objects,
where available.
- Author:
- Markus Kroetzsch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAliasUpdate(List<MonolingualTextValue> recreated, List<MonolingualTextValue> added, Collection<MonolingualTextValue> removed) Creates newAliasUpdate.getClaim(EntityIdValue subject, Snak mainSnak, List<SnakGroup> qualifiers) Creates aClaim.Creates aDatatypeIdValue.getDatatypeIdValueFromJsonId(String jsonId) Creates aDatatypeIdValue.getFormDocument(FormIdValue formIdValue, List<MonolingualTextValue> representations, List<ItemIdValue> grammaticalFeatures, List<StatementGroup> statementGroups, long revisionId) Creates anFormDocument.getFormIdValue(String id, String siteIri) Creates aFormIdValue.getFormUpdate(FormIdValue entityId, long revisionId, TermUpdate representations, Collection<ItemIdValue> grammaticalFeatures, StatementUpdate statements) Creates newFormUpdate.getGlobeCoordinatesValue(double latitude, double longitude, double precision, String globeIri) Creates aGlobeCoordinatesValue.getItemDocument(ItemIdValue itemIdValue, List<MonolingualTextValue> labels, List<MonolingualTextValue> descriptions, List<MonolingualTextValue> aliases, List<StatementGroup> statementGroups, Map<String, SiteLink> siteLinks, long revisionId) Creates anItemDocument.getItemIdValue(String id, String siteIri) Creates anItemIdValue.getItemUpdate(ItemIdValue entityId, long revisionId, TermUpdate labels, TermUpdate descriptions, Map<String, AliasUpdate> aliases, StatementUpdate statements, Collection<SiteLink> modifiedSiteLinks, Collection<String> removedSiteLinks) Creates newItemUpdate.getLexemeDocument(LexemeIdValue lexemeIdValue, ItemIdValue lexicalCategory, ItemIdValue language, List<MonolingualTextValue> lemmas, List<StatementGroup> statementGroups, List<FormDocument> forms, List<SenseDocument> senses, long revisionId) Creates anLexemeDocument.getLexemeIdValue(String id, String siteIri) Creates aLexemeIdValue.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) Creates newLexemeUpdate.getMediaInfoDocument(MediaInfoIdValue mediaInfoIdValue, List<MonolingualTextValue> labels, List<StatementGroup> statementGroups, long revisionId) Creates aMediaInfoDocument.getMediaInfoIdValue(String id, String siteIri) Creates aMediaInfoIdValue.getMediaInfoUpdate(MediaInfoIdValue entityId, long revisionId, TermUpdate labels, StatementUpdate statements) Creates newMediaInfoUpdate.getMonolingualTextValue(String text, String languageCode) Creates aMonolingualTextValue.getNoValueSnak(PropertyIdValue propertyId) Creates aNoValueSnak.getPropertyDocument(PropertyIdValue propertyId, List<MonolingualTextValue> labels, List<MonolingualTextValue> descriptions, List<MonolingualTextValue> aliases, List<StatementGroup> statementGroups, DatatypeIdValue datatypeId, long revisionId) Creates aPropertyDocument.getPropertyIdValue(String id, String siteIri) Creates aPropertyIdValue.getPropertyUpdate(PropertyIdValue entityId, long revisionId, TermUpdate labels, TermUpdate descriptions, Map<String, AliasUpdate> aliases, StatementUpdate statements) Creates newPropertyUpdate.getQuantityValue(BigDecimal numericValue) Creates aQuantityValuewithout a unit of measurement and bounds.getQuantityValue(BigDecimal numericValue, String unit) Creates aQuantityValuewithout bounds.getQuantityValue(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound) Creates aQuantityValuewithout a unit of measurement.getQuantityValue(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound, String unit) Deprecated.getQuantityValue(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound, ItemIdValue unit) Creates aQuantityValue.getQuantityValue(BigDecimal numericValue, ItemIdValue unit) Creates aQuantityValuewithout bounds.getReference(List<SnakGroup> snakGroups) Creates aReference.getSenseDocument(SenseIdValue senseIdValue, List<MonolingualTextValue> glosses, List<StatementGroup> statementGroups, long revisionId) Creates aSenseDocument.getSenseIdValue(String id, String siteIri) Creates aSenseIdValue.getSenseUpdate(SenseIdValue entityId, long revisionId, TermUpdate glosses, StatementUpdate statements) Creates newSenseUpdate.getSiteLink(String title, String siteKey, List<ItemIdValue> badges) Creates aSiteLink.getSnakGroup(List<? extends Snak> snaks) Creates aSnakGroup.getSomeValueSnak(PropertyIdValue propertyId) Creates aSomeValueSnak.getStatement(Claim claim, List<Reference> references, StatementRank rank, String statementId) Creates aStatement.getStatement(EntityIdValue subject, Snak mainSnak, List<SnakGroup> qualifiers, List<Reference> references, StatementRank rank, String statementId) Creates aStatement.getStatementGroup(List<Statement> statements) Creates aStatementGroup.getStatementUpdate(Collection<Statement> added, Collection<Statement> replaced, Collection<String> removed) Creates newStatementUpdate.getStringValue(String string) Creates aStringValue.getTermUpdate(Collection<MonolingualTextValue> modified, Collection<String> removed) Creates newTermUpdate.getTimeValue(long year, byte month, byte day, byte hour, byte minute, byte second, byte precision, int beforeTolerance, int afterTolerance, int timezoneOffset, String calendarModel) Creates aTimeValue.getValueSnak(PropertyIdValue propertyId, Value value) Creates aValueSnakImpl.
-
Constructor Details
-
DataObjectFactoryImpl
public DataObjectFactoryImpl()
-
-
Method Details
-
getItemIdValue
Description copied from interface:DataObjectFactoryCreates anItemIdValue.- Specified by:
getItemIdValuein interfaceDataObjectFactory- Parameters:
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/"- Returns:
- an
ItemIdValuecorresponding to the input
-
getPropertyIdValue
Description copied from interface:DataObjectFactoryCreates aPropertyIdValue.- Specified by:
getPropertyIdValuein interfaceDataObjectFactory- Parameters:
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/"- Returns:
- a
PropertyIdValuecorresponding to the input
-
getLexemeIdValue
Description copied from interface:DataObjectFactoryCreates aLexemeIdValue.- Specified by:
getLexemeIdValuein interfaceDataObjectFactory- Parameters:
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/"- Returns:
- a
LexemeIdValuecorresponding to the input
-
getFormIdValue
Description copied from interface:DataObjectFactoryCreates aFormIdValue.- Specified by:
getFormIdValuein interfaceDataObjectFactory- Parameters:
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/"- Returns:
- a
FormIdValuecorresponding to the input
-
getSenseIdValue
Description copied from interface:DataObjectFactoryCreates aSenseIdValue.- Specified by:
getSenseIdValuein interfaceDataObjectFactory- Parameters:
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/"- Returns:
- a
SenseIdValuecorresponding to the input
-
getMediaInfoIdValue
Description copied from interface:DataObjectFactoryCreates aMediaInfoIdValue.- Specified by:
getMediaInfoIdValuein interfaceDataObjectFactory- Parameters:
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/"- Returns:
- a
MediaInfoIdValuecorresponding to the input
-
getDatatypeIdValue
Description copied from interface:DataObjectFactoryCreates aDatatypeIdValue. The datatype IRI is usually one of the constants defined inDatatypeIdValue, but this is not enforced, since there might be extensions that provide additional types.- Specified by:
getDatatypeIdValuein interfaceDataObjectFactory- Parameters:
id- the IRI string that identifies the datatype- Returns:
- a
DatatypeIdValuecorresponding to the input
-
getDatatypeIdValueFromJsonId
Description copied from interface:DataObjectFactoryCreates aDatatypeIdValue. The datatype IRI is usually one of the constants defined inDatatypeIdValue, 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.- Specified by:
getDatatypeIdValueFromJsonIdin interfaceDataObjectFactory- Parameters:
jsonId- the JSON representation of this datatype, which cannot be null- Returns:
- a
DatatypeIdValuecorresponding to the input
-
getTimeValue
public TimeValue getTimeValue(long year, byte month, byte day, byte hour, byte minute, byte second, byte precision, int beforeTolerance, int afterTolerance, int timezoneOffset, String calendarModel) Description copied from interface:DataObjectFactoryCreates aTimeValue.- Specified by:
getTimeValuein interfaceDataObjectFactory- Parameters:
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 ofTimeValue.PREC_DAY, ...,TimeValue.PREC_1GYbeforeTolerance- non-negative integer tolerance before the value; seeTimeValue.getBeforeTolerance()afterTolerance- non-zero, positive integer tolerance before the value; seeTimeValue.getAfterTolerance()timezoneOffset- offset in minutes that should be applied when displaying this timecalendarModel- the IRI of the calendar model preferred when displaying the date; usuallyTimeValue.CM_GREGORIAN_PROorTimeValue.CM_JULIAN_PRO- Returns:
- a
TimeValuecorresponding to the input
-
getGlobeCoordinatesValue
public GlobeCoordinatesValue getGlobeCoordinatesValue(double latitude, double longitude, double precision, String globeIri) Description copied from interface:DataObjectFactoryCreates aGlobeCoordinatesValue.- Specified by:
getGlobeCoordinatesValuein interfaceDataObjectFactory- Parameters:
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 coordinates- Returns:
- a
GlobeCoordinatesValuecorresponding to the input
-
getStringValue
Description copied from interface:DataObjectFactoryCreates aStringValue.- Specified by:
getStringValuein interfaceDataObjectFactory- Returns:
- a
StringValuecorresponding to the input
-
getMonolingualTextValue
Description copied from interface:DataObjectFactoryCreates aMonolingualTextValue.- Specified by:
getMonolingualTextValuein interfaceDataObjectFactory- Parameters:
text- the text of the valuelanguageCode- the language code of the value- Returns:
- a
MonolingualTextValuecorresponding to the input
-
getQuantityValue
Description copied from interface:DataObjectFactoryCreates aQuantityValuewithout a unit of measurement and bounds.- Specified by:
getQuantityValuein interfaceDataObjectFactory- Parameters:
numericValue- the numeric value of this quantity- Returns:
- a
QuantityValuecorresponding to the input
-
getQuantityValue
public QuantityValue getQuantityValue(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound) Description copied from interface:DataObjectFactoryCreates aQuantityValuewithout a unit of measurement.- Specified by:
getQuantityValuein interfaceDataObjectFactory- Parameters:
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 quantity- Returns:
- a
QuantityValuecorresponding to the input
-
getQuantityValue
Description copied from interface:DataObjectFactoryCreates aQuantityValuewithout bounds.- Specified by:
getQuantityValuein interfaceDataObjectFactory- Parameters:
numericValue- the numeric value of this quantityunit- the unit of this quantity, or the empty string if there is no unit- Returns:
- a
QuantityValuecorresponding to the input
-
getQuantityValue
Description copied from interface:DataObjectFactoryCreates aQuantityValuewithout bounds.- Specified by:
getQuantityValuein interfaceDataObjectFactory- Parameters:
numericValue- the numeric value of this quantityunit- the unit of this quantity, or null if there is no unit- Returns:
- a
QuantityValuecorresponding to the input
-
getQuantityValue
@Deprecated public QuantityValue getQuantityValue(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound, String unit) Deprecated.Description copied from interface:DataObjectFactoryCreates aQuantityValue.- Specified by:
getQuantityValuein interfaceDataObjectFactory- Parameters:
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 unit- Returns:
- a
QuantityValuecorresponding to the input
-
getQuantityValue
public QuantityValue getQuantityValue(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound, ItemIdValue unit) Description copied from interface:DataObjectFactoryCreates aQuantityValue.- Specified by:
getQuantityValuein interfaceDataObjectFactory- Parameters:
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 unit- Returns:
- a
QuantityValuecorresponding to the input
-
getValueSnak
Creates aValueSnakImpl. Value snaks in JSON need to know the datatype of their property, which is not given in the parameters of this method. The snak that will be returned will use a default type based on the kind of value that is used (usually the "simplest" type for that value). This may not be desired.- Specified by:
getValueSnakin interfaceDataObjectFactory- Returns:
- a
ValueSnakcorresponding to the input - See Also:
-
getSomeValueSnak
Description copied from interface:DataObjectFactoryCreates aSomeValueSnak.- Specified by:
getSomeValueSnakin interfaceDataObjectFactory- Returns:
- a
SomeValueSnakcorresponding to the input
-
getNoValueSnak
Description copied from interface:DataObjectFactoryCreates aNoValueSnak.- Specified by:
getNoValueSnakin interfaceDataObjectFactory- Returns:
- a
NoValueSnakcorresponding to the input
-
getSnakGroup
Description copied from interface:DataObjectFactoryCreates aSnakGroup.- Specified by:
getSnakGroupin interfaceDataObjectFactory- Parameters:
snaks- a non-empty list of snaks that use the same property- Returns:
- a
SnakGroupcorresponding to the input
-
getClaim
Description copied from interface:DataObjectFactoryCreates aClaim. It might be more convenient to useDataObjectFactory.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.- Specified by:
getClaimin interfaceDataObjectFactory- Parameters:
subject- the subject the Statement refers tomainSnak- the main Snak of the Statementqualifiers- the qualifiers of the Statement, grouped in SnakGroups- Returns:
- a
Claimcorresponding to the input
-
getReference
Description copied from interface:DataObjectFactoryCreates aReference. It might be more convenient to useReferenceBuilderinstead.- Specified by:
getReferencein interfaceDataObjectFactory- Parameters:
snakGroups- list of snak groups- Returns:
- a
Referencecorresponding to the input
-
getStatement
public Statement getStatement(Claim claim, List<Reference> references, StatementRank rank, String statementId) Description copied from interface:DataObjectFactoryCreates aStatement. It might be more convenient to useStatementBuilderinstead.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.
- Specified by:
getStatementin interfaceDataObjectFactory- Parameters:
claim- the main claim the Statement refers toreferences- the references for the Statementrank- the rank of the StatementstatementId- the string id of the Statement- Returns:
- a
Statementcorresponding to the input
-
getStatement
public Statement getStatement(EntityIdValue subject, Snak mainSnak, List<SnakGroup> qualifiers, List<Reference> references, StatementRank rank, String statementId) Description copied from interface:DataObjectFactoryCreates aStatement. It might be more convenient to useStatementBuilderinstead.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.
- Specified by:
getStatementin interfaceDataObjectFactory- Parameters:
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 Statement- Returns:
- a
Statementcorresponding to the input
-
getStatementGroup
Description copied from interface:DataObjectFactoryCreates aStatementGroup.- Specified by:
getStatementGroupin interfaceDataObjectFactory- Parameters:
statements- a non-empty list of statements that use the same subject and main-snak property in their claim- Returns:
- a
StatementGroupcorresponding to the input
-
getSiteLink
Description copied from interface:DataObjectFactoryCreates aSiteLink.- Specified by:
getSiteLinkin interfaceDataObjectFactory- Parameters:
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 article- Returns:
- a
SiteLinkcorresponding to the input
-
getPropertyDocument
public PropertyDocument getPropertyDocument(PropertyIdValue propertyId, List<MonolingualTextValue> labels, List<MonolingualTextValue> descriptions, List<MonolingualTextValue> aliases, List<StatementGroup> statementGroups, DatatypeIdValue datatypeId, long revisionId) Description copied from interface:DataObjectFactoryCreates aPropertyDocument. It might be more convenient to use thePropertyDocumentBuilderinstead.- Specified by:
getPropertyDocumentin interfaceDataObjectFactory- Parameters:
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; seeEntityDocument.getRevisionId()- Returns:
- a
PropertyDocumentcorresponding to the input
-
getItemDocument
public ItemDocument getItemDocument(ItemIdValue itemIdValue, List<MonolingualTextValue> labels, List<MonolingualTextValue> descriptions, List<MonolingualTextValue> aliases, List<StatementGroup> statementGroups, Map<String, SiteLink> siteLinks, long revisionId) Description copied from interface:DataObjectFactoryCreates anItemDocument. It might be more convenient to use theItemDocumentBuilderinstead.- Specified by:
getItemDocumentin interfaceDataObjectFactory- Parameters:
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; seeEntityDocument.getRevisionId()- Returns:
- an
ItemDocumentcorresponding to the input
-
getLexemeDocument
public LexemeDocument getLexemeDocument(LexemeIdValue lexemeIdValue, ItemIdValue lexicalCategory, ItemIdValue language, List<MonolingualTextValue> lemmas, List<StatementGroup> statementGroups, List<FormDocument> forms, List<SenseDocument> senses, long revisionId) Description copied from interface:DataObjectFactoryCreates anLexemeDocument.- Specified by:
getLexemeDocumentin interfaceDataObjectFactory- Parameters:
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; seeEntityDocument.getRevisionId()- Returns:
- a
LexemeDocumentcorresponding to the input
-
getFormDocument
public FormDocument getFormDocument(FormIdValue formIdValue, List<MonolingualTextValue> representations, List<ItemIdValue> grammaticalFeatures, List<StatementGroup> statementGroups, long revisionId) Description copied from interface:DataObjectFactoryCreates anFormDocument.- Specified by:
getFormDocumentin interfaceDataObjectFactory- Parameters:
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; seeEntityDocument.getRevisionId()- Returns:
- a
FormDocumentcorresponding to the input
-
getSenseDocument
public SenseDocument getSenseDocument(SenseIdValue senseIdValue, List<MonolingualTextValue> glosses, List<StatementGroup> statementGroups, long revisionId) Description copied from interface:DataObjectFactoryCreates aSenseDocument.- Specified by:
getSenseDocumentin interfaceDataObjectFactory- Parameters:
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; seeEntityDocument.getRevisionId()- Returns:
- a
SenseDocumentcorresponding to the input
-
getMediaInfoDocument
public MediaInfoDocument getMediaInfoDocument(MediaInfoIdValue mediaInfoIdValue, List<MonolingualTextValue> labels, List<StatementGroup> statementGroups, long revisionId) Description copied from interface:DataObjectFactoryCreates aMediaInfoDocument.- Specified by:
getMediaInfoDocumentin interfaceDataObjectFactory- Parameters:
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; seeEntityDocument.getRevisionId()- Returns:
- a
MediaInfoDocumentcorresponding to the input
-
getTermUpdate
public TermUpdate getTermUpdate(Collection<MonolingualTextValue> modified, Collection<String> removed) Description copied from interface:DataObjectFactoryCreates newTermUpdate. It might be more convenient to useTermUpdateBuilder.- Specified by:
getTermUpdatein interfaceDataObjectFactory- Parameters:
modified- added or changed valuesremoved- language codes of removed values- Returns:
- new
TermUpdate
-
getAliasUpdate
public AliasUpdate getAliasUpdate(List<MonolingualTextValue> recreated, List<MonolingualTextValue> added, Collection<MonolingualTextValue> removed) Description copied from interface:DataObjectFactoryCreates newAliasUpdate. Callers should specify eitherrecreatedparameter oraddedandremovedparameters, because combination of the two update approaches is not possible. To remove all aliases, pass empty list inrecreatedparameter.- Specified by:
getAliasUpdatein interfaceDataObjectFactory- Parameters:
recreated- new list of aliases that completely replaces the old ones ornullto not recreate aliasesadded- aliases added in this update or empty collection for no additionsremoved- aliases removed in this update or empty collection for no removals- Returns:
- new
AliasUpdate
-
getStatementUpdate
public StatementUpdate getStatementUpdate(Collection<Statement> added, Collection<Statement> replaced, Collection<String> removed) Description copied from interface:DataObjectFactoryCreates newStatementUpdate. It might be more convenient to useStatementUpdateBuilder.- Specified by:
getStatementUpdatein interfaceDataObjectFactory- Parameters:
added- added statementsreplaced- replaced statementsremoved- IDs of removed statements- Returns:
- new
StatementUpdate
-
getSenseUpdate
public SenseUpdate getSenseUpdate(SenseIdValue entityId, long revisionId, TermUpdate glosses, StatementUpdate statements) Description copied from interface:DataObjectFactoryCreates newSenseUpdate. It might be more convenient to useSenseUpdateBuilder.- Specified by:
getSenseUpdatein interfaceDataObjectFactory- Parameters:
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 ornullfor no changestatements- changes in entity statements, possibly empty- Returns:
- new
SenseUpdate
-
getFormUpdate
public FormUpdate getFormUpdate(FormIdValue entityId, long revisionId, TermUpdate representations, Collection<ItemIdValue> grammaticalFeatures, StatementUpdate statements) Description copied from interface:DataObjectFactoryCreates newFormUpdate. It might be more convenient to useFormUpdateBuilder.- Specified by:
getFormUpdatein interfaceDataObjectFactory- Parameters:
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 ornullfor no changegrammaticalFeatures- new grammatical features of the form ornullfor no changestatements- changes in entity statements, possibly empty- Returns:
- new
FormUpdate
-
getLexemeUpdate
public LexemeUpdate 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) Description copied from interface:DataObjectFactoryCreates newLexemeUpdate. It might be more convenient to useLexemeUpdateBuilder.- Specified by:
getLexemeUpdatein interfaceDataObjectFactory- Parameters:
entityId- ID of the lexeme that is to be updatedrevisionId- base lexeme revision to be updated or zero if not availablelanguage- new lexeme language ornullfor no changelexicalCategory- new lexical category of the lexeme ornullfor no changelemmas- changes in lemmas ornullfor no changestatements- changes in entity statements, possibly emptyaddedSenses- added sensesupdatedSenses- updated sensesremovedSenses- IDs of removed sensesaddedForms- added formsupdatedForms- updated formsremovedForms- IDs of removed forms- Returns:
- new
LexemeUpdate
-
getMediaInfoUpdate
public MediaInfoUpdate getMediaInfoUpdate(MediaInfoIdValue entityId, long revisionId, TermUpdate labels, StatementUpdate statements) Description copied from interface:DataObjectFactoryCreates newMediaInfoUpdate. It might be more convenient to useMediaInfoUpdateBuilder.- Specified by:
getMediaInfoUpdatein interfaceDataObjectFactory- Parameters:
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 ornullfor no changestatements- changes in entity statements, possibly empty- Returns:
- new
MediaInfoUpdate
-
getItemUpdate
public ItemUpdate getItemUpdate(ItemIdValue entityId, long revisionId, TermUpdate labels, TermUpdate descriptions, Map<String, AliasUpdate> aliases, StatementUpdate statements, Collection<SiteLink> modifiedSiteLinks, Collection<String> removedSiteLinks) Description copied from interface:DataObjectFactoryCreates newItemUpdate. It might be more convenient to useItemUpdateBuilder.- Specified by:
getItemUpdatein interfaceDataObjectFactory- Parameters:
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 ornullfor no changedescriptions- changes in entity descriptions ornullfor no changealiases- changes in entity aliases, possibly emptystatements- changes in entity statements, possibly emptymodifiedSiteLinks- added or replaced site linksremovedSiteLinks- site keys of removed site links- Returns:
- new
ItemUpdate
-
getPropertyUpdate
public PropertyUpdate getPropertyUpdate(PropertyIdValue entityId, long revisionId, TermUpdate labels, TermUpdate descriptions, Map<String, AliasUpdate> aliases, StatementUpdate statements) Description copied from interface:DataObjectFactoryCreates newPropertyUpdate. It might be more convenient to usePropertyUpdateBuilder.- Specified by:
getPropertyUpdatein interfaceDataObjectFactory- Parameters:
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 ornullfor no changedescriptions- changes in entity descriptions ornullfor no changealiases- changes in entity aliases, possibly emptystatements- changes in entity statements, possibly empty- Returns:
- new
PropertyUpdate
-