Interface SenseDocument

All Superinterfaces:
EntityDocument, StatementDocument
All Known Implementing Classes:
SenseDocumentImpl

public interface SenseDocument extends StatementDocument
Interface for lexemes senses.
Author:
Thomas Pellissier Tanon
  • Method Details

    • getEntityId

      SenseIdValue getEntityId()
      Returns the ID of the entity that the data refers to
      Specified by:
      getEntityId in interface EntityDocument
      Returns:
      sense id
    • getGlosses

      Return the human readable description of the sense indexed by Wikimedia language code
      Returns:
      a map from Wikimedia language code to the representations
    • withEntityId

      SenseDocument withEntityId(SenseIdValue newEntityId)
      Returns a new version of this document with updated ID.
      Parameters:
      newEntityId - new ID of the document
      Returns:
      document with updated ID
    • withRevisionId

      SenseDocument withRevisionId(long newRevisionId)
      Returns a copy of this document with an updated revision id.
      Specified by:
      withRevisionId in interface EntityDocument
      Specified by:
      withRevisionId in interface StatementDocument
    • withGloss

    • withStatement

      SenseDocument withStatement(Statement statement)
      Returns a new version of this document which includes the statement provided. If the identifier of this statement matches that of any other statement for the same property, then the existing statement will be replaced by the new one. Otherwise, the new statement will be added at the end of the list of statements in this group.
      Specified by:
      withStatement in interface StatementDocument
      Parameters:
      statement - the statement to add or update in the document
    • withoutStatementIds

      SenseDocument withoutStatementIds(Set<String> statementIds)
      Returns a new version of this document where all statements matching any of the statement ids provided have been removed. These statements can use different properties.
      Specified by:
      withoutStatementIds in interface StatementDocument
      Parameters:
      statementIds - the identifiers of the statements to remove