public class R2RMLIRISafeEncoder extends Object
| Modifier and Type | Field and Description |
|---|---|
static it.unibz.inf.ontop.com.google.common.collect.ImmutableBiMap<String,Character> |
TABLE
This table is used for IRI safe encoding according to
|
| Constructor and Description |
|---|
R2RMLIRISafeEncoder() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decode(String encoded)
Given a string representing an IRI, this method will return a String
in which all percent encoded characters (e.g., %20) will
be restored to their original characters (e.g., ' ').
|
static String |
encode(String s) |
public static final it.unibz.inf.ontop.com.google.common.collect.ImmutableBiMap<String,Character> TABLE
The IRI-safe version of a string is obtained by applying the following transformation to any character that is not in the iunreserved production in [RFC3987]:
RFC 3987 2.2. ABNF for IRI References and IRIs
iunreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" / ucschar
ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
/ %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
/ %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
/ %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
/ %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
/ %xD0000-DFFFD / %xE1000-EFFFD
We only implement the encoding for the range of basic latin ( - ) for performance reason. Other symbols outside of `iunreserved` are mostly control symbols.
Copyright © 2009–2021 Free University of Bozen-Bolzano. All rights reserved.