Class TurtleSpecsHelper
Helper function relating to the Turtle Specifications.
Inheritance
System.Object
TurtleSpecsHelper
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()
Assembly: dotNetRDF.dll
Syntax
public class TurtleSpecsHelper
Fields
|
Improve this Doc
View Source
LongLiteralsPattern
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 |
System.String |
|
|
Improve this Doc
View Source
ValidDecimalPattern
Pattern for Valid Decimals in Turtle.
Declaration
public const string ValidDecimalPattern = "^(\\+|-)?(\\d+\\.\\d*|\\.\\d+|\\d+)$"
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
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 |
System.String |
|
|
Improve this Doc
View Source
ValidIntegerPattern
Pattern for Valid Integers in Turtle.
Declaration
public const string ValidIntegerPattern = "^(\\+|-)?\\d+$"
Field Value
Type |
Description |
System.String |
|
Methods
|
Improve this Doc
View Source
InferPlainLiteralType(PlainLiteralToken, TurtleSyntax)
Infers the Type of a Plain Literal.
Declaration
public static Uri InferPlainLiteralType(PlainLiteralToken p, TurtleSyntax syntax)
Parameters
Returns
Type |
Description |
System.Uri |
A Uri representing the XML Scheme Data Type for the Plain Literal. |
|
Improve this Doc
View Source
IsHex(Char)
Gets whether a character is a Hex character.
Declaration
public static bool IsHex(char c)
Parameters
Type |
Name |
Description |
System.Char |
c |
Character. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.String |
value |
String to test. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.Char |
c |
Character. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.Char |
c |
High surrogate. |
System.Char |
d |
Low surrogate. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.Char |
c |
Character. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.Char |
c |
High surrogate. |
System.Char |
d |
Low surrogate. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsPLX(Char[], Int32, out Int32)
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 |
System.Char[] |
cs |
String as character array. |
System.Int32 |
startIndex |
Start Index. |
System.Int32 |
endIndex |
Resulting End Index. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.Char |
c |
Character. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.Char |
c |
High surrogate. |
System.Char |
d |
Low surrogate. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.Char |
c |
Character. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.Char |
c |
High surrogate. |
System.Char |
d |
Low surrogate. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.Char |
c |
Character. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.Char |
c |
High surrogate. |
System.Char |
d |
Low surrogate. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.String |
value |
Value. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.String |
value |
Value. |
TurtleSyntax |
syntax |
Turtle Syntax. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsValidDecimal(String)
Determines whether a given String is a valid Decimal.
Declaration
public static bool IsValidDecimal(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
String to test. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsValidDouble(String)
Determines whether a given String is a valid Double.
Declaration
public static bool IsValidDouble(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
String to test. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsValidInteger(String)
Determines whether a given String is a valid Integer.
Declaration
public static bool IsValidInteger(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
String to test. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.String |
value |
Value. |
TurtleSyntax |
syntax |
Turtle Syntax. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.String |
value |
Value. |
System.Uri |
dt |
Datatype. |
TurtleSyntax |
syntax |
Turtle Syntax. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.String |
value |
String to test. |
TurtleSyntax |
syntax |
Turtle Syntax. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.String |
value |
Value. |
TurtleSyntax |
syntax |
Turtle Syntax. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.String |
value |
QName. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
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 |
System.String |
value |
String to test. |
TurtleSyntax |
syntax |
Turtle Syntax. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
UnescapeQName(String)
Unescapes local name escapes in a QName.
Declaration
public static string UnescapeQName(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
QName. |
Returns
Type |
Description |
System.String |
Unescaped QName. |
Extension Methods