org.apache.cocoon.matching.helpers
Class WildcardURIMatcher

java.lang.Object
  extended by org.apache.cocoon.matching.helpers.WildcardURIMatcher

Deprecated. renamed to WildcardHelper

public class WildcardURIMatcher
extends Object

This class is an utility class that perform wilcard-patterns matching and isolation.

Version:
CVS $Id: WildcardURIMatcher.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Pierpaolo Fumagalli (Apache Software Foundation), Giacomo Pati, Stefano Mazzocchi

Field Summary
protected static int MATCH_BEGIN
          Deprecated. The int representing begin in the pattern int [].
protected static int MATCH_END
          Deprecated. The int value that terminates the pattern int [].
protected static int MATCH_FILE
          Deprecated. The int representing '*' in the pattern int [].
protected static int MATCH_PATH
          Deprecated. The int representing '**' in the pattern int [].
protected static int MATCH_THEEND
          Deprecated. The int representing end in pattern int [].
 
Constructor Summary
WildcardURIMatcher()
          Deprecated.  
 
Method Summary
protected static int indexOfArray(int[] r, int rpos, int rend, char[] d, int dpos)
          Deprecated. Get the offset of a part of an int array within a char array.
protected static int lastIndexOfArray(int[] r, int rpos, int rend, char[] d, int dpos)
          Deprecated. Get the offset of a last occurance of an int array within a char array.
static boolean match(HashMap map, String data, int[] expr)
          Deprecated. 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)
          Deprecated. Matches elements of array r from rpos to rend with array d, starting from dpos.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MATCH_FILE

protected static final int MATCH_FILE
Deprecated. 
The int representing '*' in the pattern int [].

See Also:
Constant Field Values

MATCH_PATH

protected static final int MATCH_PATH
Deprecated. 
The int representing '**' in the pattern int [].

See Also:
Constant Field Values

MATCH_BEGIN

protected static final int MATCH_BEGIN
Deprecated. 
The int representing begin in the pattern int [].

See Also:
Constant Field Values

MATCH_THEEND

protected static final int MATCH_THEEND
Deprecated. 
The int representing end in pattern int [].

See Also:
Constant Field Values

MATCH_END

protected static final int MATCH_END
Deprecated. 
The int value that terminates the pattern int [].

See Also:
Constant Field Values
Constructor Detail

WildcardURIMatcher

public WildcardURIMatcher()
Deprecated. 
Method Detail

match

public static boolean match(HashMap map,
                            String data,
                            int[] expr)
                     throws NullPointerException
Deprecated. 
match a pattern agains a string and isolates wildcard replacement into a Stack.

Throws:
NullPointerException

indexOfArray

protected static int indexOfArray(int[] r,
                                  int rpos,
                                  int rend,
                                  char[] d,
                                  int dpos)
Deprecated. 
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.
rpos - The index of the first character in r to look for.
rend - The index of the last character in r to look for plus 1.
d - The array of char that should contain a part of r.
dpos - The starting offset in d for the matching.
Returns:
The offset in d of the part of r matched in d or -1 if that was not found.

lastIndexOfArray

protected static int lastIndexOfArray(int[] r,
                                      int rpos,
                                      int rend,
                                      char[] d,
                                      int dpos)
Deprecated. 
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.
rpos - The index of the first character in r to look for.
rend - The index of the last character in r to look for plus 1.
d - The array of char that should contain a part of r.
dpos - The starting offset in d for the matching.
Returns:
The offset in d of the last part of r matched in d or -1 if that was not found.

matchArray

protected static boolean matchArray(int[] r,
                                    int rpos,
                                    int rend,
                                    char[] d,
                                    int dpos)
Deprecated. 
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.
rpos - The index of the first character in r to look for.
d - The array of char that should start from a part of r.
dpos - The starting offset in d for the matching.
Returns:
true if array d starts from portion of array r.


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.