Class RankBuffer

java.lang.Object
org.wikidata.wdtk.rdf.RankBuffer

public class RankBuffer extends Object
Holds information about the highest rank in an EntityDocument and the corresponding statement to generate BestRank triples. Ignores deprecated statements
Author:
Michael Guenther
  • Constructor Details

    • RankBuffer

      public RankBuffer()
  • Method Details

    • clear

      public void clear()
      Clears the buffer. This function should be called after each export of an entity document.
    • add

      public void add(StatementRank rank, org.eclipse.rdf4j.model.Resource subject)
      Adds a Statement.
      Parameters:
      rank - rank of the statement
      subject - rdf resource that refers to the statement
    • getBestRankedStatements

      public Set<org.eclipse.rdf4j.model.Resource> getBestRankedStatements()
      Returns the statements with the highest rank.
      Returns:
      statement resource with the highest rank.