|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.macro.query.SimpleSearchQueryParser
public final class SimpleSearchQueryParser
Parses Strings into SearchQuery implementations
according to the SearchQueryInterpreter provided at construction
time and returns a BooleanQueryFactory.
Strings are split into tokens separated by commas or whitespace. They
are inserted into a BooleanQueryFactory based on the token
preceding them, which are InclusionCriteria implementations.
| Constructor Summary | |
|---|---|
SimpleSearchQueryParser(SearchQueryInterpreter interpreter)
Constructs a new parser using the specified SearchQueryInterpreter to transform string tokens into
SearchQuery implementations. |
|
SimpleSearchQueryParser(SearchQueryInterpreter interpreter,
InclusionCriteria defaultInclusionCriteria)
Constructs a new parser using the specified SearchQueryInterpreter to transform string tokens into
SearchQuery implementations and using the specified
InclusionCriteria as the default criteria
for untagged tokens. |
|
| Method Summary | |
|---|---|
BooleanQueryFactory |
parse(String query)
Parses the specified String into a
BooleanQueryFactory implementation according to the rules
specified by the SearchQueryInterpreter. |
void |
setDefaultInclusionCriteria(InclusionCriteria criteria)
Sets which InclusionCriteria should be applied to a value
in the absence of a specific token. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleSearchQueryParser(SearchQueryInterpreter interpreter)
SearchQueryInterpreter to transform string tokens into
SearchQuery implementations. The default
InclusionCriteria is ANY.
interpreter - the SearchQueryInterpreter
implementation to use
public SimpleSearchQueryParser(SearchQueryInterpreter interpreter,
InclusionCriteria defaultInclusionCriteria)
SearchQueryInterpreter to transform string tokens into
SearchQuery implementations and using the specified
InclusionCriteria as the default criteria
for untagged tokens.
interpreter - the SearchQueryInterpreter
implementation to usedefaultInclusionCriteria - the default
InclusionCriteria for untagged tokens| Method Detail |
|---|
public void setDefaultInclusionCriteria(InclusionCriteria criteria)
InclusionCriteria should be applied to a value
in the absence of a specific token.
criteria - the default InclusionCriteria value to use
public BooleanQueryFactory parse(String query)
throws SearchQueryParserException
String into a
BooleanQueryFactory implementation according to the rules
specified by the SearchQueryInterpreter.
query - the String to parse
BooleanQueryFactory corresponding to the String
SearchQueryParserException - if an error occurs during parsing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||