Class SparqlRdfParser
Parser for reading SPARQL Results which have been encoded in the RDF schema for Result Sets and serialized as RDF.
Implements
Inherited Members
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public class SparqlRdfParser : BaseSparqlResultsReader, ISparqlResultsReader
Constructors
| Improve this Doc View SourceSparqlRdfParser()
Creates a new SPARQL RDF Parser which will use auto-detection for determining the syntax of input streams/files.
Declaration
public SparqlRdfParser()
SparqlRdfParser(IRdfReader)
Creates a new SPARQL RDF Parser which will use the given RDF Parser.
Declaration
public SparqlRdfParser(IRdfReader parser)
Parameters
Type | Name | Description |
---|---|---|
IRdfReader | parser | RDF Parser. |
Fields
| Improve this Doc View SourceSparqlRdfResultsNamespace
Namespace Uri for the RDF serialization of a SPARQL Result Set.
Declaration
public const string SparqlRdfResultsNamespace = "http://www.w3.org/2001/sw/DataAccess/tests/result-set#"
Field Value
Type | Description |
---|---|
string |
Methods
| Improve this Doc View SourceLoad(ISparqlResultsHandler, StreamReader, IUriFactory)
Loads a SPARQL Results from RDF contained in the given Stream using a Results Handler.
Declaration
public override void Load(ISparqlResultsHandler handler, StreamReader input, IUriFactory uriFactory)
Parameters
Type | Name | Description |
---|---|---|
ISparqlResultsHandler | handler | Results Handler to use. |
System.IO.StreamReader | input | Stream to read from. |
IUriFactory | uriFactory | URI Factory to use. |
Overrides
Remarks
Uses the StringParser which will use simple heuristics to 'guess' the format of the RDF unless the parser was instaniated with a specific IRdfReader to use.
Load(ISparqlResultsHandler, TextReader, IUriFactory)
Loads a SPARQL Results from RDF contained in the given Input using a Results Handler.
Declaration
public override void Load(ISparqlResultsHandler handler, TextReader input, IUriFactory uriFactory)
Parameters
Type | Name | Description |
---|---|---|
ISparqlResultsHandler | handler | Results Handler to use. |
System.IO.TextReader | input | Input to read from. |
IUriFactory | uriFactory | URI Factory to use. |
Overrides
Remarks
Uses the StringParser which will use simple heuristics to 'guess' the format of the RDF unless the parser was instaniated with a specific IRdfReader to use.
Load(ISparqlResultsHandler, string, IUriFactory)
Loads a SPARQL Results from RDF contained in the given file using a Results Handler.
Declaration
public override void Load(ISparqlResultsHandler handler, string filename, IUriFactory uriFactory)
Parameters
Type | Name | Description |
---|---|---|
ISparqlResultsHandler | handler | Results Handler to use. |
string | filename | File to read from. |
IUriFactory | uriFactory | URI Factory to use. |
Overrides
Remarks
Uses the FileLoader to load the RDF from the file which will attempt to determine the format of the RDF based on the file extension unless the parser was instantiated with a specific IRdfReader to use.
Load(SparqlResultSet, StreamReader, IUriFactory)
Loads a SPARQL Result Set from RDF contained in the given Stream.
Declaration
public override void Load(SparqlResultSet results, StreamReader input, IUriFactory uriFactory)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | SPARQL Result Set to populate. |
System.IO.StreamReader | input | Stream to read from. |
IUriFactory | uriFactory | URI Factory to use. |
Overrides
Remarks
Uses the StringParser which will use simple heuristics to 'guess' the format of the RDF unless the parser was instaniated with a specific IRdfReader to use.
Load(SparqlResultSet, TextReader, IUriFactory)
Loads a SPARQL Result Set from RDF contained in the given Input.
Declaration
public override void Load(SparqlResultSet results, TextReader input, IUriFactory uriFactory)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | SPARQL Result Set to populate. |
System.IO.TextReader | input | Input to read from. |
IUriFactory | uriFactory | URI Factory to use. |
Overrides
Remarks
Uses the StringParser which will use simple heuristics to 'guess' the format of the RDF unless the parser was instaniated with a specific IRdfReader to use.
Load(SparqlResultSet, string, IUriFactory)
Loads a SPARQL Result Set from RDF contained in the given File.
Declaration
public override void Load(SparqlResultSet results, string filename, IUriFactory uriFactory)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | SPARQL Result Set to populate. |
string | filename | File to read from. |
IUriFactory | uriFactory | URI Factory to use. |
Overrides
Remarks
Uses the FileLoader to load the RDF from the file which will attempt to determine the format of the RDF based on the file extension unless the parser was instantiated with a specific IRdfReader to use.
ToString()
Gets the String representation of the Parser which is a description of the syntax it parses.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Events
| Improve this Doc View SourceWarning
Event raised when a non-fatal issue with the SPARQL Results being parsed is detected
Declaration
public override event SparqlWarning Warning
Event Type
Type | Description |
---|---|
SparqlWarning |