Interface StatementGroup

All Superinterfaces:
Collection<Statement>, Iterable<Statement>
All Known Implementing Classes:
StatementGroupImpl

public interface StatementGroup extends Collection<Statement>
A statement group represents an ordered list of Statement objects that use the same subject and the same property in the main snak of their Claim.
Author:
Markus Kroetzsch
  • Method Details

    • getStatements

      List<Statement> getStatements()
      Get the list of Statements of this group.
      Returns:
      a list of Statements
    • getBestStatements

      StatementGroup getBestStatements()
      Get the best statements of this group. These are the statements with rank StatementRank.PREFERRED if they exists or the one with rank StatementRank.NORMAL
      Returns:
      a subset of the current StatementGroup, or null if there are no best statements
    • getProperty

      PropertyIdValue getProperty()
      Get the property used in the main snak of the Claim of each statement in this group.
      Returns:
      a PropertyIdValue
    • getSubject

      EntityIdValue getSubject()
      Get the subject used in the Claim of each statement in this group.
      Returns:
      an EntityIdValue
    • withStatement

      StatementGroup withStatement(Statement statement)
      Returns a new version of this group, where the given statement has been added. If some statement in the group has the same non-empty statement id, then the new statement will replace it. Otherwise the new statement is appended at the end of the list.