|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.weborganic.furi.URITemplate
org.weborganic.furi.URIPattern
public class URIPattern
A URI Pattern for matching URI following the same regular structure.
Instances of this class implement the PageSeeder URL pattern as defined by the "PageSeeder URI Templates" document.
A PageSeeder URI Pattern follows the URI syntax defined for URI templates but must only contain matchable tokens.
Constructor Summary | |
---|---|
URIPattern(String template)
Creates a new URI Pattern instance from the specified URI template string. |
|
URIPattern(URITemplate template)
Creates a new URI Pattern instance from an existing URI Template. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
int |
hashCode()
|
static boolean |
isMatchable(URITemplate template)
Indicates whether the given URI template can be used to construct a new URI Pattern instance. |
boolean |
match(String uri)
Indicates whether this URI Pattern matches the specified URL. |
Pattern |
pattern()
Returns the regular expression pattern corresponding to this URI pattern. |
Methods inherited from class org.weborganic.furi.URITemplate |
---|
digest, digest, expand, expand, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public URIPattern(String template) throws IllegalArgumentException
template
- The string following the URI template syntax.
URITemplateSyntaxException
- If the string provided does not follow the proper syntax.
IllegalArgumentException
public URIPattern(URITemplate template) throws IllegalArgumentException
template
- The URI template to generate the pattern from.
URITemplateSyntaxException
- If the string provided does not follow the proper syntax.
IllegalArgumentException
Method Detail |
---|
public static boolean isMatchable(URITemplate template)
A template is matchable only if all its components are matchable tokens, that is the token
implements the Matchable
interface.
template
- The template to test.
true
if the template is matchable; false
otherwise.public boolean match(String uri)
match
in interface Matchable
uri
- The URI to test.
true
if this URI Pattern matches thispublic Pattern pattern()
pattern
in interface Matchable
public boolean equals(Object o)
equals
in class URITemplate
public int hashCode()
hashCode
in class URITemplate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |