|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.retrieval.parser.Transformer
public abstract class Transformer
This class transforms the output of JavaCC into a tree of query elements that the query evaluator can understand. It's more than meets the eye.
Constructor Summary | |
---|---|
Transformer()
|
Method Summary | |
---|---|
static boolean |
isDoubleQuoted(java.lang.String str)
Determines if a string is double quoted, that is, it begins and ends with a " character. |
static boolean |
isQuoted(java.lang.String str)
Determines if a string is a quoted string. |
static boolean |
isSingleQuoted(java.lang.String str)
Determines if a string is single quoted, that is, it begins and ends with a ' character. |
abstract QueryElement |
transformTree(SimpleNode root)
Transforms an abstract syntax tree provided by JJTree+JavaCC into a tree of QueryElements that can be used by the query evaluator. |
abstract QueryElement |
transformTree(SimpleNode root,
int defaultOperator)
Transforms an abstract syntax tree provided by JJTree+JavaCC into a tree of QueryElements that can be used by the query evaluator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Transformer()
Method Detail |
---|
public abstract QueryElement transformTree(SimpleNode root) throws java.text.ParseException
root
- the root node of the tree returned from the Parser
java.text.ParseException
public abstract QueryElement transformTree(SimpleNode root, int defaultOperator) throws java.text.ParseException
root
- the root node of the tree returned from the ParserdefaultOperator
- specified the default operator to use when no
other operator is provided between terms in the query. Valid values are
defined in the Searcher
interface
java.text.ParseException
public static boolean isQuoted(java.lang.String str)
str
- the string to check
public static boolean isDoubleQuoted(java.lang.String str)
str
- the string to check
public static boolean isSingleQuoted(java.lang.String str)
str
- the string to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |