Show / Hide Table of Contents

Class SparqlRdfParser

Parser for reading SPARQL Results which have been encoded in the RDF schema for Result Sets and serialized as RDF.

Inheritance
object
BaseSparqlResultsReader
SparqlRdfParser
Implements
ISparqlResultsReader
Inherited Members
BaseSparqlResultsReader.Load(SparqlResultSet, StreamReader)
BaseSparqlResultsReader.Load(SparqlResultSet, string)
BaseSparqlResultsReader.Load(SparqlResultSet, TextReader)
BaseSparqlResultsReader.Load(ISparqlResultsHandler, StreamReader)
BaseSparqlResultsReader.Load(ISparqlResultsHandler, string)
BaseSparqlResultsReader.Load(ISparqlResultsHandler, TextReader)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public class SparqlRdfParser : BaseSparqlResultsReader, ISparqlResultsReader

Constructors

| Edit this page View Source

SparqlRdfParser()

Creates a new SPARQL RDF Parser which will use auto-detection for determining the syntax of input streams/files.

Declaration
public SparqlRdfParser()
| Edit this page View Source

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

| Edit this page View Source

SparqlRdfResultsNamespace

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

| Edit this page View Source

Load(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.

StreamReader input

Stream to read from.

IUriFactory uriFactory

URI Factory to use.

Overrides
BaseSparqlResultsReader.Load(ISparqlResultsHandler, StreamReader, IUriFactory)
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.

| Edit this page View Source

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.

TextReader input

Input to read from.

IUriFactory uriFactory

URI Factory to use.

Overrides
BaseSparqlResultsReader.Load(ISparqlResultsHandler, TextReader, IUriFactory)
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.

| Edit this page View Source

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
BaseSparqlResultsReader.Load(ISparqlResultsHandler, string, IUriFactory)
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.

| Edit this page View Source

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.

StreamReader input

Stream to read from.

IUriFactory uriFactory

URI Factory to use.

Overrides
BaseSparqlResultsReader.Load(SparqlResultSet, StreamReader, IUriFactory)
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.

| Edit this page View Source

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.

TextReader input

Input to read from.

IUriFactory uriFactory

URI Factory to use.

Overrides
BaseSparqlResultsReader.Load(SparqlResultSet, TextReader, IUriFactory)
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.

| Edit this page View Source

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
BaseSparqlResultsReader.Load(SparqlResultSet, string, IUriFactory)
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.

| Edit this page 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
string
Overrides
object.ToString()

Events

| Edit this page View Source

Warning

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
Overrides
BaseSparqlResultsReader.Warning

Implements

ISparqlResultsReader

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • SparqlRdfParser()
    • SparqlRdfParser(IRdfReader)
  • Fields
    • SparqlRdfResultsNamespace
  • Methods
    • Load(ISparqlResultsHandler, StreamReader, IUriFactory)
    • Load(ISparqlResultsHandler, TextReader, IUriFactory)
    • Load(ISparqlResultsHandler, string, IUriFactory)
    • Load(SparqlResultSet, StreamReader, IUriFactory)
    • Load(SparqlResultSet, TextReader, IUriFactory)
    • Load(SparqlResultSet, string, IUriFactory)
    • ToString()
  • Events
    • Warning
  • Implements
  • Extension Methods
Back to top Generated by DocFX