Class DataStoreURI

java.lang.Object
org.moeaframework.analysis.store.DataStoreURI
All Implemented Interfaces:
Displayable

public class DataStoreURI extends Object implements Displayable
URI referencing a DataStore or its contents.
  • Field Details

  • Method Details

    • getURI

      public URI getURI()
      Returns the original URI.
      Returns:
      the URI
    • getScheme

      public String getScheme()
      Returns the scheme component of the URI, defaulting to "file" if not specified.
      Returns:
      the scheme
    • getServer

      public String getServer()
      Returns the server component of the URI. For "file" URIs, this returns null. Otherwise, it contains the user info, host, and port.
      Returns:
      the server component
    • getPath

      public Path getPath()
      Returns the path component of the URI. An empty string is returned if no path is specified.
      Returns:
      the path
    • getReference

      public Reference getReference()
      Returns the reference specified by the URI.
      Returns:
      the reference
    • getName

      public String getName()
      Returns the blob name specified in the URI. This can be defined in URI.getFragment() or using the "_name" query parameter. The latter is recommended as the fragment part is typically excluded from HTTP requests.
      Returns:
      the blob name, or null if not specified
    • display

      public void display(PrintStream out)
      Description copied from interface: Displayable
      Displays the contents of this object to the given output stream. This method does not close the underlying stream; the caller is responsible for disposing it.
      Specified by:
      display in interface Displayable
      Parameters:
      out - the output stream
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • parse

      public static DataStoreURI parse(String str)
      Parses the given string as a URI.
      Parameters:
      str - the string
      Returns:
      the URI
      Throws:
      IllegalArgumentException - if the string is not a valid URI
    • parse

      public static DataStoreURI parse(URI uri)
      Converts the given URI into a data store URI.
      Parameters:
      uri - the URI
      Returns:
      the data store URI
    • resolve

      public static URI resolve(Container container)
      Resolves the URI for the given container.
      Parameters:
      container - the container
      Returns:
      the URI
    • resolve

      public static URI resolve(Blob blob)
      Resolves the URI for the given blob.
      Parameters:
      blob - the blob
      Returns:
      the URI
    • resolvePath

      public static URI resolvePath(Path path)
      Resolves the URI for the given local path.
      Parameters:
      path - the path
      Returns:
      the URI