rdflib.plugins.sparql.results package¶
Submodules¶
rdflib.plugins.sparql.results.csvresults module¶
- class rdflib.plugins.sparql.results.csvresults.CSVResultParser[source]¶
Bases:
ResultParser
- __annotations__ = {}¶
- __module__ = 'rdflib.plugins.sparql.results.csvresults'¶
- class rdflib.plugins.sparql.results.csvresults.CSVResultSerializer(result)[source]¶
Bases:
ResultSerializer
- Parameters:
result (
SPARQLResult
) –
- __annotations__ = {}¶
- __init__(result)[source]¶
- Parameters:
result (
SPARQLResult
) –
- __module__ = 'rdflib.plugins.sparql.results.csvresults'¶
- serializeTerm(term, encoding)[source]¶
- Parameters:
term (
Optional
[Identifier
]) –encoding (
str
) –
- Return type:
rdflib.plugins.sparql.results.graph module¶
rdflib.plugins.sparql.results.jsonresults module¶
- class rdflib.plugins.sparql.results.jsonresults.JSONResult(json)[source]¶
Bases:
Result
- __annotations__ = {}¶
- __module__ = 'rdflib.plugins.sparql.results.jsonresults'¶
- class rdflib.plugins.sparql.results.jsonresults.JSONResultParser[source]¶
Bases:
ResultParser
- __annotations__ = {}¶
- __module__ = 'rdflib.plugins.sparql.results.jsonresults'¶
- class rdflib.plugins.sparql.results.jsonresults.JSONResultSerializer(result)[source]¶
Bases:
ResultSerializer
- Parameters:
result (
Result
) –
- __annotations__ = {}¶
- __module__ = 'rdflib.plugins.sparql.results.jsonresults'¶
- rdflib.plugins.sparql.results.jsonresults.parseJsonTerm(d)[source]¶
rdflib object (Literal, URIRef, BNode) for the given json-format dict.
- input is like:
{ ‘type’: ‘uri’, ‘value’: ‘http://famegame.com/2006/01/username’ } { ‘type’: ‘literal’, ‘value’: ‘drewp’ }
- Parameters:
- Return type:
- rdflib.plugins.sparql.results.jsonresults.termToJSON(self, term)[source]¶
- Parameters:
self (
JSONResultSerializer
) –term (
Optional
[Identifier
]) –
- Return type:
rdflib.plugins.sparql.results.rdfresults module¶
- class rdflib.plugins.sparql.results.rdfresults.RDFResult(source, **kwargs)[source]¶
Bases:
Result
- __annotations__ = {}¶
- __module__ = 'rdflib.plugins.sparql.results.rdfresults'¶
- class rdflib.plugins.sparql.results.rdfresults.RDFResultParser[source]¶
Bases:
ResultParser
- __annotations__ = {}¶
- __module__ = 'rdflib.plugins.sparql.results.rdfresults'¶
rdflib.plugins.sparql.results.tsvresults module¶
This implements the Tab Separated SPARQL Result Format
It is implemented with pyparsing, reusing the elements from the SPARQL Parser
rdflib.plugins.sparql.results.txtresults module¶
rdflib.plugins.sparql.results.xmlresults module¶
- class rdflib.plugins.sparql.results.xmlresults.SPARQLXMLWriter(output, encoding='utf-8')[source]¶
Bases:
object
Python saxutils-based SPARQL XML Writer
- __dict__ = mappingproxy({'__module__': 'rdflib.plugins.sparql.results.xmlresults', '__doc__': '\n Python saxutils-based SPARQL XML Writer\n ', '__init__': <function SPARQLXMLWriter.__init__>, 'write_header': <function SPARQLXMLWriter.write_header>, 'write_ask': <function SPARQLXMLWriter.write_ask>, 'write_results_header': <function SPARQLXMLWriter.write_results_header>, 'write_start_result': <function SPARQLXMLWriter.write_start_result>, 'write_end_result': <function SPARQLXMLWriter.write_end_result>, 'write_binding': <function SPARQLXMLWriter.write_binding>, 'close': <function SPARQLXMLWriter.close>, '__dict__': <attribute '__dict__' of 'SPARQLXMLWriter' objects>, '__weakref__': <attribute '__weakref__' of 'SPARQLXMLWriter' objects>, '__annotations__': {}})¶
- __module__ = 'rdflib.plugins.sparql.results.xmlresults'¶
- __weakref__¶
list of weak references to the object (if defined)
- write_binding(name, val)[source]¶
- Parameters:
name (
Variable
) –val (
Identifier
) –
- Return type:
- class rdflib.plugins.sparql.results.xmlresults.XMLResult(source, content_type=None)[source]¶
Bases:
Result
- __annotations__ = {}¶
- __module__ = 'rdflib.plugins.sparql.results.xmlresults'¶
- class rdflib.plugins.sparql.results.xmlresults.XMLResultParser[source]¶
Bases:
ResultParser
- __annotations__ = {}¶
- __module__ = 'rdflib.plugins.sparql.results.xmlresults'¶
- class rdflib.plugins.sparql.results.xmlresults.XMLResultSerializer(result)[source]¶
Bases:
ResultSerializer
- Parameters:
result (
Result
) –
- __annotations__ = {}¶
- __module__ = 'rdflib.plugins.sparql.results.xmlresults'¶
- rdflib.plugins.sparql.results.xmlresults.log = <Logger rdflib.plugins.sparql.results.xmlresults (WARNING)>[source]¶
A Parser for SPARQL results in XML:
http://www.w3.org/TR/rdf-sparql-XMLres/
Bits and pieces borrowed from: http://projects.bigasterisk.com/sparqlhttp/
Authors: Drew Perttula, Gunnar Aastrand Grimnes
Module contents¶
Parsers and serializers for SPARQL Result formats