public class LexemeDocumentImpl extends EntityDocumentImpl implements LexemeDocument
LexemeDocument.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,List<Statement>> |
claims
This is what is called claim in the JSON model.
|
entityId, revisionId, siteIri| Modifier and Type | Method and Description |
|---|---|
protected static Map<String,List<Statement>> |
addStatementToGroups(Statement statement,
Map<String,List<Statement>> claims)
Adds a Statement to a given collection of statement groups.
|
FormDocument |
createForm(List<MonolingualTextValue> representations)
Creates a new
FormDocument for this lexeme. |
SenseDocument |
createSense(List<MonolingualTextValue> glosses)
Creates a new
SenseDocument for this Lexeme. |
boolean |
equals(Object obj) |
StatementGroup |
findStatementGroup(String propertyIdValue)
Find a statement group by its property id, without checking for
equality with the site IRI.
|
Iterator<Statement> |
getAllStatements()
Returns an iterator that provides access to all statements, without
considering the statement groups.
|
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
|
Map<String,List<Statement>> |
getJsonClaims()
Returns the "claims".
|
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 senseId)
Return the inner sense having the given id
|
List<SenseDocument> |
getSenses()
Return the lexeme senses
|
List<StatementGroup> |
getStatementGroups()
Return the list of all StatementGroups stored for this item.
|
int |
hashCode() |
protected static Map<String,List<Statement>> |
removeStatements(Set<String> statementIds,
Map<String,List<Statement>> claims)
Removes statement ids from a collection of statement groups.
|
String |
toString() |
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.
|
getJsonId, getRevisionId, getSiteIriclone, finalize, getClass, notify, notifyAll, wait, wait, waitfindStatement, 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, hasStatementValuegetRevisionIdpublic LexemeIdValue getEntityId()
LexemeDocumentgetEntityId in interface EntityDocumentgetEntityId in interface LexemeDocumentpublic ItemIdValue getLexicalCategory()
LexemeDocumentgetLexicalCategory in interface LexemeDocumentpublic ItemIdValue getLanguage()
LexemeDocumentgetLanguage in interface LexemeDocumentpublic Map<String,MonolingualTextValue> getLemmas()
LexemeDocumentgetLemmas in interface LexemeDocumentpublic List<FormDocument> getForms()
LexemeDocumentgetForms in interface LexemeDocumentpublic List<SenseDocument> getSenses()
LexemeDocumentgetSenses in interface LexemeDocumentpublic FormDocument getForm(FormIdValue formId)
LexemeDocumentgetForm in interface LexemeDocumentpublic SenseDocument getSense(SenseIdValue senseId)
LexemeDocumentgetSense in interface LexemeDocumentpublic LexemeDocument withEntityId(LexemeIdValue newEntityId)
LexemeDocumentwithEntityId in interface LexemeDocumentnewEntityId - new ID of the documentpublic LexemeDocument withLexicalCategory(ItemIdValue newLexicalCategory)
withLexicalCategory in interface LexemeDocumentpublic LexemeDocument withLanguage(ItemIdValue newLanguage)
withLanguage in interface LexemeDocumentpublic LexemeDocument withLemma(MonolingualTextValue lemma)
withLemma in interface LexemeDocumentpublic LexemeDocument withStatement(Statement statement)
LexemeDocumentwithStatement in interface LexemeDocumentwithStatement in interface StatementDocumentstatement - the statement to add or update in the documentpublic LexemeDocument withoutStatementIds(Set<String> statementIds)
LexemeDocumentwithoutStatementIds in interface LexemeDocumentwithoutStatementIds in interface StatementDocumentstatementIds - the identifiers of the statements to removepublic FormDocument createForm(List<MonolingualTextValue> representations)
LexemeDocumentFormDocument for this lexeme.
The form is not added to the LexemeDocument object,
it should be done with LexemeDocument.withForm(org.wikidata.wdtk.datamodel.interfaces.FormDocument).createForm in interface LexemeDocumentpublic LexemeDocument withForm(FormDocument form)
LexemeDocumentFormDocument to this lexeme.
The form id should be prefixed with the lexeme id.withForm in interface LexemeDocumentpublic SenseDocument createSense(List<MonolingualTextValue> glosses)
LexemeDocumentSenseDocument for this Lexeme.
The form is not added to the LexemeDocument object,
it should be done with LexemeDocument.withSense(org.wikidata.wdtk.datamodel.interfaces.SenseDocument).createSense in interface LexemeDocumentpublic LexemeDocument withSense(SenseDocument sense)
LexemeDocumentSenseDocument to this lexeme.
The sense id should be prefixed with the lexeme id.withSense in interface LexemeDocumentpublic LexemeDocument withRevisionId(long newRevisionId)
LexemeDocumentwithRevisionId in interface EntityDocumentwithRevisionId in interface LexemeDocumentwithRevisionId in interface StatementDocumentpublic List<StatementGroup> getStatementGroups()
StatementDocumentgetStatementGroups in interface StatementDocumentpublic StatementGroup findStatementGroup(String propertyIdValue)
findStatementGroup in interface StatementDocumentpropertyIdValue - the property to search forStatementGroup or nullpublic Map<String,List<Statement>> getJsonClaims()
JSON "claims" correspond to statement groups in the WDTK model. You
should use StatementDocumentImpl.getStatementGroups() to obtain
this data.
public Iterator<Statement> getAllStatements()
StatementDocumentgetAllStatements in interface StatementDocumentprotected static Map<String,List<Statement>> addStatementToGroups(Statement statement, Map<String,List<Statement>> claims)
statement - claims - Copyright © 2014–2022 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage