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
ConstructorDescriptionItemUpdateImpl
(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, getDescriptions
Methods inherited from class org.wikidata.wdtk.datamodel.implementation.LabeledDocumentUpdateImpl
getLabels
Methods inherited from class org.wikidata.wdtk.datamodel.implementation.StatementDocumentUpdateImpl
getStatements
Methods inherited from class org.wikidata.wdtk.datamodel.implementation.EntityUpdateImpl
getBaseRevisionId
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.wikidata.wdtk.datamodel.interfaces.EntityUpdate
getBaseRevisionId
Methods inherited from interface org.wikidata.wdtk.datamodel.interfaces.LabeledDocumentUpdate
getLabels
Methods inherited from interface org.wikidata.wdtk.datamodel.interfaces.StatementDocumentUpdate
getStatements
Methods 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 ornull
for no changedescriptions
- changes in entity descriptions ornull
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 links- Throws:
NullPointerException
- if any required parameter or its item isnull
IllegalArgumentException
- if any parameters or their combination is invalid
-
-
Method Details
-
getEntityId
Description copied from interface:EntityUpdate
Returns ID of the entity that is being updated.- Specified by:
getEntityId
in interfaceEntityUpdate
- Specified by:
getEntityId
in interfaceItemUpdate
- Overrides:
getEntityId
in classEntityUpdateImpl
- Returns:
- ID of the updated entity
-
isEmpty
public boolean isEmpty()Description copied from interface:EntityUpdate
Checks whether the update is empty. Empty update will not change the entity in any way.- Specified by:
isEmpty
in interfaceEntityUpdate
- Overrides:
isEmpty
in classTermedDocumentUpdateImpl
- Returns:
true
if the update is empty,false
otherwise
-
getModifiedSiteLinks
Description copied from interface:ItemUpdate
Returns site links added or modified in this update. Existing site links are preserved if their site key is not listed here.- Specified by:
getModifiedSiteLinks
in interfaceItemUpdate
- Returns:
- added or modified site links indexed by site key
-
getRemovedSiteLinks
Description copied from interface:ItemUpdate
Returns site keys of site links removed in this update.- Specified by:
getRemovedSiteLinks
in interfaceItemUpdate
- Returns:
- site keys of removed site links
-
equals
-
hashCode
public int hashCode()
-