Class TriGParser
Parser for parsing TriG (Turtle with Named Graphs) RDF Syntax into a Triple Store.
Inherited Members
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
| Edit this page View SourceTriGParser()
Creates a TriG Parser than uses the default syntax.
Declaration
public TriGParser()
TriGParser(TriGSyntax)
Creates a TriG Parser which uses the specified syntax.
Declaration
public TriGParser(TriGSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
TriGSyntax | syntax | Syntax. |
Properties
| Edit this page View SourceSyntax
Gets/Sets the TriG syntax used.
Declaration
public TriGSyntax Syntax { get; set; }
Property Value
Type | Description |
---|---|
TriGSyntax |
TokenQueueMode
Gets/Sets the token queue mode used.
Declaration
public TokenQueueMode TokenQueueMode { get; set; }
Property Value
Type | Description |
---|---|
TokenQueueMode |
TraceTokeniser
Gets/Sets whether Tokenizer Tracing is used.
Declaration
public bool TraceTokeniser { get; set; }
Property Value
Type | Description |
---|---|
bool |
ValidateIris
Gets/Sets whether the tokenizer should validate IRI strings.
Declaration
public bool ValidateIris { get; set; }
Property Value
Type | Description |
---|---|
bool |
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
| Edit this page View SourceLoad(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. |
TextReader | input | Input to load from. |
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. |
TextReader | input | File to load from. |
Uri | baseUri | Base URI to use when resolving relative URIs in the input. |
IUriFactory | uriFactory | URI factory to use. |
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. |
TextReader | input | File to load from. |
IUriFactory | uriFactory | URI factory to use. |
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. |
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. |
Uri | baseUri | Base URI to use when resolving relative URIs in the input. |
IUriFactory | uriFactory | URI factory to use. |
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. |
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. |
TextReader | input | Input to load from. |
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. |
TextReader | input | Input to load from. |
Uri | baseUri | Base URI to use when resolving relative URIs in the input. |
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. |
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
| Edit this page View SourceWarning
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 |