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
ConstructorsConstructorDescriptionFormUpdateImpl(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
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.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 ornullfor no changestatements- changes in entity statements, possibly empty- Throws:
NullPointerException- if any required parameter 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 interfaceFormUpdate- 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 classStatementDocumentUpdateImpl- Returns:
trueif the update is empty,falseotherwise
-
getRepresentations
Description copied from interface:FormUpdateReturns changes in form representations.- Specified by:
getRepresentationsin interfaceFormUpdate- Returns:
- update of form representations, possibly empty
-
getGrammaticalFeatures
Description copied from interface:FormUpdateReturns 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:
getGrammaticalFeaturesin interfaceFormUpdate- Returns:
- new grammatical features or
Optional.empty()if grammatical features do not change
-
equals
-
hashCode
public int hashCode()
-