Class NTriplesTokeniser
Tokeniser for NTriples RDF Syntax.
Implements
Inherited Members
Namespace: VDS.RDF.Parsing.Tokens
Assembly: dotNetRdf.dll
Syntax
public class NTriplesTokeniser : BaseTokeniser, ITokeniser
Constructors
| Improve this Doc View SourceNTriplesTokeniser(StreamReader, NTriplesSyntax)
Creates a new NTriples Tokeniser which reads Tokens from the given Stream.
Declaration
public NTriplesTokeniser(StreamReader input, NTriplesSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
System.IO.StreamReader | input | Stream to read Tokens from. |
NTriplesSyntax | syntax | NTriples syntax to tokenise. |
NTriplesTokeniser(StreamReader)
Creates a new NTriples Tokeniser which reads Tokens from the given Stream.
Declaration
public NTriplesTokeniser(StreamReader input)
Parameters
Type | Name | Description |
---|---|---|
System.IO.StreamReader | input | Stream to read Tokens from. |
NTriplesTokeniser(TextReader, NTriplesSyntax)
Creates a new NTriples Tokeniser which reads Tokens from the given Input.
Declaration
public NTriplesTokeniser(TextReader input, NTriplesSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | input | Input to read Tokens from. |
NTriplesSyntax | syntax | NTriples syntax to tokenise. |
NTriplesTokeniser(TextReader)
Creates a new NTriples Tokeniser which reads Tokens from the given Input.
Declaration
public NTriplesTokeniser(TextReader input)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | input | Input to read Tokens from. |
NTriplesTokeniser(ParsingTextReader, NTriplesSyntax)
Creates a new NTriples Tokeniser which reads Tokens from the given Stream.
Declaration
public NTriplesTokeniser(ParsingTextReader input, NTriplesSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
ParsingTextReader | input | Stream to read Tokens from. |
NTriplesSyntax | syntax | NTriples syntax to tokenise. |
NTriplesTokeniser(ParsingTextReader)
Creates a new NTriples Tokeniser which reads Tokens from the given Stream.
Declaration
public NTriplesTokeniser(ParsingTextReader input)
Parameters
Type | Name | Description |
---|---|---|
ParsingTextReader | input | Stream to read Tokens from. |
Properties
| Improve this Doc View SourceNQuadsMode
Gets/Sets whether the output should be altered slightly to support NQuads parsing.
Declaration
[Obsolete("This property is no longer used. The tokenizer now behaves consistently for NQuads and NTriples syntax. This property will be removed in a future release.")]
public bool NQuadsMode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
This is used internally to alter how DataTypes get tokenised, normally these are just returned as a UriToken since a Literal can only occur as the Object in NTriples and so if we see a Uri after a Literal it must be it's datatype and not part of another Triple.
In the case of NQuads a UriToken may follow a Literal as the Context of that Triple and not its datatype so it's important to distinguish by using a DataTypeToken instead.
Syntax
Gets/Sets the NTriples syntax that should be supported.
Declaration
public NTriplesSyntax Syntax { get; set; }
Property Value
Type | Description |
---|---|
NTriplesSyntax |
Methods
| Improve this Doc View SourceGetNextToken()
Gets the next available Token from the Input Stream.
Declaration
public override IToken GetNextToken()
Returns
Type | Description |
---|---|
IToken |