Class ClaimImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.ClaimImpl
- All Implemented Interfaces:
Claim
- Author:
- Fredo Erxleben, Antonin Delpeuch
-
Constructor Summary
ConstructorDescriptionClaimImpl
(StatementImpl statement) Constructor used to initialize a claim from a JacksonStatement, should only be used internally.ClaimImpl
(EntityIdValue subject, Snak mainSnak, List<SnakGroup> qualifiers) Constructor to create a claim. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns 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.int
hashCode()
toString()
-
Constructor Details
-
ClaimImpl
Constructor to create a claim. This internally creates a new statement, so if you want to create a statement later on just useStatementImpl
directly.- Parameters:
subject
- the subject the Claim refers tomainSnak
- the main Snak of the Claimqualifiers
- the qualifiers of the Claim, grouped in SnakGroups
-
ClaimImpl
Constructor used to initialize a claim from a JacksonStatement, should only be used internally.- Parameters:
statement
- the statement which contains this claim
-
-
Method Details
-
getSubject
Description copied from interface:Claim
The subject that the claim refers to, e.g., the id of "Berlin".- Specified by:
getSubject
in interfaceClaim
- Returns:
- EntityId of the subject
-
getMainSnak
Description copied from interface:Claim
Main Snak of the statement. This Snak refers directly to the subject, e.g., theValueSnak
"Population: 3000000".- Specified by:
getMainSnak
in interfaceClaim
- Returns:
- the main snak
-
getQualifiers
Description copied from interface:Claim
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.- Specified by:
getQualifiers
in interfaceClaim
- Returns:
- list of snak groups
-
getAllQualifiers
Description copied from interface:Claim
Returns an iterator over all qualifiers, without considering qualifier groups. The relative order of qualifiers is preserved.- Specified by:
getAllQualifiers
in interfaceClaim
- Returns:
- iterator over all qualifier snaks
-
getValue
Description copied from interface:Claim
Convenience method to get the value of the claim's main snak, or null if there is none. -
hashCode
public int hashCode() -
equals
-
toString
-