Package org.moeaframework.analysis.store
Class DataStoreURI
java.lang.Object
org.moeaframework.analysis.store.DataStoreURI
- All Implemented Interfaces:
Displayable
URI referencing a
DataStore
or its contents.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
display
(PrintStream out) Displays the contents of this object to the given output stream.boolean
getName()
Returns the blob name specified in the URI.getPath()
Returns the path component of the URI.Returns the reference specified by the URI.Returns the scheme component of the URI, defaulting to "file" if not specified.Returns the server component of the URI.getURI()
Returns the original URI.int
hashCode()
static DataStoreURI
Parses the given string as a URI.static DataStoreURI
Converts the given URI into a data store URI.static URI
Resolves the URI for the given blob.static URI
Resolves the URI for the given container.static URI
resolvePath
(Path path) Resolves the URI for the given local path.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.moeaframework.util.format.Displayable
display
-
Field Details
-
NAME_PARAMETER
The query parameter used to identify the blob name.- See Also:
-
FILE_SCHEME
The file scheme string constant.- See Also:
-
-
Method Details
-
getURI
Returns the original URI.- Returns:
- the URI
-
getScheme
Returns the scheme component of the URI, defaulting to "file" if not specified.- Returns:
- the scheme
-
getServer
Returns the server component of the URI. For "file" URIs, this returnsnull
. Otherwise, it contains the user info, host, and port.- Returns:
- the server component
-
getPath
Returns the path component of the URI. An empty string is returned if no path is specified.- Returns:
- the path
-
getReference
Returns the reference specified by the URI.- Returns:
- the reference
-
getName
Returns the blob name specified in the URI. This can be defined inURI.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
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 interfaceDisplayable
- Parameters:
out
- the output stream
-
toString
-
hashCode
public int hashCode() -
equals
-
parse
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
Converts the given URI into a data store URI.- Parameters:
uri
- the URI- Returns:
- the data store URI
-
resolve
Resolves the URI for the given container.- Parameters:
container
- the container- Returns:
- the URI
-
resolve
Resolves the URI for the given blob.- Parameters:
blob
- the blob- Returns:
- the URI
-
resolvePath
Resolves the URI for the given local path.- Parameters:
path
- the path- Returns:
- the URI
-