Package alluxio.uri
Class URI.Factory
- java.lang.Object
-
- alluxio.uri.URI.Factory
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static URI
create(URI parent, URI child)
static URI
create(URI baseUri, java.lang.String newPath, boolean checkNormalization)
static URI
create(java.lang.String uriStr)
Creates aURI
from a string.static URI
create(java.lang.String scheme, Authority authority, java.lang.String path, java.lang.String query)
Creates aURI
from components.static Pair<java.lang.String,java.lang.String>
getSchemeComponents(java.lang.String scheme)
Returns aPair
of components of the given scheme.
-
-
-
Method Detail
-
create
public static URI create(java.lang.String scheme, Authority authority, java.lang.String path, java.lang.String query)
Creates aURI
from components.- Parameters:
scheme
- the scheme string of the URIauthority
- the authority of the URIpath
- the path component of the URIquery
- the query component of the URI- Returns:
- the created
URI
-
create
public static URI create(URI parent, URI child)
- Parameters:
parent
- the parentchild
- the child- Returns:
- the created
URI
-
create
public static URI create(URI baseUri, java.lang.String newPath, boolean checkNormalization)
- Parameters:
baseUri
- the base URInewPath
- the new path componentcheckNormalization
- if true, will check if the path requires normalization- Returns:
- a new URI based off a URI and a new path component
-
getSchemeComponents
public static Pair<java.lang.String,java.lang.String> getSchemeComponents(java.lang.String scheme)
Returns aPair
of components of the given scheme. A given scheme may have have two components if it has the ':' character to specify a sub-protocol of the scheme. If the scheme does not have multiple components, the first component will be the empty string, and the second component will be the given scheme. If the given scheme is null, both components in thePair
will be null.- Parameters:
scheme
- the scheme string- Returns:
- a
Pair
with the scheme components
-
-