|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.wildcat.hierarchy.Path
public class Path
A path in the wildcat hierarchy. Path have the form of url.
| Field Summary | |
|---|---|
static Path |
NULL
Constant Path for null:// |
static Path |
ROOT
Constant Path for /. |
| Constructor Summary | |
|---|---|
Path(Path path)
Deep copy constructor |
|
Path(java.lang.String path)
Convenient constructors. |
|
| Method Summary | |
|---|---|
Path |
append(Path suffix)
Creates a new Path by appending suffix to 'this'. |
Path |
appendAttribute(java.lang.String name)
Creates a new path by appending 'name' as attribute name to current path assumes 'name' to be a valid attribute name |
Path |
appendResource(java.lang.String name)
Creates a new path by appending 'name' as resource to current path |
Path |
canonicalize()
Canonicalize current path |
boolean |
equals(java.lang.Object object)
|
void |
expectAbsolute()
Does nothing. |
void |
expectAttribute()
Does nothing |
void |
expectCanonical()
Does nothing. |
void |
expectFinite()
Does nothing. |
void |
expectRelative()
Does nothing. |
void |
expectResource()
Does nothing. |
java.lang.String |
getAttributeName()
|
java.lang.String |
getFirstResource()
|
java.lang.String |
getHostname()
|
Path |
getParentPath()
|
Path |
getRelativePart()
Creates a new path by stripping host and starting '/'. |
boolean |
hasAttribute()
|
boolean |
hasExplicitHost()
|
int |
hashCode()
|
boolean |
hasResource()
|
boolean |
isAbsolute()
|
boolean |
isCanonical()
Tests if path is canonical. |
boolean |
isOnlyAttribute()
|
boolean |
isOnlyResource()
|
boolean |
isPattern()
Tests if path contain pattern elements. |
boolean |
isPrefix(Path prefix)
Test whether argument is a prefix of current path. |
static boolean |
isValidAttributeName(java.lang.String attributeName)
|
static boolean |
isValidHostname(java.lang.String hostname)
|
static boolean |
isValidResourceName(java.lang.String resourceName)
|
Path |
replacePrefix(Path oprefix,
Path nprefix)
Partially rewrite current path, changing oprefix in 'this' to nprefix. |
void |
setHostName(java.lang.String hostname)
|
Path |
stripTop()
Creates a new path by stripping the first resource as attribute name to current path. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Path ROOT
public static final Path NULL
| Constructor Detail |
|---|
public Path(java.lang.String path)
throws MalformedPathException
path -
MalformedPathException - if the path is malformedpublic Path(Path path)
path - | Method Detail |
|---|
public Path appendResource(java.lang.String name)
name -
public Path appendAttribute(java.lang.String name)
name -
public Path append(Path suffix)
suffix - suffix to append
public Path replacePrefix(Path oprefix,
Path nprefix)
oprefix - the prefix of current path to deletenprefix - the new prefix
public Path getParentPath()
public Path canonicalize()
public Path stripTop()
public Path getRelativePart()
public java.lang.String getHostname()
public void setHostName(java.lang.String hostname)
public java.lang.String getAttributeName()
public java.lang.String getFirstResource()
public boolean isAbsolute()
public boolean hasExplicitHost()
public boolean hasAttribute()
public boolean hasResource()
public boolean isOnlyAttribute()
public boolean isOnlyResource()
public boolean isCanonical()
public boolean isPattern()
public boolean isPrefix(Path prefix)
prefix -
public static boolean isValidHostname(java.lang.String hostname)
hostname -
public static boolean isValidResourceName(java.lang.String resourceName)
resourceName -
public static boolean isValidAttributeName(java.lang.String attributeName)
attributeName -
public void expectCanonical()
throws MalformedPathException
MalformedPathException - if path is not canonical
public void expectFinite()
throws MalformedPathException
MalformedPathException - if path is a pattern
public void expectAbsolute()
throws MalformedPathException
MalformedPathException - if path is not absolute
public void expectRelative()
throws MalformedPathException
MalformedPathException - if path is not relative
public void expectResource()
throws MalformedPathException
MalformedPathException - if path denotes an attribute
public void expectAttribute()
throws MalformedPathException
MalformedPathException - if path not denotes an attributepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||