Revision 181
Added by Matt Jones almost 24 years ago
QuerySpecification.java | ||
---|---|---|
70 | 70 |
|
71 | 71 |
// Initialize the parser and read the queryspec |
72 | 72 |
Parser parser = initializeParser(); |
73 |
if (parser == null) { |
|
74 |
System.err.println("SAX parser not instantiated properly."); |
|
75 |
} |
|
73 | 76 |
try { |
74 | 77 |
parser.parse(new InputSource(queryspec)); |
75 | 78 |
} catch (SAXException e) { |
... | ... | |
105 | 108 |
FileReader xml = new FileReader(new File(xmlfile)); |
106 | 109 |
QuerySpecification qspec = new QuerySpecification(xml, DEFAULT_PARSER); |
107 | 110 |
System.out.println(qspec.printSQL()); |
111 |
|
|
112 |
// Also test the XML formatting function of DBQuery |
|
113 |
/* |
|
114 |
System.out.println(DBQuery.createQuery("mysearchvalue", "mydoctype")); |
|
115 |
StringReader xml2 = new StringReader( |
|
116 |
DBQuery.createQuery("mysearchvalue", "mydoctype")); |
|
117 |
QuerySpecification qspec2 = |
|
118 |
new QuerySpecification(xml2, DEFAULT_PARSER); |
|
119 |
System.out.println(qspec2.printSQL()); |
|
120 |
*/ |
|
108 | 121 |
} catch (IOException e) { |
109 | 122 |
System.err.println(e.getMessage()); |
110 | 123 |
} |
Also available in: Unified diff
integrated new structured query facility (DBQuery) into the servlet demo (MetaCatServlet)