Interface StatementGroup
- All Superinterfaces:
Collection<Statement>
,Iterable<Statement>
- All Known Implementing Classes:
StatementGroupImpl
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 Summary
Modifier and TypeMethodDescriptionGet the best statements of this group.Get the property used in the main snak of theClaim
of each statement in this group.Get the list of Statements of this group.Get the subject used in theClaim
of each statement in this group.withStatement
(Statement statement) Returns a new version of this group, where the given statement has been added.
-
Method Details
-
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 rankStatementRank.PREFERRED
if they exists or the one with rankStatementRank.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 theClaim
of each statement in this group.- Returns:
- a PropertyIdValue
-
getSubject
EntityIdValue getSubject()Get the subject used in theClaim
of each statement in this group.- Returns:
- an EntityIdValue
-
withStatement
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.
-