|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.creole.annic.lucene.PatternValidator
public class PatternValidator
Pattern Validator that given a position of first term, retrieves the entire pattern from the token stream. If it is not able to retrieve the entire pattern, the class reports it as an invalid pattern.
| Field Summary | |
|---|---|
private int |
AND
AND operator |
private int |
index
|
private int |
NOT
Negation operator |
private int |
OR
OR operator |
private int |
patLen
|
| Constructor Summary | |
|---|---|
PatternValidator()
|
|
| Method Summary | |
|---|---|
int |
getPatternLength()
Gets the length of the pattern. |
private boolean |
isEqual(Token tk,
Term term)
Checks whether two terms are equal. |
int |
validate(List<String> queryTokens,
List<Token> annotations,
int from,
QueryParser queryParser)
This method takes two parameters the actual query issued and annotations in which it checks if the annotations exist that are validating for the given query |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final int AND
private final int OR
private final int NOT
private int index
private int patLen
| Constructor Detail |
|---|
public PatternValidator()
| Method Detail |
|---|
public int getPatternLength()
public int validate(List<String> queryTokens,
List<Token> annotations,
int from,
QueryParser queryParser)
throws SearchException
query - Stringannotations - ArrayList
SearchException
private boolean isEqual(Token tk,
Term term)
tk - term -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||