public String getComponent(String request) {
NamedMatch nm = (NamedMatch) stack.elementAt(0);
// If this is what we're looking for return text.
String currentMatchName = nm.getName();
Vector currentMatchSubParts = (Vector) ht.get(currentMatchName);
Match match = nm.getMatch();
if (!request.startsWith("$")) {
request = "$" + request;
}
if (currentMatchName.equals(request)) {
return match.getCapturedText(0);
}
// if ( basicParts.indexOf(currentMatchName) >= 0 ){
// return null;
// }
//Search inside
int i;
for (i = 0; i < match.getNumberOfGroups()-1; i++) {
String str = match.getCapturedText(i+1);
if (str == null) {
continue;
}
// next is $name
String ithSubMatchName = (String) currentMatchSubParts.elementAt(i);
Match m = new Match();
RegularExpression re = (RegularExpression) ht.get(ithSubMatchName + "RE");
if (re == null) {
continue;
}
if (!re.matches(str, m)) {