Interface Claim
- All Known Implementing Classes:
ClaimImpl
public interface Claim
Interface for Wikidata claims. Claims consist of those parts of Wikibase
Statements that express a claim about a subject entity, such as the claim
that Berlin has 3 million inhabitants. Additional information, such as
references and ranks, are not part of the claim.
- Author:
- Markus Kroetzsch
-
Method Summary
Modifier and TypeMethodDescriptionReturns an iterator over all qualifiers, without considering qualifier groups.Main Snak of the statement.Groups of auxiliary Snaks, also known as qualifiers, that provide additional context information for this claim.The subject that the claim refers to, e.g., the id of "Berlin".getValue()
Convenience method to get the value of the claim's main snak, or null if there is none.
-
Method Details
-
getSubject
EntityIdValue getSubject()The subject that the claim refers to, e.g., the id of "Berlin".- Returns:
- EntityId of the subject
-
getMainSnak
Snak getMainSnak()Main Snak of the statement. This Snak refers directly to the subject, e.g., theValueSnak
"Population: 3000000".- Returns:
- the main snak
-
getQualifiers
Groups of auxiliary Snaks, also known as qualifiers, that provide additional context information for this claim. For example, "as of: 2014" might be a temporal context given for a claim that provides a population number. The snaks are grouped by the property that they use.- Returns:
- list of snak groups
-
getAllQualifiers
Returns an iterator over all qualifiers, without considering qualifier groups. The relative order of qualifiers is preserved.- Returns:
- iterator over all qualifier snaks
-
getValue
Value getValue()Convenience method to get the value of the claim's main snak, or null if there is none.- Returns:
- main value of the claim, or null
-