Class SparqlRdfParser
Parser for reading SPARQL Results which have been encoded in the RDF schema for Result Sets and serialized as RDF.
Inheritance
System.Object
SparqlRdfParser
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: VDS.RDF.Parsing
Assembly: dotNetRDF.dll
Syntax
public class SparqlRdfParser : 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. |
Methods
| Improve this Doc View SourceLoad(ISparqlResultsHandler, StreamReader)
Loads a SPARQL Results from RDF contained in the given Stream using a Results Handler.
Declaration
public void Load(ISparqlResultsHandler handler, StreamReader input)
Parameters
Type | Name | Description |
---|---|---|
ISparqlResultsHandler | handler | Results Handler to use. |
System.IO.StreamReader | input | Stream to read from. |
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.
|
Improve this Doc
View Source
Load(ISparqlResultsHandler, TextReader)
Loads a SPARQL Results from RDF contained in the given Input using a Results Handler.
Declaration
public void Load(ISparqlResultsHandler handler, TextReader input)
Parameters
Type | Name | Description |
---|---|---|
ISparqlResultsHandler | handler | Results Handler to use. |
System.IO.TextReader | input | Input to read from. |
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.
|
Improve this Doc
View Source
Load(ISparqlResultsHandler, String)
Loads a SPARQL Results from RDF contained in the given file using a Results Handler.
Declaration
public void Load(ISparqlResultsHandler handler, string filename)
Parameters
Type | Name | Description |
---|---|---|
ISparqlResultsHandler | handler | Results Handler to use. |
System.String | filename | File to read from. |
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.
|
Improve this Doc
View Source
Load(SparqlResultSet, StreamReader)
Loads a SPARQL Result Set from RDF contained in the given Stream.
Declaration
public void Load(SparqlResultSet results, StreamReader input)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | SPARQL Result Set to populate. |
System.IO.StreamReader | input | Stream to read from. |
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.
|
Improve this Doc
View Source
Load(SparqlResultSet, TextReader)
Loads a SPARQL Result Set from RDF contained in the given Input.
Declaration
public void Load(SparqlResultSet results, TextReader input)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | SPARQL Result Set to populate. |
System.IO.TextReader | input | Input to read from. |
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.
|
Improve this Doc
View Source
Load(SparqlResultSet, String)
Loads a SPARQL Result Set from RDF contained in the given File.
Declaration
public void Load(SparqlResultSet results, string filename)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | SPARQL Result Set to populate. |
System.String | filename | File to read from. |
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.
|
Improve this Doc
View Source
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 |
---|---|
System.String |
Overrides
System.Object.ToString()
Events
| Improve this Doc View SourceWarning
Event raised when a non-fatal issue with the SPARQL Results being parsed is detected
Declaration
public event SparqlWarning Warning
Event Type
Type | Description |
---|---|
SparqlWarning |