Interface LabeledDocument

All Superinterfaces:
EntityDocument
All Known Subinterfaces:
ItemDocument, LabeledStatementDocument, MediaInfoDocument, PropertyDocument, TermedDocument, TermedStatementDocument
All Known Implementing Classes:
ItemDocumentImpl, MediaInfoDocumentImpl, PropertyDocumentImpl, TermedStatementDocumentImpl

public interface LabeledDocument extends EntityDocument
Interface for EntityDocuments that can be described by labels in several languages.
Author:
Thomas Pellissier Tanon
  • Method Details

    • getLabels

      Return a Map from Wikibase language codes to labels.
      Returns:
      the map of labels
    • findLabel

      default String findLabel(String languageCode)
      Returns the string label for the given language code, or null if there is no label for this code. This is a convenience method for accessing the data that can be obtained via getLabels().
      Parameters:
      languageCode - a string that represents language
      Returns:
      the label string or null if it does not exists
    • withRevisionId

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

      Returns a new version of this document with a new label (which overrides any existing label for this language).