| java.lang.Object org.apache.cocoon.matching.helpers.WildcardURIMatcher
WildcardURIMatcher | public class WildcardURIMatcher (Code) | | This class is an utility class that perform wilcard-patterns matching and
isolation.
author: Pierpaolo Fumagalli author: (Apache Software Foundation) author: Giacomo Pati author: Stefano Mazzocchi version: CVS $Id: WildcardURIMatcher.java 433543 2006-08-22 06:22:54Z crossley $ |
Field Summary | |
final protected static int | MATCH_BEGIN The int representing begin in the pattern int [] . | final protected static int | MATCH_END The int value that terminates the pattern int [] . | final protected static int | MATCH_FILE The int representing '*' in the pattern int [] . | final protected static int | MATCH_PATH The int representing '**' in the pattern int [] . | final protected static int | MATCH_THEEND The int representing end in pattern int [] . |
Method Summary | |
protected static int | indexOfArray(int r, int rpos, int rend, char d, int dpos) Get the offset of a part of an int array within a char array.
This method return the index in d of the first occurrence after dpos of
that part of array specified by r, starting at rpos and terminating at
rend.
Parameters: r - The array containing the data that need to be matched in d. Parameters: rpos - The index of the first character in r to look for. Parameters: rend - The index of the last character in r to look for plus 1. Parameters: d - The array of char that should contain a part of r. Parameters: dpos - The starting offset in d for the matching. | protected static int | lastIndexOfArray(int r, int rpos, int rend, char d, int dpos) Get the offset of a last occurance of an int array within a char array.
This method return the index in d of the last occurrence after dpos of
that part of array specified by r, starting at rpos and terminating at
rend.
Parameters: r - The array containing the data that need to be matched in d. Parameters: rpos - The index of the first character in r to look for. Parameters: rend - The index of the last character in r to look for plus 1. Parameters: d - The array of char that should contain a part of r. Parameters: dpos - The starting offset in d for the matching. | public static boolean | match(HashMap map, String data, int[] expr) match a pattern agains a string and isolates wildcard replacement into a
Stack . | protected static boolean | matchArray(int r, int rpos, int rend, char d, int dpos) Matches elements of array r from rpos to rend with array d, starting from dpos.
This method return true if elements of array r from rpos to rend
equals elements of array d starting from dpos to dpos+(rend-rpos).
Parameters: r - The array containing the data that need to be matched in d. Parameters: rpos - The index of the first character in r to look for. Parameters: d - The array of char that should start from a part of r. Parameters: dpos - The starting offset in d for the matching. |
MATCH_BEGIN | final protected static int MATCH_BEGIN(Code) | | The int representing begin in the pattern int [] .
|
MATCH_END | final protected static int MATCH_END(Code) | | The int value that terminates the pattern int [] .
|
MATCH_FILE | final protected static int MATCH_FILE(Code) | | The int representing '*' in the pattern int [] .
|
MATCH_PATH | final protected static int MATCH_PATH(Code) | | The int representing '**' in the pattern int [] .
|
MATCH_THEEND | final protected static int MATCH_THEEND(Code) | | The int representing end in pattern int [] .
|
indexOfArray | protected static int indexOfArray(int r, int rpos, int rend, char d, int dpos)(Code) | | Get the offset of a part of an int array within a char array.
This method return the index in d of the first occurrence after dpos of
that part of array specified by r, starting at rpos and terminating at
rend.
Parameters: r - The array containing the data that need to be matched in d. Parameters: rpos - The index of the first character in r to look for. Parameters: rend - The index of the last character in r to look for plus 1. Parameters: d - The array of char that should contain a part of r. Parameters: dpos - The starting offset in d for the matching. The offset in d of the part of r matched in d or -1 if that wasnot found. |
lastIndexOfArray | protected static int lastIndexOfArray(int r, int rpos, int rend, char d, int dpos)(Code) | | Get the offset of a last occurance of an int array within a char array.
This method return the index in d of the last occurrence after dpos of
that part of array specified by r, starting at rpos and terminating at
rend.
Parameters: r - The array containing the data that need to be matched in d. Parameters: rpos - The index of the first character in r to look for. Parameters: rend - The index of the last character in r to look for plus 1. Parameters: d - The array of char that should contain a part of r. Parameters: dpos - The starting offset in d for the matching. The offset in d of the last part of r matched in d or -1 if that wasnot found. |
matchArray | protected static boolean matchArray(int r, int rpos, int rend, char d, int dpos)(Code) | | Matches elements of array r from rpos to rend with array d, starting from dpos.
This method return true if elements of array r from rpos to rend
equals elements of array d starting from dpos to dpos+(rend-rpos).
Parameters: r - The array containing the data that need to be matched in d. Parameters: rpos - The index of the first character in r to look for. Parameters: d - The array of char that should start from a part of r. Parameters: dpos - The starting offset in d for the matching. true if array d starts from portion of array r. |
|
|