EDTF#

class wikibaseintegrator.datatypes.extra.edtf.EDTF(value=None, **kwargs)[source]#

Bases: String

Implements the Wikibase data type for Wikibase Extended Date/Time Format extension. More info at https://www.mediawiki.org/wiki/Extension:Wikibase_EDTF

Constructor, calls the superclass BaseDataType

Parameters:

value (str | None, default: None) – The string to be used as the value

from_sparql_value(sparql_value)[source]#

Parse data returned by a SPARQL endpoint and set the value to the object

The extension writes the EDTF string as an xsd:edtf literal, then the dates it covers as xsd:dateTime values of the same statement: only the EDTF literal is the value of the claim.

Parameters:

sparql_value (dict) – A SPARQL value composed of datatype, type and value

Return type:

Self

Returns:

The object itself

DTYPE = 'edtf'#
PTYPE = 'http://wikiba.se/ontology#Edtf'#
XSD_EDTF = 'http://www.w3.org/2001/XMLSchema#edtf'#

The datatype of the EDTF literal in the RDF export