Class ItemUpdateImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.EntityUpdateImpl
org.wikidata.wdtk.datamodel.implementation.StatementDocumentUpdateImpl
org.wikidata.wdtk.datamodel.implementation.LabeledDocumentUpdateImpl
org.wikidata.wdtk.datamodel.implementation.TermedDocumentUpdateImpl
org.wikidata.wdtk.datamodel.implementation.ItemUpdateImpl
- All Implemented Interfaces:
EntityUpdate,ItemUpdate,LabeledDocumentUpdate,LabeledStatementDocumentUpdate,StatementDocumentUpdate,TermedDocumentUpdate,TermedStatementDocumentUpdate
Jackson implementation of
ItemUpdate.-
Constructor Summary
ConstructorsConstructorDescriptionItemUpdateImpl(ItemIdValue entityId, long revisionId, TermUpdate labels, TermUpdate descriptions, Map<String, AliasUpdate> aliases, StatementUpdate statements, Collection<SiteLink> modifiedSiteLinks, Collection<String> removedSiteLinks) Initializes new item update. -
Method Summary
Methods inherited from class org.wikidata.wdtk.datamodel.implementation.TermedDocumentUpdateImpl
getAliases, getDescriptionsMethods inherited from class org.wikidata.wdtk.datamodel.implementation.LabeledDocumentUpdateImpl
getLabelsMethods inherited from class org.wikidata.wdtk.datamodel.implementation.StatementDocumentUpdateImpl
getStatementsMethods inherited from class org.wikidata.wdtk.datamodel.implementation.EntityUpdateImpl
getBaseRevisionIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wikidata.wdtk.datamodel.interfaces.EntityUpdate
getBaseRevisionIdMethods inherited from interface org.wikidata.wdtk.datamodel.interfaces.LabeledDocumentUpdate
getLabelsMethods inherited from interface org.wikidata.wdtk.datamodel.interfaces.StatementDocumentUpdate
getStatementsMethods inherited from interface org.wikidata.wdtk.datamodel.interfaces.TermedDocumentUpdate
getAliases, getDescriptions
-
Constructor Details
-
ItemUpdateImpl
public ItemUpdateImpl(ItemIdValue entityId, long revisionId, TermUpdate labels, TermUpdate descriptions, Map<String, AliasUpdate> aliases, StatementUpdate statements, Collection<SiteLink> modifiedSiteLinks, Collection<String> removedSiteLinks) Initializes new item update.- 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- Throws:
NullPointerException- if any required parameter or its item isnullIllegalArgumentException- if any parameters or their combination is invalid
-
-
Method Details
-
getEntityId
Description copied from interface:EntityUpdateReturns ID of the entity that is being updated.- Specified by:
getEntityIdin interfaceEntityUpdate- Specified by:
getEntityIdin interfaceItemUpdate- Overrides:
getEntityIdin classEntityUpdateImpl- Returns:
- ID of the updated entity
-
isEmpty
public boolean isEmpty()Description copied from interface:EntityUpdateChecks whether the update is empty. Empty update will not change the entity in any way.- Specified by:
isEmptyin interfaceEntityUpdate- Overrides:
isEmptyin classTermedDocumentUpdateImpl- Returns:
trueif the update is empty,falseotherwise
-
getModifiedSiteLinks
Description copied from interface:ItemUpdateReturns site links added or modified in this update. Existing site links are preserved if their site key is not listed here.- Specified by:
getModifiedSiteLinksin interfaceItemUpdate- Returns:
- added or modified site links indexed by site key
-
getRemovedSiteLinks
Description copied from interface:ItemUpdateReturns site keys of site links removed in this update.- Specified by:
getRemovedSiteLinksin interfaceItemUpdate- Returns:
- site keys of removed site links
-
equals
-
hashCode
public int hashCode()
-