org.eml.MMAX2.annotation.query
Class MMAX2ComplexQueryTerm

java.lang.Object
  extended by org.eml.MMAX2.annotation.query.MMAX2ComplexQueryTerm

public class MMAX2ComplexQueryTerm
extends java.lang.Object


Constructor Summary
MMAX2ComplexQueryTerm(java.lang.String _queryString, MarkableLevel _level, int _from, int _to, boolean _negated)
          Creates new MMAX2ComplexQueryTerm
 
Method Summary
 void dumpTree(int depth)
           
 java.util.ArrayList execute()
          This method recursively executes the query specified in this complex query term.
 int getConnector()
           
 int getEndsAt()
           
 int getMatchingBracketPosition(int startposition, java.lang.String openingBracket, java.lang.String closingBracket)
           
 MMAX2AtomicQueryTerm getNextAtomicTerm(int from, int to)
           
 MMAX2TermConnector getNextConnector(int from)
           
 int parseQueryString(int from, int to)
          This method receives zero-based indices of the first and last character to consider.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MMAX2ComplexQueryTerm

public MMAX2ComplexQueryTerm(java.lang.String _queryString,
                             MarkableLevel _level,
                             int _from,
                             int _to,
                             boolean _negated)
                      throws MMAX2QueryException
Creates new MMAX2ComplexQueryTerm

Throws:
MMAX2QueryException
Method Detail

execute

public final java.util.ArrayList execute()
This method recursively executes the query specified in this complex query term. It returns an ArrayList of all matching Markables.


parseQueryString

public final int parseQueryString(int from,
                                  int to)
                           throws java.lang.StringIndexOutOfBoundsException,
                                  MMAX2QueryException
This method receives zero-based indices of the first and last character to consider. It returns the end index of the last term parsed. From and to have been moved to non-ws-positions when this method is called.

Throws:
java.lang.StringIndexOutOfBoundsException
MMAX2QueryException

getNextAtomicTerm

public final MMAX2AtomicQueryTerm getNextAtomicTerm(int from,
                                                    int to)
                                             throws MMAX2QueryException
Throws:
MMAX2QueryException

getMatchingBracketPosition

public int getMatchingBracketPosition(int startposition,
                                      java.lang.String openingBracket,
                                      java.lang.String closingBracket)

getEndsAt

public final int getEndsAt()

getConnector

public final int getConnector()

getNextConnector

public final MMAX2TermConnector getNextConnector(int from)

dumpTree

public final void dumpTree(int depth)