Show / Hide Table of Contents

Class TriGParser

Parser for parsing TriG (Turtle with Named Graphs) RDF Syntax into a Triple Store.

Inheritance
System.Object
TriGParser
Implements
IStoreReader
ITraceableTokeniser
ITokenisingParser
Inherited Members
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 TriGParser : IStoreReader, ITraceableTokeniser, ITokenisingParser
Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

Constructors

| Improve this Doc View Source

TriGParser()

Creates a TriG Parser than uses the default syntax.

Declaration
public TriGParser()
Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

TriGParser(TriGSyntax)

Creates a TriG Parser which uses the specified syntax.

Declaration
public TriGParser(TriGSyntax syntax)
Parameters
Type Name Description
TriGSyntax syntax

Syntax.

Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

Properties

| Improve this Doc View Source

Syntax

Gets/Sets the TriG syntax used.

Declaration
public TriGSyntax Syntax { get; set; }
Property Value
Type Description
TriGSyntax
Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

TokenQueueMode

Gets/Sets the token queue mode used.

Declaration
public TokenQueueMode TokenQueueMode { get; set; }
Property Value
Type Description
TokenQueueMode
Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

TraceTokeniser

Gets/Sets whether Tokenizer Tracing is used.

Declaration
public bool TraceTokeniser { get; set; }
Property Value
Type Description
System.Boolean
Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

ValidateIris

Gets/Sets whether the tokenizer should validate IRI strings.

Declaration
public bool ValidateIris { get; set; }
Property Value
Type Description
System.Boolean
Remarks

IRI validation is currently only supported for the Rdf11 and Rdf11Star syntax variants. For other variants, the tokenizer used does not provide IRI validation.

Methods

| Improve this Doc View Source

Load(IRdfHandler, TextReader, Uri, IUriFactory)

Loads an RDF dataset using and RDF handler.

Declaration
public void Load(IRdfHandler handler, TextReader input, Uri baseUri, IUriFactory uriFactory)
Parameters
Type Name Description
IRdfHandler handler

RDF handler to use.

System.IO.TextReader input

File to load from.

System.Uri baseUri

Base URI to use when resolving relative URIs in the input.

IUriFactory uriFactory

URI factory to use.

Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

Load(IRdfHandler, TextReader, IUriFactory)

Loads an RDF dataset using and RDF handler.

Declaration
public void Load(IRdfHandler handler, TextReader input, IUriFactory uriFactory)
Parameters
Type Name Description
IRdfHandler handler

RDF handler to use.

System.IO.TextReader input

File to load from.

IUriFactory uriFactory

URI factory to use.

Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

Load(IRdfHandler, TextReader)

Loads the named Graphs from the TriG input using the given RDF Handler.

Declaration
public void Load(IRdfHandler handler, TextReader input)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler to use.

System.IO.TextReader input

Input to load from.

Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

Load(IRdfHandler, string, Uri, IUriFactory)

Loads an RDF dataset using an RDF handler.

Declaration
public void Load(IRdfHandler handler, string filename, Uri baseUri, IUriFactory uriFactory)
Parameters
Type Name Description
IRdfHandler handler

RDF handler to use.

string filename

File to load from.

System.Uri baseUri

Base URI to use when resolving relative URIs in the input.

IUriFactory uriFactory

URI factory to use.

Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

Load(IRdfHandler, string, IUriFactory)

Loads an RDF dataset using an RDF handler.

Declaration
public void Load(IRdfHandler handler, string filename, IUriFactory uriFactory)
Parameters
Type Name Description
IRdfHandler handler

RDF handler to use.

string filename

File to load from.

IUriFactory uriFactory

URI factory to use.

Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

Load(IRdfHandler, string)

Loads the named Graphs from the TriG input using the given RDF Handler.

Declaration
public void Load(IRdfHandler handler, string filename)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler to use.

string filename

File to load from.

Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

Load(ITripleStore, TextReader, Uri)

Loads the named Graphs from the TriG input into the given Triple Store.

Declaration
public void Load(ITripleStore store, TextReader input, Uri baseUri)
Parameters
Type Name Description
ITripleStore store

Triple Store to load into.

System.IO.TextReader input

Input to load from.

System.Uri baseUri

Base URI to use when resolving relative URIs in the input.

Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

Load(ITripleStore, TextReader)

Loads the named Graphs from the TriG input into the given Triple Store.

Declaration
public void Load(ITripleStore store, TextReader input)
Parameters
Type Name Description
ITripleStore store

Triple Store to load into.

System.IO.TextReader input

Input to load from.

Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| Improve this Doc View Source

Load(ITripleStore, string)

Loads the named Graphs from the TriG input into the given Triple Store.

Declaration
public void Load(ITripleStore store, string filename)
Parameters
Type Name Description
ITripleStore store

Triple Store to load into.

string filename

File to load from.

Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

| 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
string
Overrides
object.ToString()
Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

Events

| Improve this Doc View Source

Warning

Event which Readers can raise when they notice syntax that is ambigious/deprecated etc which can still be parsed

Declaration
public event StoreReaderWarning Warning
Event Type
Type Description
StoreReaderWarning
Remarks

The Default Graph (if any) will be given the special Uri. trig:default-graph

Implements

IStoreReader
ITraceableTokeniser
ITokenisingParser

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • TriGParser()
    • TriGParser(TriGSyntax)
  • Properties
    • Syntax
    • TokenQueueMode
    • TraceTokeniser
    • ValidateIris
  • Methods
    • Load(IRdfHandler, TextReader, Uri, IUriFactory)
    • Load(IRdfHandler, TextReader, IUriFactory)
    • Load(IRdfHandler, TextReader)
    • Load(IRdfHandler, string, Uri, IUriFactory)
    • Load(IRdfHandler, string, IUriFactory)
    • Load(IRdfHandler, string)
    • Load(ITripleStore, TextReader, Uri)
    • Load(ITripleStore, TextReader)
    • Load(ITripleStore, string)
    • ToString()
  • Events
    • Warning
  • Implements
  • Extension Methods
Back to top Generated by DocFX