|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.quasiliteral.syntax.URIKit
Safe: This class provides some conveniences for manipulating E URI-tokens.
A URI-token is an E token with a type-code of either URI or URIStart.
<uri> ::= '<'<identifier>
':'<uric>
* '>' <uriStart> ::= '<' <identifier> ':'
Field Summary | |
private static boolean[] |
URICs
|
Constructor Summary | |
URIKit()
Enabled: |
Method Summary | |
static Twine |
getBody(Twine uriText)
Enabled: All text after the first colon |
static Twine |
getProtcol(Twine uriText)
Enabled: All text up to but not including the first colon. |
static boolean |
isURIC(char c)
Enabled: According to BNF of opaque URIs (see Appendix A) these are characters that can occur within a URI body: |
static boolean |
isURICs(String str)
Enabled: |
static Twine |
normalize(Twine uriText)
Enabled: Normalizes an input URI string to the "actual" URI string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final boolean[] URICs
Constructor Detail |
public URIKit()
Method Detail |
public static Twine normalize(Twine uriText)
A backslash ('\\') normalizes to a slash ('/'), and a vertical bar ('|') normalizes to a colon (':'), leaving only URIC characters (according to BNF of opaque URIs (see Appendix A)) and the fragment identifier (sharp-sign ('#')).
XXX An open question is whether normalize/1 should also normalize '%<hex><hex>' to the encoded character. Currently this is not done.
public static Twine getProtcol(Twine uriText)
public static Twine getBody(Twine uriText)
public static boolean isURIC(char c)
a-z, A-Z, 0-9, any of ;/?:@&=+$,-_.!~*'()%In addition, by special dispensation, we allow '\\', which we normalize to '/', and '|', which we normalize to ':', and '#' which is the fragment indicator.
FileGetter
also does these
normalizations dynamically.
public static boolean isURICs(String str)
str
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |