public class Keying extends Object
TODO: Add createSchemeless key, a key that doesn't care if scheme is http or https.
Bytes#split(byte[], byte[], int)| Modifier and Type | Field and Description |
|---|---|
static String |
DOMAIN_NAME_DELIMITER |
static String |
REFERER_URL_SCHEME |
| Constructor and Description |
|---|
Keying() |
| Modifier and Type | Method and Description |
|---|---|
static String |
createKey(String u,
String scheme)
Makes a key out of passed URI for use as row name or column qualifier.
|
static String |
keyToUri(String s,
String scheme)
Reverse the
#createKey(String) transform. |
static String |
reverseHostname(String hostname) |
public static final String REFERER_URL_SCHEME
public static final String DOMAIN_NAME_DELIMITER
public static String createKey(String u, String scheme)
host portion of the URI
authority is reversed so subdomains sort under their parent domain. The
returned String is an opaque URI of an artificial r: scheme
to prevent the result being considered an URI of the original scheme.
Here is an example of the transform: The url
http://lucene.apache.org/index.html?query=something#middle is
returned as
r:http://org.apache.lucene/index.html?query=something#middle
The transforms are reversible. No transform is done if passed URI is not
hierarchical.
If authority userinfo is present, will mess up the sort
(until we do more work).
u - URL to transform.#keyToUri(String),
RFC2396public static String keyToUri(String s, String scheme)
#createKey(String) transform.s - URI made by #createKey(String).#createKey(String)
transform.Copyright © 2007–2014. All rights reserved.