Class FormUpdateImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.EntityUpdateImpl
org.wikidata.wdtk.datamodel.implementation.StatementDocumentUpdateImpl
org.wikidata.wdtk.datamodel.implementation.FormUpdateImpl
- All Implemented Interfaces:
EntityUpdate
,FormUpdate
,StatementDocumentUpdate
Jackson implementation of
FormUpdate
.-
Constructor Summary
ConstructorDescriptionFormUpdateImpl
(FormIdValue entityId, long revisionId, TermUpdate representations, Collection<ItemIdValue> grammaticalFeatures, StatementUpdate statements) Initializes new form update. -
Method Summary
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.StatementDocumentUpdate
getStatements
-
Constructor Details
-
FormUpdateImpl
public FormUpdateImpl(FormIdValue entityId, long revisionId, TermUpdate representations, Collection<ItemIdValue> grammaticalFeatures, StatementUpdate statements) Initializes new form update.- 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, possibly emptygrammaticalFeatures
- new grammatical features of the form ornull
for no changestatements
- changes in entity statements, possibly empty- Throws:
NullPointerException
- if any required parameter 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 interfaceFormUpdate
- 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 classStatementDocumentUpdateImpl
- Returns:
true
if the update is empty,false
otherwise
-
getRepresentations
Description copied from interface:FormUpdate
Returns changes in form representations.- Specified by:
getRepresentations
in interfaceFormUpdate
- Returns:
- update of form representations, possibly empty
-
getGrammaticalFeatures
Description copied from interface:FormUpdate
Returns new grammatical features of the form assigned in this update. If grammatical features are not changing in this update, this method returnsOptional.empty()
. If grammatical features are being removed without replacement, this method returns an empty set.- Specified by:
getGrammaticalFeatures
in interfaceFormUpdate
- Returns:
- new grammatical features or
Optional.empty()
if grammatical features do not change
-
equals
-
hashCode
public int hashCode()
-