Show / Hide Table of Contents

Class ParserHelper

Static Helper class containing useful methods for Parsers.
Inheritance
System.Object
ParserHelper
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)
System.Object.ToString()
Namespace: VDS.RDF.Parsing
Assembly: dotNetRDF.dll
Syntax
public static class ParserHelper

Methods

| Improve this Doc View Source

Error(String, String, IRdfXmlEvent)

Helper function which generates standardised Error Messages.
Declaration
public static RdfParseException Error(string message, string production, IRdfXmlEvent evt)
Parameters
Type Name Description
System.String message Error Message.
System.String production The Production where the Error occurred.
IRdfXmlEvent evt Event causing the Error.
Returns
Type Description
RdfParseException
| Improve this Doc View Source

Error(String, IRdfXmlEvent)

Helper function which generates standardised Error Messages.
Declaration
public static RdfParseException Error(string message, IRdfXmlEvent evt)
Parameters
Type Name Description
System.String message Error Message.
IRdfXmlEvent evt Event causing the Error.
Returns
Type Description
RdfParseException
| Improve this Doc View Source

Error(String, IToken)

Helper method for raising informative standardised Parser Errors.
Declaration
public static RdfParseException Error(string msg, IToken t)
Parameters
Type Name Description
System.String msg The Error Message.
IToken t The Token that is the cause of the Error.
Returns
Type Description
RdfParseException
| Improve this Doc View Source

Stop()

Throws a RdfParsingTerminatedException which is used to tell the parser that it should stop parsing.
Declaration
public static void Stop()
| Improve this Doc View Source

TryResolveUri(IGraph, IToken)

Attempts to resolve a QName or URI Token into a URI Node and produces appropriate error messages if this fails.
Declaration
public static INode TryResolveUri(IGraph g, IToken t)
Parameters
Type Name Description
IGraph g Graph.
IToken t Token to resolve.
Returns
Type Description
INode
| Improve this Doc View Source

TryResolveUri(IParserContext, IToken)

Attempts to resolve a QName or URI Token into a URI Node and produces appropriate error messages if this fails.
Declaration
public static INode TryResolveUri(IParserContext context, IToken t)
Parameters
Type Name Description
IParserContext context Parser Context.
IToken t Token to resolve.
Returns
Type Description
INode
| Improve this Doc View Source

TryResolveUri(IParserContext, IToken, Boolean)

Attempts to resolve a QName or URI Token into a URI Node and produces appropriate error messages if this fails.
Declaration
public static INode TryResolveUri(IParserContext context, IToken t, bool allowDefaultPrefixFallback)
Parameters
Type Name Description
IParserContext context Parser Context.
IToken t Token to resolve.
System.Boolean allowDefaultPrefixFallback Whether when the default prefix is used but not defined it can fallback to the Base URI.
Returns
Type Description
INode
| Improve this Doc View Source

TryResolveUri(IParserContext, IToken, Boolean, Func<String, String>)

Attempts to resolve a QName or URI Token into a URI Node and produces appropriate error messages if this fails.
Declaration
public static INode TryResolveUri(IParserContext context, IToken t, bool allowDefaultPrefixFallback, Func<string, string> qnameUnescape)
Parameters
Type Name Description
IParserContext context Parser Context.
IToken t Token to resolve.
System.Boolean allowDefaultPrefixFallback Whether when the default prefix is used but not defined it can fallback to the Base URI.
System.Func<System.String, System.String> qnameUnescape QName unescaping function.
Returns
Type Description
INode
| Improve this Doc View Source

TryResolveUri(IStoreParserContext, IToken)

Attempts to resolve a QName or URI Token into a URI Node and produces appropriate error messages if this fails.
Declaration
public static INode TryResolveUri(IStoreParserContext context, IToken t)
Parameters
Type Name Description
IStoreParserContext context Parser Context.
IToken t Token to resolve.
Returns
Type Description
INode
  • Improve this Doc
  • View Source
In This Article
  • Methods
    • Error(String, String, IRdfXmlEvent)
    • Error(String, IRdfXmlEvent)
    • Error(String, IToken)
    • Stop()
    • TryResolveUri(IGraph, IToken)
    • TryResolveUri(IParserContext, IToken)
    • TryResolveUri(IParserContext, IToken, Boolean)
    • TryResolveUri(IParserContext, IToken, Boolean, Func<String, String>)
    • TryResolveUri(IStoreParserContext, IToken)
Back to top Generated by DocFX