public class ObjectPath extends java.lang.Object implements ObjectIdentifier
Constructor and Description |
---|
ObjectPath(ObjectPath parent,
DirectoryEntry directoryEntry)
Constructs a new path from a parent directory and (what is assumed to be) one of its directory entries.
|
ObjectPath(ObjectPath parent,
java.lang.String path)
Constructs a new path underneath a parent directory.
|
ObjectPath(java.lang.String path) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getFilename()
Convenience method to return the filename of this path (the last token delimited by a slash)
|
java.lang.String |
getPath() |
java.lang.String |
getRelativeResourcePath()
Returns the service-relative resource path for this identifier (i.e.
|
int |
hashCode() |
boolean |
isDirectory()
Convenience method to determine whether this path represents a directory in Atmos.
|
java.lang.String |
toString() |
public ObjectPath(java.lang.String path)
public ObjectPath(ObjectPath parent, java.lang.String path)
parent
- The parent directory under which this new path exists (must end with a slash).path
- The relative path to this object under the parent directory (may begin with a slash, but it will
be ignored).public ObjectPath(ObjectPath parent, DirectoryEntry directoryEntry)
parent
- The parent directory under which this new path exists (must end with a slash).directoryEntry
- A directory entry of an object (presumed to be under the parent path)public java.lang.String getPath()
public java.lang.String getRelativeResourcePath()
ObjectIdentifier
getRelativeResourcePath
in interface ObjectIdentifier
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isDirectory()
public java.lang.String getFilename()