public interface LexemeDocument extends StatementDocument
Modifier and Type | Method and Description |
---|---|
FormDocument |
createForm(List<MonolingualTextValue> representations)
Creates a new
FormDocument for this lexeme. |
SenseDocument |
createSense(List<MonolingualTextValue> glosses)
Creates a new
SenseDocument for this Lexeme. |
LexemeIdValue |
getEntityId()
Returns the ID of the entity that the data refers to
|
FormDocument |
getForm(FormIdValue formId)
Return the inner form having the given id
|
List<FormDocument> |
getForms()
Return the lexeme forms
|
ItemIdValue |
getLanguage()
Return the ID of the language to which the lexeme belongs
(French, British English...)
|
Map<String,MonolingualTextValue> |
getLemmas()
Return the human readable representations of the lexeme indexed by Wikimedia language code
|
ItemIdValue |
getLexicalCategory()
Return the ID of the lexical category to which the lexeme belongs
(noun, verb...)
|
SenseDocument |
getSense(SenseIdValue formId)
Return the inner sense having the given id
|
List<SenseDocument> |
getSenses()
Return the lexeme senses
|
LexemeDocument |
withEntityId(LexemeIdValue newEntityId)
Returns a new version of this document with updated ID.
|
LexemeDocument |
withForm(FormDocument form)
Adds a
FormDocument to this lexeme. |
LexemeDocument |
withLanguage(ItemIdValue newLanguage) |
LexemeDocument |
withLemma(MonolingualTextValue lemma) |
LexemeDocument |
withLexicalCategory(ItemIdValue newLexicalCategory) |
LexemeDocument |
withoutStatementIds(Set<String> statementIds)
Returns a new version of this document where all statements matching
any of the statement ids provided have been removed.
|
LexemeDocument |
withRevisionId(long newRevisionId)
Returns a copy of this document with an updated revision id.
|
LexemeDocument |
withSense(SenseDocument sense)
Adds a
SenseDocument to this lexeme. |
LexemeDocument |
withStatement(Statement statement)
Returns a new version of this document which includes the
statement provided.
|
findStatement, findStatement, findStatementEntityIdValue, findStatementEntityIdValue, findStatementGlobeCoordinatesValue, findStatementGlobeCoordinatesValue, findStatementGroup, findStatementGroup, findStatementItemIdValue, findStatementItemIdValue, findStatementMonolingualTextValue, findStatementMonolingualTextValue, findStatementPropertyIdValue, findStatementPropertyIdValue, findStatementQuantityValue, findStatementQuantityValue, findStatementStringValue, findStatementStringValue, findStatementTimeValue, findStatementTimeValue, findStatementValue, findStatementValue, getAllStatements, getStatementGroups, hasStatement, hasStatement, hasStatementValue, hasStatementValue, hasStatementValue, hasStatementValue
getRevisionId
LexemeIdValue getEntityId()
getEntityId
in interface EntityDocument
ItemIdValue getLexicalCategory()
ItemIdValue getLanguage()
Map<String,MonolingualTextValue> getLemmas()
List<FormDocument> getForms()
FormDocument getForm(FormIdValue formId)
IndexOutOfBoundsException
- if there is no form with this id in the documentList<SenseDocument> getSenses()
SenseDocument getSense(SenseIdValue formId)
IndexOutOfBoundsException
- if there is no sense with this id in the documentLexemeDocument withEntityId(LexemeIdValue newEntityId)
newEntityId
- new ID of the documentLexemeDocument withRevisionId(long newRevisionId)
withRevisionId
in interface EntityDocument
withRevisionId
in interface StatementDocument
LexemeDocument withLexicalCategory(ItemIdValue newLexicalCategory)
LexemeDocument withLanguage(ItemIdValue newLanguage)
LexemeDocument withLemma(MonolingualTextValue lemma)
LexemeDocument withStatement(Statement statement)
withStatement
in interface StatementDocument
statement
- the statement to add or update in the documentLexemeDocument withoutStatementIds(Set<String> statementIds)
withoutStatementIds
in interface StatementDocument
statementIds
- the identifiers of the statements to removeFormDocument createForm(List<MonolingualTextValue> representations)
FormDocument
for this lexeme.
The form is not added to the LexemeDocument
object,
it should be done with withForm(org.wikidata.wdtk.datamodel.interfaces.FormDocument)
.LexemeDocument withForm(FormDocument form)
FormDocument
to this lexeme.
The form id should be prefixed with the lexeme id.SenseDocument createSense(List<MonolingualTextValue> glosses)
SenseDocument
for this Lexeme.
The form is not added to the LexemeDocument
object,
it should be done with withSense(org.wikidata.wdtk.datamodel.interfaces.SenseDocument)
.LexemeDocument withSense(SenseDocument sense)
SenseDocument
to this lexeme.
The sense id should be prefixed with the lexeme id.Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage