org.d2rq.mapgen
Class IRIEncoder
java.lang.Object
org.d2rq.mapgen.IRIEncoder
public class IRIEncoder
- extends Object
Method Summary |
static String |
encode(String s)
%-encodes every character that is not in the
iunreserved production of RFC 3987. |
static boolean |
isAllowedInIRI(char c)
Returns false if c cannot occur in an IRI (in unescaped form) |
static boolean |
isSafeSeparator(String s)
Checks if a string is a safe separator for IRI templates. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IRIEncoder
public IRIEncoder()
encode
public static String encode(String s)
- %-encodes every character that is not in the
iunreserved production of RFC 3987.
Behaviour for Unicode surrogates and Unicode
non-characters is undefined.
isSafeSeparator
public static boolean isSafeSeparator(String s)
- Checks if a string is a safe separator for IRI templates. This is
the case if it contains any single character that is legal in an IRI,
but percent-encoded in the IRI-safe version of a data value.
This includes in particular the eleven sub-delim characters
defined in [RFC3987]: !$&'()*+,;=
- See Also:
- R2RML: Safe separator
isAllowedInIRI
public static boolean isAllowedInIRI(char c)
- Returns false if c cannot occur in an IRI (in unescaped form)