Claim#
- class wikibaseintegrator.models.claim.Claim(qualifiers=None, id=None, rank=None, references=None, snaktype=WikibaseSnakType.KNOWN_VALUE)[source]#
Bases:
BaseModelextend
wikibaseintegrator.models.basemodel.BaseModel()- Parameters:
qualifiers (
Qualifiers|None, default:None)rank (
WikibaseRank|None, default:None)references (
References|list[Claim|list[Claim]] |None, default:None) – A References object, a list of Claim object or a list of list of Claim objectqualifiers
rank
references – A References object, a list of Claim object or a list of list of Claim object
snaktype (
WikibaseSnakType, default:WikibaseSnakType.KNOWN_VALUE)
- static ref_present(olditem, newitem)[source]#
Tests if (1) there is a single ref in the new item and (2) if this single ref is present among the claims of the old item.
- Return type:
- equals(that, include_ref=False, fref=None)[source]#
Tests for equality of two statements. If comparing references, the order of the arguments matters!!! self is the current statement, the next argument is the new statement. Allows passing in a function to use to compare the references ‘fref’. Default is equality. fref accepts two arguments ‘oldrefs’ and ‘newrefs’, each of which are a list of references, where each reference is a list of statements
- Return type:
- has_equal_qualifiers(other)[source]#
Test if the two claims have the same qualifiers, whatever their order. Each qualifier must match a distinct qualifier of the other claim: P2: [a, a] and P2: [a, b] differ.
- Return type:
- update(claim)[source]#
Update this claim with the data of an equal claim (same value and qualifiers). The rank and the references are only taken from the new claim when it sets them, so re-adding an existing value doesn’t reset its rank or drop its references.
- DTYPE = 'claim'#
- property qualifiers: Qualifiers#
- property rank: WikibaseRank#
- property references: References#