public class TurtleUtil extends Object
Modifier and Type | Field and Description |
---|---|
static char[] |
LOCAL_ESCAPED_CHARS |
Constructor and Description |
---|
TurtleUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
decodeString(String s)
Decodes an encoded Turtle string.
|
static String |
encodeLongString(String s)
Encodes the supplied string for inclusion as a long string in a Turtle
document.
|
static String |
encodeString(String s)
Encodes the supplied string for inclusion as a 'normal' string in a Turtle
document.
|
static String |
encodeURIString(String s)
Encodes the supplied string for inclusion as a (relative) URI in a Turtle
document.
|
static int |
findURISplitIndex(String uri)
Tries to find an index where the supplied URI can be split into a
namespace and a local name that comply with the serialization constraints
of the Turtle format.
|
static boolean |
isLanguageChar(int c) |
static boolean |
isLanguageStartChar(int c) |
static boolean |
isLocalEscapedChar(int c) |
static boolean |
isNameChar(int c) |
static boolean |
isNameEndChar(int c) |
static boolean |
isNameStartChar(int c) |
static boolean |
isPERCENT(String name) |
static boolean |
isPLX_INTERNAL(String name) |
static boolean |
isPLX_START(String name) |
static boolean |
isPN_CHARS_BASE(int c)
From Turtle Spec:
|
static boolean |
isPN_CHARS_U(int c)
From Turtle Spec:
|
static boolean |
isPN_CHARS(int c)
From Turtle Spec:
|
static boolean |
isPN_LOCAL_ESC(String name) |
static boolean |
isPN_LOCAL(String name) |
static boolean |
isPN_PREFIX(String prefix)
From Turtle Spec:
|
static boolean |
isPrefixChar(int c) |
static boolean |
isPrefixStartChar(int c) |
static boolean |
isWhitespace(int c) |
public static int findURISplitIndex(String uri)
uri
- The URI to split.public static boolean isWhitespace(int c)
public static boolean isPN_CHARS_BASE(int c)
http://www.w3.org/TR/turtle/#grammar-production-PN_CHARS_BASE
[163s] PN_CHARS_BASE ::= [A-Z] | [a-z] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x02FF] | [#x0370-#x037D] | [#x037F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
c
- public static boolean isPN_CHARS_U(int c)
http://www.w3.org/TR/turtle/#grammar-production-PN_CHARS_U
[164s] PN_CHARS_U ::= PN_CHARS_BASE | '_'
c
- public static boolean isPN_CHARS(int c)
http://www.w3.org/TR/turtle/#grammar-production-PN_CHARS
[166s] PN_CHARS ::= PN_CHARS_U | '-' | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040]
c
- public static boolean isPrefixStartChar(int c)
public static boolean isNameStartChar(int c)
public static boolean isNameChar(int c)
public static boolean isNameEndChar(int c)
public static boolean isLocalEscapedChar(int c)
public static boolean isPrefixChar(int c)
public static boolean isLanguageStartChar(int c)
public static boolean isLanguageChar(int c)
public static boolean isPN_PREFIX(String prefix)
http://www.w3.org/TR/turtle/#grammar-production-PN_PREFIX
[167s] PN_PREFIX ::= PN_CHARS_BASE ((PN_CHARS | '.')* PN_CHARS)?
prefix
- public static boolean isPLX_START(String name)
public static boolean isPERCENT(String name)
substring
- public static boolean isPLX_INTERNAL(String name)
public static boolean isPN_LOCAL_ESC(String name)
public static boolean isPN_LOCAL(String name)
public static String encodeString(String s)
public static String encodeLongString(String s)
public static String encodeURIString(String s)
public static String decodeString(String s)
s
- An encoded Turtle string.IllegalArgumentException
- If the supplied string is not a correctly encoded Turtle
string.Copyright © 2001-2016 Aduna. All Rights Reserved.