org.basex.query
Class QueryProcessor

java.lang.Object
  extended by org.basex.core.Progress
      extended by org.basex.query.QueryProcessor
Direct Known Subclasses:
XPathProcessor, XQueryProcessor

public abstract class QueryProcessor
extends Progress

This abstract class contains various methods which allow querying in the database. A variety of hierarchical parsers (XPath, XQuery, etc..) can be implemented on top of this class.

Author:
Workgroup DBIS, University of Konstanz 2005-08, ISC License, Christian Gruen

Field Summary
 java.lang.String query
          Initial node set.
 
Constructor Summary
QueryProcessor(java.lang.String q)
          Default Constructor.
 
Method Summary
 void compile(Nodes nodes)
          Compiles the query.
 java.lang.String det()
          Returns short information on this process.
 java.lang.String getInfo()
          Returns query background information.
 void parse()
          Parses the specified query.
 double prog()
          Returns progress information.
 Result query(Nodes n)
          Parses the specified query and returns the result.
 Nodes queryNodes(Nodes nodes)
          Parses the specified query and returns the result nodes.
 java.lang.String tit()
          Returns short information on this process.
 
Methods inherited from class org.basex.core.Progress
checkStop, detail, progress, progress, stop, title
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

query

public java.lang.String query
Initial node set.

Constructor Detail

QueryProcessor

public QueryProcessor(java.lang.String q)
Default Constructor.

Parameters:
q - query
Method Detail

parse

public void parse()
           throws QueryException
Parses the specified query.

Throws:
QueryException - query exception

compile

public final void compile(Nodes nodes)
                   throws QueryException
Compiles the query.

Parameters:
nodes - node context
Throws:
QueryException - query exception

queryNodes

public final Nodes queryNodes(Nodes nodes)
                       throws QueryException
Parses the specified query and returns the result nodes.

Parameters:
nodes - node context
Returns:
result of query
Throws:
QueryException - query exception

query

public final Result query(Nodes n)
                   throws QueryException
Parses the specified query and returns the result.

Parameters:
n - node context
Returns:
result of query
Throws:
QueryException - query exception

getInfo

public final java.lang.String getInfo()
Returns query background information.

Returns:
background information

tit

public final java.lang.String tit()
Description copied from class: Progress
Returns short information on this process. Can be overwritten to give more detailed information.

Returns:
header information

det

public final java.lang.String det()
Description copied from class: Progress
Returns short information on this process.

Overrides:
det in class Progress
Returns:
header information

prog

public final double prog()
Description copied from class: Progress
Returns progress information. Can be overwritten to give more detailed information.

Overrides:
prog in class Progress
Returns:
header information