Class CqlParser
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- edu.indiana.lib.twinpeaks.search.sru.CqlParser
-
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class CqlParser extends DefaultHandler
-
-
Constructor Summary
Constructors Constructor Description CqlParser()Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] buf, int offset, int len)Receive notification of character data inside an element.StringdoCQL2MetasearchCommand(String cqlSearchQuery)Converts a CQL-formatted search query into a format that 360 Search can understand.voidendElement(String namespaceURI, String sName, String qName)Receive notification of the end of an element.static voidmain(String[] args)Main(): testvoidstartElement(String namespaceURI, String sName, String qName, Attributes attrs)Receive notification of the beginning of an element.-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Method Detail
-
doCQL2MetasearchCommand
public String doCQL2MetasearchCommand(String cqlSearchQuery)
Converts a CQL-formatted search query into a format that 360 Search can understand. Uses org.z3950.zing.cql.CQLNode.toXCQL() and SAX Parsing to convert the cqlSearchQuery into an almost identical query parameter.- Parameters:
cqlSearchQuery- CQL-formatted search query.- Returns:
- A 360 Search query
-
startElement
public void startElement(String namespaceURI, String sName, String qName, Attributes attrs) throws SAXException
Receive notification of the beginning of an element.- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException- See Also:
DefaultHandler
-
endElement
public void endElement(String namespaceURI, String sName, String qName) throws SAXException
Receive notification of the end of an element.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException- See Also:
DefaultHandler
-
characters
public void characters(char[] buf, int offset, int len) throws SAXExceptionReceive notification of character data inside an element.- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException- See Also:
DefaultHandler
-
main
public static void main(String[] args)
Main(): test
-
-