wikibaseintegrator.datatypes.monolingualtext
- class wikibaseintegrator.datatypes.monolingualtext.MonolingualText(text=None, language=None, **kwargs)[source]
Bases:
BaseDataType
Implements the Wikibase data type for Monolingual Text strings
- Parameters:
text (str | None) –
language (str | None) –
kwargs (Any) –
- DTYPE = 'monolingualtext'
- __init__(text=None, language=None, **kwargs)[source]
Constructor, calls the superclass BaseDataType
- Parameters:
text (
Optional
[str
]) – The language specific string to be used as the value.language (
Optional
[str
]) – Specifies the language the value belongs to.kwargs (Any) –
- equals(that, include_ref=False, fref=None)
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:
bool
- Parameters:
that (Claim) –
include_ref (bool) –
fref (Callable | None) –
- from_json(json_data)
- Parameters:
json_data (
Dict
[str
,Any
]) – a JSON representation of a Claim- Return type:
- get_json()
- Return type:
Dict
[str
,Any
]
- property id: str | None
- property qualifiers: Qualifiers
- property qualifiers_order: List[str]
- property rank: WikibaseRank
- property references: References
- static refs_equal(olditem, newitem)
tests for exactly identical references
- remove(remove=True)
- Return type:
None
- property removed: bool
- set_value(text=None, language=None)[source]
- Parameters:
text (str | None) –
language (str | None) –
- property type: str | Dict