Class LexemeUpdateImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.EntityUpdateImpl
org.wikidata.wdtk.datamodel.implementation.StatementDocumentUpdateImpl
org.wikidata.wdtk.datamodel.implementation.LexemeUpdateImpl
- All Implemented Interfaces:
EntityUpdate,LexemeUpdate,StatementDocumentUpdate
Jackson implementation of
LexemeUpdate.-
Constructor Summary
ConstructorsConstructorDescriptionLexemeUpdateImpl(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) Initializes new entity update. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns new forms added to the lexeme in this update.Returns new senses added to the lexeme in this update.Returns ID of the entity that is being updated.Returns new lexeme language assigned in this update.Returns changes in lemmas.Returns new lexical category assigned to the lexeme in this update.Returns IDs of forms removed from the lexeme in this update.Returns IDs of senses removed from the lexeme in this update.Returns lexeme forms modified in this update.Returns lexeme senses modified in this update.inthashCode()booleanisEmpty()Checks whether the update is empty.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
-
LexemeUpdateImpl
public LexemeUpdateImpl(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) Initializes new entity update.- 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, possibly emptystatements- changes in entity statements, possibly emptyaddedSenses- added sensesupdatedSenses- updated sensesremovedSenses- IDs of removed sensesaddedForms- added formsupdatedForms- updated formsremovedForms- IDs of removed forms- 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 interfaceLexemeUpdate- 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
-
getLanguage
Description copied from interface:LexemeUpdateReturns new lexeme language assigned in this update. If language code is not changing, this method returnsOptional.empty().- Specified by:
getLanguagein interfaceLexemeUpdate- Returns:
- new lexeme language or
Optional.empty()if it is not changing
-
getLexicalCategory
Description copied from interface:LexemeUpdateReturns new lexical category assigned to the lexeme in this update. If lexical category is not changing, this method returnsOptional.empty().- Specified by:
getLexicalCategoryin interfaceLexemeUpdate- Returns:
- new lexical category or
Optional.empty()if it is not changing
-
getLemmas
Description copied from interface:LexemeUpdateReturns changes in lemmas.- Specified by:
getLemmasin interfaceLexemeUpdate- Returns:
- update of lemmas, possibly empty
-
getAddedSenses
Description copied from interface:LexemeUpdateReturns new senses added to the lexeme in this update. Existing senses are preserved by default.- Specified by:
getAddedSensesin interfaceLexemeUpdate- Returns:
- list of new senses
-
getUpdatedSenses
Description copied from interface:LexemeUpdateReturns lexeme senses modified in this update. Senses not listed here are preserved by default.- Specified by:
getUpdatedSensesin interfaceLexemeUpdate- Returns:
- modified senses indexed by ID
-
getRemovedSenses
Description copied from interface:LexemeUpdateReturns IDs of senses removed from the lexeme in this update.- Specified by:
getRemovedSensesin interfaceLexemeUpdate- Returns:
- IDs of removed lexeme senses
-
getAddedForms
Description copied from interface:LexemeUpdateReturns new forms added to the lexeme in this update. Existing forms are preserved by default.- Specified by:
getAddedFormsin interfaceLexemeUpdate- Returns:
- list of new forms
-
getUpdatedForms
Description copied from interface:LexemeUpdateReturns lexeme forms modified in this update. Forms not listed here are preserved by default.- Specified by:
getUpdatedFormsin interfaceLexemeUpdate- Returns:
- modified forms indexed by ID
-
getRemovedForms
Description copied from interface:LexemeUpdateReturns IDs of forms removed from the lexeme in this update.- Specified by:
getRemovedFormsin interfaceLexemeUpdate- Returns:
- IDs of removed lexeme forms
-
equals
-
hashCode
public int hashCode()
-