Class SparqlQueryParserContext
Parser Context for SPARQL Query parser.
Inherited Members
Namespace: VDS.RDF.Parsing.Contexts
Assembly: dotNetRdf.dll
Syntax
public class SparqlQueryParserContext : TokenisingParserContext, IParserContext, ITokenisingParserContext
Constructors
| Edit this page View SourceSparqlQueryParserContext(SparqlQueryParserContext, ITokenQueue)
Creates a new SPARQL Query Parser Context for parsing sub-queries.
Declaration
protected SparqlQueryParserContext(SparqlQueryParserContext parent, ITokenQueue tokens)
Parameters
Type | Name | Description |
---|---|---|
SparqlQueryParserContext | parent | Parent Query Parser Context. |
ITokenQueue | tokens | Tokens that need parsing to form a subquery. |
SparqlQueryParserContext(ITokenQueue, Uri, INamespaceMapper)
Creates a new Query Parser Context from the given Token Queue.
Declaration
protected SparqlQueryParserContext(ITokenQueue tokens, Uri baseUri, INamespaceMapper namespaceMap)
Parameters
Type | Name | Description |
---|---|---|
ITokenQueue | tokens | Token Queue. |
Uri | baseUri | The base URI to use when resolving relative URIS in the query. May be null if there is no initial base URI. |
INamespaceMapper | namespaceMap | The namespace map to use when resolving QNames in the query. If null, will default to a new empty namespace map. |
SparqlQueryParserContext(ITokeniser)
Creates a new SPARQL Query Parser Context with default settings.
Declaration
public SparqlQueryParserContext(ITokeniser tokeniser)
Parameters
Type | Name | Description |
---|---|---|
ITokeniser | tokeniser | Tokeniser to use. |
SparqlQueryParserContext(ITokeniser, bool, bool)
Creates a new SPARQL Query Parser Context with custom settings.
Declaration
public SparqlQueryParserContext(ITokeniser tokeniser, bool traceParsing, bool traceTokeniser)
Parameters
Type | Name | Description |
---|---|---|
ITokeniser | tokeniser | Tokeniser to use. |
bool | traceParsing | Whether to trace parsing. |
bool | traceTokeniser | Whether to trace tokenisation. |
SparqlQueryParserContext(ITokeniser, TokenQueueMode)
Creates a new SPARQL Query Parser Context with custom settings.
Declaration
public SparqlQueryParserContext(ITokeniser tokeniser, TokenQueueMode queueMode)
Parameters
Type | Name | Description |
---|---|---|
ITokeniser | tokeniser | Tokeniser to use. |
TokenQueueMode | queueMode | Tokeniser Queue Mode. |
SparqlQueryParserContext(ITokeniser, TokenQueueMode, bool, bool, IUriFactory)
Creates a new SPARQL Query Parser Context with custom settings.
Declaration
public SparqlQueryParserContext(ITokeniser tokeniser, TokenQueueMode queueMode, bool traceParsing, bool traceTokeniser, IUriFactory uriFactory = null)
Parameters
Type | Name | Description |
---|---|---|
ITokeniser | tokeniser | Tokeniser to use. |
TokenQueueMode | queueMode | Tokeniser Queue Mode. |
bool | traceParsing | Whether to trace parsing. |
bool | traceTokeniser | Whether to trace tokenisation. |
IUriFactory | uriFactory | URI Factory to use. |
Properties
| Edit this page View SourceBlankNodeID
Gets the last Blank Node ID that was issued.
Declaration
public int BlankNodeID { get; }
Property Value
Type | Description |
---|---|
int |
BlankNodeIDUsages
Gets the mapping of in use Blank Nodes IDs.
Declaration
public Dictionary<string, int> BlankNodeIDUsages { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, int> |
CheckBlankNodeScope
Gets/Sets whether Blank Node scoping must be checked.
Declaration
public bool CheckBlankNodeScope { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
If false then only name tracking will be done to prevent auto-generated IDs colliding with user allocated IDs.
DefaultBaseUri
Gets/Sets the default Base Uri to resolve relative URIs against.
Declaration
public Uri DefaultBaseUri { get; set; }
Property Value
Type | Description |
---|---|
Uri |
ExpressionFactories
Gets the Custom Expression Factories valid for this Parser.
Declaration
public IEnumerable<ISparqlCustomExpressionFactory> ExpressionFactories { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<ISparqlCustomExpressionFactory> |
GraphPatternID
Gets/Sets the current Graph Pattern ID.
Declaration
public int GraphPatternID { get; set; }
Property Value
Type | Description |
---|---|
int |
NextAliasID
Gets the Next Available Alias ID for aliasing Project Expressions and Aggregates which don't have an Aggregate Specified.
Declaration
public int NextAliasID { get; }
Property Value
Type | Description |
---|---|
int |
Query
Gets the Query that this Parser Context is populating.
Declaration
public SparqlQuery Query { get; }
Property Value
Type | Description |
---|---|
SparqlQuery |
SubQueryMode
Returns whether this Parser Context is for a sub-query.
Declaration
public bool SubQueryMode { get; }
Property Value
Type | Description |
---|---|
bool |
SyntaxMode
Gets/Sets the Syntax that should be supported.
Declaration
public SparqlQuerySyntax SyntaxMode { get; set; }
Property Value
Type | Description |
---|---|
SparqlQuerySyntax |
VerbSeen
Gets/Sets whether the Query Verb has been seen.
Declaration
public bool VerbSeen { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceGetNewBlankNodeID()
Gets a new Blank Node ID.
Declaration
public string GetNewBlankNodeID()
Returns
Type | Description |
---|---|
string |