Package alluxio.uri

Class URI.Factory

  • Enclosing interface:
    URI

    public static class URI.Factory
    extends java.lang.Object
    Factory for URI.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static URI create​(URI parent, URI child)
      Resolves a child URI against a parent URI.
      static URI create​(URI baseUri, java.lang.String newPath, boolean checkNormalization)  
      static URI create​(java.lang.String uriStr)
      Creates a URI from a string.
      static URI create​(java.lang.String scheme, Authority authority, java.lang.String path, java.lang.String query)
      Creates a URI from components.
      static Pair<java.lang.String,​java.lang.String> getSchemeComponents​(java.lang.String scheme)
      Returns a Pair of components of the given scheme.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static URI create​(java.lang.String uriStr)
        Creates a URI from a string.
        Parameters:
        uriStr - URI string to create the URI from
        Returns:
        the created URI
      • create

        public static URI create​(java.lang.String scheme,
                                 Authority authority,
                                 java.lang.String path,
                                 java.lang.String query)
        Creates a URI from components.
        Parameters:
        scheme - the scheme string of the URI
        authority - the authority of the URI
        path - the path component of the URI
        query - the query component of the URI
        Returns:
        the created URI
      • create

        public static URI create​(URI parent,
                                 URI child)
        Resolves a child URI against a parent URI.
        Parameters:
        parent - the parent
        child - the child
        Returns:
        the created URI
      • create

        public static URI create​(URI baseUri,
                                 java.lang.String newPath,
                                 boolean checkNormalization)
        Parameters:
        baseUri - the base URI
        newPath - the new path component
        checkNormalization - 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 a Pair 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 the Pair will be null.
        Parameters:
        scheme - the scheme string
        Returns:
        a Pair with the scheme components