Class UriToPathUtils

java.lang.Object
org.aksw.commons.io.util.UriToPathUtils

public class UriToPathUtils extends Object
  • Constructor Details

    • UriToPathUtils

      public UriToPathUtils()
  • Method Details

    • toPathSegments

      public static String[] toPathSegments(URI uri)
    • toPathSegments

      public static String[] toPathSegments(String uri)
    • javaifyHostnameSegments

      public static String[] javaifyHostnameSegments(String hostName)
      Convert a host name to a java package name. Splits the given argument string by '.', then reverses the order and joins the strings using '/'. For example, subdomain.example.org becomes org/example/subdomain
      Parameters:
      hostName -
      Returns:
    • javaifyHostname

      public static String javaifyHostname(String hostName)
    • resolvePath

      @Deprecated public static Path resolvePath(URI uri)
      Deprecated.
      Default mapping of URIs to relative paths The scheme is omitted. scheme://host:port/path?query becomes host/port/path/query
      Parameters:
      uri -
      Returns:
    • resolvePath

      @Deprecated public static Path resolvePath(String uri)
      Deprecated.
      Attempt to parse the argument as a URI and convert it to a Path. If parsing as URI fails for any reason then the result is the URL encoded argument instead.
      Parameters:
      uri -
      Returns: