|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fatdog.xmlEngine.words.WordBreaker
com.fatdog.xmlEngine.FandO
Provides the low-level implementations for XQuery's built-in functions.
Field Summary |
Fields inherited from interface com.fatdog.xmlEngine.javacc.XQueryParserTreeConstants |
JJTAND, JJTATTRIBUTE, JJTATTRIBUTECONTENT, JJTCHARDATA, JJTCHARREF, JJTCONTENT, JJTDEFAULTNAMESPACEDECL, JJTDOT, JJTEMPTYTAG, JJTENCLOSEDEXPR, JJTEVERY, JJTFILTER, JJTFLWOR, JJTFOR, JJTFORLET, JJTFUNCTIONCALL, JJTGENERALCOMP, JJTIFTHENELSE, JJTINTEGERLIT, JJTLET, JJTNAMESPACEDECL, JJTNODECOMP, jjtNodeName, JJTNODETEST, JJTOR, JJTORDERBY, JJTORDERCOMP, JJTPARENS, JJTPARENT, JJTQIN, JJTQNAME, JJTRANGE, JJTRELPATH, JJTRETURN, JJTSEQ, JJTSLASHROOT, JJTSLASHSLASHROOT, JJTSOME, JJTSTARTNODE, JJTSTRINGLIT, JJTTAG, JJTTEXTTEST, JJTVALUECOMP, JJTVARIABLE, JJTVOID, JJTWHERE, JJTXMLSPACEPRESERVE, JJTXMLSPACESTRIP |
Constructor Summary | |
FandO(TreeWalker walker,
boolean debug)
|
Method Summary | |
ResultList |
contains_word(SimpleNode path,
SimpleNode wordsPlusFlag)
Return a sequence of nodes containing the word(s) of interest. |
ResultList |
dispatchNamedFunction(SimpleNode node,
java.lang.String name,
SimpleNode args)
The public FandO interface for built-in functions. |
void |
newWord(char[] word,
int wordStart,
int wordEnd,
int parent,
IntList ints)
Supply lists of word starts and lengths for the function contains-word(). |
Methods inherited from class com.fatdog.xmlEngine.words.WordBreaker |
characters, getIgnoreCase, getSearchWord, registerWordHandler, registerWordHandler, setIgnoreCase, setSearchWord, toLowerCase, toLowerCase |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FandO(TreeWalker walker, boolean debug)
Method Detail |
public ResultList dispatchNamedFunction(SimpleNode node, java.lang.String name, SimpleNode args) throws InvalidQueryException
FandO
interface for built-in functions.
InvalidQueryException
public ResultList contains_word(SimpleNode path, SimpleNode wordsPlusFlag) throws InvalidQueryException
NOTA: This is the low-level version of the contains-word() function, whose signature is :
true()
, the query
will be case-sensitive (the default is false()
).
The location path argument will be evaluated to a node sequence; each node
in the sequence will be inspected to see whether it contains the AND
ed
product of all word arguments, and returned as part of the resulting ResultList
if so.
The word arguments may contain embedded whitespace and/or punctuation, which the query engine will view as additional word separators. This provides three ways of specifying word arguments: as individual words, as concatenated groups of words separated by internal whitespace and/or punctuation, or as a combination of the two.
path
- Must evaluate to a legal XQuery location pathwordsPlusFlag
- One or more words (given here as a single SimpleNode root for the query subtree,
plus an optional caseIsSignificant flag).
InvalidQueryException
- If the argument list doesn't contain one or more words.public void newWord(char[] word, int wordStart, int wordEnd, int parent, IntList ints)
FandO
is a WordBreaker
; WordBreaker.characters()
calls this routine.
newWord
in interface IWordHandler
word
- A char[] array holding the word, possibly larger than the word itselfwordStart
- Starting offset of the word in the arraywordEnd
- Offset of the first character past the end of the wordparent
- Document id index of the node in which the word is foundints
- An optional IntList
you can pass indirectly to the routine
via WordBreaker.characters()
contains_word(SimpleNode,SimpleNode)
,
IndexManager
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |