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
ConstructorDescriptionLexemeUpdateImpl
(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 TypeMethodDescriptionboolean
Returns 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.int
hashCode()
boolean
isEmpty()
Checks whether the update is empty.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
-
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 ornull
for no changelexicalCategory
- new lexical category of the lexeme ornull
for 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 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 interfaceLexemeUpdate
- 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
-
getLanguage
Description copied from interface:LexemeUpdate
Returns new lexeme language assigned in this update. If language code is not changing, this method returnsOptional.empty()
.- Specified by:
getLanguage
in interfaceLexemeUpdate
- Returns:
- new lexeme language or
Optional.empty()
if it is not changing
-
getLexicalCategory
Description copied from interface:LexemeUpdate
Returns new lexical category assigned to the lexeme in this update. If lexical category is not changing, this method returnsOptional.empty()
.- Specified by:
getLexicalCategory
in interfaceLexemeUpdate
- Returns:
- new lexical category or
Optional.empty()
if it is not changing
-
getLemmas
Description copied from interface:LexemeUpdate
Returns changes in lemmas.- Specified by:
getLemmas
in interfaceLexemeUpdate
- Returns:
- update of lemmas, possibly empty
-
getAddedSenses
Description copied from interface:LexemeUpdate
Returns new senses added to the lexeme in this update. Existing senses are preserved by default.- Specified by:
getAddedSenses
in interfaceLexemeUpdate
- Returns:
- list of new senses
-
getUpdatedSenses
Description copied from interface:LexemeUpdate
Returns lexeme senses modified in this update. Senses not listed here are preserved by default.- Specified by:
getUpdatedSenses
in interfaceLexemeUpdate
- Returns:
- modified senses indexed by ID
-
getRemovedSenses
Description copied from interface:LexemeUpdate
Returns IDs of senses removed from the lexeme in this update.- Specified by:
getRemovedSenses
in interfaceLexemeUpdate
- Returns:
- IDs of removed lexeme senses
-
getAddedForms
Description copied from interface:LexemeUpdate
Returns new forms added to the lexeme in this update. Existing forms are preserved by default.- Specified by:
getAddedForms
in interfaceLexemeUpdate
- Returns:
- list of new forms
-
getUpdatedForms
Description copied from interface:LexemeUpdate
Returns lexeme forms modified in this update. Forms not listed here are preserved by default.- Specified by:
getUpdatedForms
in interfaceLexemeUpdate
- Returns:
- modified forms indexed by ID
-
getRemovedForms
Description copied from interface:LexemeUpdate
Returns IDs of forms removed from the lexeme in this update.- Specified by:
getRemovedForms
in interfaceLexemeUpdate
- Returns:
- IDs of removed lexeme forms
-
equals
-
hashCode
public int hashCode()
-