Class NTriplesParser
Parser for NTriples syntax.
Inheritance
System.Object
NTriplesParser
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 NTriplesParser : IRdfReader, ITraceableParser, ITraceableTokeniser, ITokenisingParser
Constructors
| Improve this Doc View SourceNTriplesParser()
Creates a new instance of the parser.
Declaration
public NTriplesParser()
NTriplesParser(NTriplesSyntax)
Creates a new instance of the parser.
Declaration
public NTriplesParser(NTriplesSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
NTriplesSyntax | syntax | NTriples syntax to parse. |
NTriplesParser(NTriplesSyntax, TokenQueueMode)
Creates a new instance of the parser using the given syntax and token queue mode.
Declaration
public NTriplesParser(NTriplesSyntax syntax, TokenQueueMode qmode)
Parameters
Type | Name | Description |
---|---|---|
NTriplesSyntax | syntax | NTriples syntax to parse. |
TokenQueueMode | qmode | Token Queue Mode. |
NTriplesParser(TokenQueueMode)
Creates a new instance of the parser using the given token queue mode.
Declaration
public NTriplesParser(TokenQueueMode qmode)
Parameters
Type | Name | Description |
---|---|---|
TokenQueueMode | qmode | Token Queue Mode. |
Properties
| Improve this Doc View SourceSyntax
Gets/Sets the desired NTriples syntax.
Declaration
public NTriplesSyntax Syntax { get; set; }
Property Value
Type | Description |
---|---|
NTriplesSyntax |
TokenQueueMode
Gets/Sets the token queue mode used.
Declaration
public TokenQueueMode TokenQueueMode { get; set; }
Property Value
Type | Description |
---|---|
TokenQueueMode |
TraceParsing
Controls whether Parser progress will be traced by writing output to the Console.
Declaration
public bool TraceParsing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TraceTokeniser
Controls whether Tokeniser progress will be traced by writing output to the Console.
Declaration
public bool TraceTokeniser { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceLoad(IGraph, StreamReader)
Parses NTriples Syntax from the given Input Stream into Triples in the given Graph.
Declaration
public void Load(IGraph g, StreamReader input)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to create Triples in. |
System.IO.StreamReader | input | Arbitrary Input Stream to read input from. |
Load(IGraph, TextReader)
Parses NTriples Syntax from the given Input into Triples in the given Graph.
Declaration
public void Load(IGraph g, TextReader input)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to create Triples in. |
System.IO.TextReader | input | Arbitrary Input to read input from. |
Load(IGraph, String)
Parses NTriples Syntax from the given File into Triples in the given Graph.
Declaration
public void Load(IGraph g, string filename)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to create Triples in. |
System.String | filename | Name of the file containing Turtle Syntax. |
Remarks
Simply opens an StreamReader and uses the overloaded version of this function.
|
Improve this Doc
View Source
Load(IRdfHandler, StreamReader)
Parses NTriples Syntax from the given Input Stream using a RDF Handler.
Declaration
public void Load(IRdfHandler handler, StreamReader input)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler to use. |
System.IO.StreamReader | input | Input Stream to read input from. |
Load(IRdfHandler, TextReader)
Parses NTriples Syntax from the given Input using a 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 read input from. |
Load(IRdfHandler, String)
Parses NTriples Syntax from the given file using a RDF Handler.
Declaration
public void Load(IRdfHandler handler, string filename)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler to use. |
System.String | filename | File to read 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 |
---|---|
System.String |
Overrides
System.Object.ToString()
Events
| Improve this Doc View SourceWarning
Event which is raised when there is a non-fatal issue with the NTriples being parsed
Declaration
public event RdfReaderWarning Warning
Event Type
Type | Description |
---|---|
RdfReaderWarning |