public final class SwiftObjectPath extends Object
Constructor and Description |
---|
SwiftObjectPath(String container,
String object)
Build an instance from a (host, object) pair
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static SwiftObjectPath |
fromPath(URI uri,
org.apache.hadoop.fs.Path path)
Create a path tuple of (container, path), where the container is
chosen from the host of the URI.
|
static SwiftObjectPath |
fromPath(URI uri,
org.apache.hadoop.fs.Path path,
boolean addTrailingSlash)
Create a path tuple of (container, path), where the container is
chosen from the host of the URI.
|
String |
getContainer() |
String |
getObject() |
int |
hashCode() |
boolean |
isEqualToOrParentOf(SwiftObjectPath possibleChild)
Query to see if the possibleChild object is a child path of this.
|
boolean |
objectMatches(String path)
Test for the object matching a path, ignoring the container
value.
|
String |
toString() |
String |
toUriPath() |
public String getContainer()
public String getObject()
public String toUriPath()
public boolean objectMatches(String path)
path
- path stringpublic boolean isEqualToOrParentOf(SwiftObjectPath possibleChild)
possibleChild
- possible child dirpublic static SwiftObjectPath fromPath(URI uri, org.apache.hadoop.fs.Path path) throws SwiftConfigurationException
uri
- uri to start frompath
- path underneathSwiftConfigurationException
- if the URI host doesn't parse into
container.servicepublic static SwiftObjectPath fromPath(URI uri, org.apache.hadoop.fs.Path path, boolean addTrailingSlash) throws SwiftConfigurationException
Path
instance, Path.normalizePath(String, String)
is called
-which strips off any trailing slash.uri
- uri to start frompath
- path underneathaddTrailingSlash
- should a trailing slash be added if there isn't one.SwiftConfigurationException
- if the URI host doesn't parse into
container.serviceCopyright © 2015 Apache Software Foundation. All Rights Reserved.