Class TurtleSpecsHelper
Helper function relating to the Turtle Specifications.
Inheritance
Inherited Members
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public class TurtleSpecsHelper
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
Fields
| Improve this Doc View SourceLongLiteralsPattern
Pattern for determining whether a given String should be serialized as a Long Literal.
Declaration
public const string LongLiteralsPattern = "[\n\r\t\"]"
Field Value
Type | Description |
---|---|
string |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
ValidDecimalPattern
Pattern for Valid Decimals in Turtle.
Declaration
public const string ValidDecimalPattern = "^(\\+|-)?(\\d+\\.\\d*|\\.\\d+|\\d+)$"
Field Value
Type | Description |
---|---|
string |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
ValidDoublePattern
Pattern for Valid Doubles in Turtle.
Declaration
public const string ValidDoublePattern = "^(\\+|-)?(\\d+\\.\\d*[eE](\\+|-)?\\d+|\\.\\d+[eE](\\+|-)?\\d+|\\d+[eE](\\+|-)?\\d+)$"
Field Value
Type | Description |
---|---|
string |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
ValidIntegerPattern
Pattern for Valid Integers in Turtle.
Declaration
public const string ValidIntegerPattern = "^(\\+|-)?\\d+$"
Field Value
Type | Description |
---|---|
string |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
Methods
| Improve this Doc View SourceInferPlainLiteralType(PlainLiteralToken, TurtleSyntax)
Infers the Type of a Plain Literal.
Declaration
public static Uri InferPlainLiteralType(PlainLiteralToken p, TurtleSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
PlainLiteralToken | p | Plain Literal to infer the Type of. |
TurtleSyntax | syntax | Turtle Syntax. |
Returns
Type | Description |
---|---|
System.Uri | A Uri representing the XML Scheme Data Type for the Plain Literal. |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsHex(char)
Gets whether a character is a Hex character.
Declaration
public static bool IsHex(char c)
Parameters
Type | Name | Description |
---|---|---|
char | c | Character. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsLongLiteral(string)
Determines whether a given String should be serialized as a Long Literal.
Declaration
public static bool IsLongLiteral(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | String to test. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsNameChar(char, char)
Gets whether a surrogate pair matches the nameChar production from the Turtle specification.
Declaration
public static bool IsNameChar(char c, char d)
Parameters
Type | Name | Description |
---|---|---|
char | c | High surrogate. |
char | d | Low surrogate. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsNameChar(char)
Gets whether a character matches the nameChar production from the Turtle specification.
Declaration
public static bool IsNameChar(char c)
Parameters
Type | Name | Description |
---|---|---|
char | c | Character. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsNameStartChar(char, char)
Gets whether a surrogate pair matches the nameStartChar production from the Turtle specification.
Declaration
public static bool IsNameStartChar(char c, char d)
Parameters
Type | Name | Description |
---|---|---|
char | c | High surrogate. |
char | d | Low surrogate. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsNameStartChar(char)
Gets whether a character matches the nameStartChar production from the Turtle specification.
Declaration
public static bool IsNameStartChar(char c)
Parameters
Type | Name | Description |
---|---|---|
char | c | Character. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsPLX(char[], int, out int)
Checks whether a given String matches the PLX rule from the Turtle W3C Specification.
Declaration
public static bool IsPLX(char[] cs, int startIndex, out int endIndex)
Parameters
Type | Name | Description |
---|---|---|
char[] | cs | String as character array. |
int | startIndex | Start Index. |
int | endIndex | Resulting End Index. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsPNChars(char, char)
Gets whether a surrogate pair matches the PN_CHARS production from the Turtle specification.
Declaration
public static bool IsPNChars(char c, char d)
Parameters
Type | Name | Description |
---|---|---|
char | c | High surrogate. |
char | d | Low surrogate. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsPNChars(char)
Gets whether a character matches the PN_CHARS production from the Turtle specification.
Declaration
public static bool IsPNChars(char c)
Parameters
Type | Name | Description |
---|---|---|
char | c | Character. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsPNCharsBase(char, char)
Gets whether a surrogate pair matches the PN_CHARS_BASE production from the Turtle specifications.
Declaration
public static bool IsPNCharsBase(char c, char d)
Parameters
Type | Name | Description |
---|---|---|
char | c | High surrogate. |
char | d | Low surrogate. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsPNCharsBase(char)
Gets whether a character matches the PN_CHARS_BASE production from the Turtle specifications.
Declaration
public static bool IsPNCharsBase(char c)
Parameters
Type | Name | Description |
---|---|---|
char | c | Character. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsPNCharsU(char, char)
Gets whether a surrogate pair matches the PN_CHARS_U production from the Turtle specification.
Declaration
public static bool IsPNCharsU(char c, char d)
Parameters
Type | Name | Description |
---|---|---|
char | c | High surrogate. |
char | d | Low surrogate. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsPNCharsU(char)
Gets whether a character matches the PN_CHARS_U production from the Turtle specification.
Declaration
public static bool IsPNCharsU(char c)
Parameters
Type | Name | Description |
---|---|---|
char | c | Character. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsPNLocal(string)
Gets whether the given value matches the PN_LOCAL rule from the Turtle specification.
Declaration
public static bool IsPNLocal(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | Value. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsPNPrefix(string, TurtleSyntax)
Gets whether the given value is the valid prefix portion of a prefixed name in Turtle.
Declaration
public static bool IsPNPrefix(string value, TurtleSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
string | value | Value. |
TurtleSyntax | syntax | Turtle Syntax. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsValidDecimal(string)
Determines whether a given String is a valid Decimal.
Declaration
public static bool IsValidDecimal(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | String to test. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsValidDouble(string)
Determines whether a given String is a valid Double.
Declaration
public static bool IsValidDouble(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | String to test. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsValidInteger(string)
Determines whether a given String is a valid Integer.
Declaration
public static bool IsValidInteger(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | String to test. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsValidLocalName(string, TurtleSyntax)
Gets whether the given value is the valid local name portion of a prefixed name in Turtle.
Declaration
public static bool IsValidLocalName(string value, TurtleSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
string | value | Value. |
TurtleSyntax | syntax | Turtle Syntax. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsValidPlainLiteral(string, Uri, TurtleSyntax)
Determines whether a given String is a valid Plain Literal for the given Datatype.
Declaration
public static bool IsValidPlainLiteral(string value, Uri dt, TurtleSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
string | value | Value. |
System.Uri | dt | Datatype. |
TurtleSyntax | syntax | Turtle Syntax. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsValidPlainLiteral(string, TurtleSyntax)
Determines whether a given String is a valid Plain Literal.
Declaration
public static bool IsValidPlainLiteral(string value, TurtleSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
string | value | String to test. |
TurtleSyntax | syntax | Turtle Syntax. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsValidPrefix(string, TurtleSyntax)
Gets whether the given value is a valid prefix in Turtle.
Declaration
public static bool IsValidPrefix(string value, TurtleSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
string | value | Value. |
TurtleSyntax | syntax | Turtle Syntax. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsValidQName(string, TurtleSyntax)
Determines whether a given String is a valid QName.
Declaration
public static bool IsValidQName(string value, TurtleSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
string | value | String to test. |
TurtleSyntax | syntax | Turtle Syntax. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
IsValidQName(string)
Gets whether a QName is valid in Turtle (assumes Turtle as originally specified by Dave Beckett).
Declaration
public static bool IsValidQName(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | QName. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.
UnescapeQName(string)
Unescapes local name escapes in a QName.
Declaration
public static string UnescapeQName(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | QName. |
Returns
Type | Description |
---|---|
string | Unescaped QName. |
Remarks
Not currently used in the actual TurtleTokeniser or TurtleParser but is used for the new TriGTokeniser.