Interface FormDocument

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

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

    • getEntityId

      FormIdValue getEntityId()
      Returns the ID of the entity that the data refers to
      Specified by:
      getEntityId in interface EntityDocument
      Returns:
      form id
    • getRepresentations

      Map<String,MonolingualTextValue> getRepresentations()
      Return the human readable representations of the form indexed by Wikimedia language code
      Returns:
      a map from Wikimedia language code to the representations
    • getGrammaticalFeatures

      List<ItemIdValue> getGrammaticalFeatures()
      Return the IDs of the grammatical features of the form (masculine, singular...)
      Returns:
      item ids
    • withEntityId

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

      FormDocument 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
    • withRepresentation

      FormDocument withRepresentation(MonolingualTextValue representation)
    • withGrammaticalFeature

      FormDocument withGrammaticalFeature(ItemIdValue grammaticalFeature)
    • withStatement

      FormDocument 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

      FormDocument 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