org.jafer.query.converter
Class CQLQueryConverter

java.lang.Object
  extended by org.jafer.query.converter.Converter
      extended by org.jafer.query.converter.CQLQueryConverter

public class CQLQueryConverter
extends Converter


Field Summary
private static org.z3950.zing.cql.CQLParser cqlParser
          Stores a reference to the CQLParser object
 
Constructor Summary
CQLQueryConverter()
           
 
Method Summary
static org.w3c.dom.Node convertCQLtoXCQL(java.lang.String cql)
          This method converts a CQL query to XCQL
static org.w3c.dom.Node convertJaferToXCQL(JaferQuery jaferQuery)
          This method converts a jafer query to the CQL format
static java.lang.String convertXCQLtoCQL(CQLQuery xcql)
          This method converts an XCQL query to the straight CQL
static JaferQuery convertXCQLToJafer(CQLQuery cqlQuery)
          This method converts a cql query to the JaferQuery format
 
Methods inherited from class org.jafer.query.converter.Converter
findNotChild, getFirstChild, getNodeValue, getSecondChild, selectNode, selectNodeList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cqlParser

private static org.z3950.zing.cql.CQLParser cqlParser
Stores a reference to the CQLParser object

Constructor Detail

CQLQueryConverter

public CQLQueryConverter()
Method Detail

convertXCQLToJafer

public static JaferQuery convertXCQLToJafer(CQLQuery cqlQuery)
                                     throws QueryException
This method converts a cql query to the JaferQuery format

Parameters:
cqlQuery - The cql query object
Returns:
the constructed jafer query
Throws:
QueryException

convertJaferToXCQL

public static org.w3c.dom.Node convertJaferToXCQL(JaferQuery jaferQuery)
                                           throws QueryException
This method converts a jafer query to the CQL format

Parameters:
jaferQuery - TThe jafer query to convert
Returns:
the constructed cql query
Throws:
QueryException

convertXCQLtoCQL

public static java.lang.String convertXCQLtoCQL(CQLQuery xcql)
                                         throws QueryException
This method converts an XCQL query to the straight CQL

Parameters:
xcql - The root node
Returns:
The CQL text
Throws:
QueryException

convertCQLtoXCQL

public static org.w3c.dom.Node convertCQLtoXCQL(java.lang.String cql)
                                         throws QueryException
This method converts a CQL query to XCQL

Parameters:
cql - The cql querey to convert
Returns:
The root node
Throws:
QueryException