- Timestamp:
- 07/29/10 20:23:44 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/model/Query.java
r595 r614 17 17 import java.util.Map; 18 18 19 import org.w3c.dom.*; 20 import javax.xml.parsers.*; 21 22 import org.xml.sax.SAXException; 19 23 import org.z3950.zing.cql.CQLParseException; 20 24 import org.z3950.zing.cql.CQLParser; 21 25 import org.z3950.zing.cql.CQLNode; 22 26 27 import eu.clarin.cmdi.mdservice.action.Admin; 23 28 import eu.clarin.cmdi.mdservice.action.MDTransformer; 24 29 … … 114 119 if (type.equals(RECORDSET)) { 115 120 parse(); 121 //preprocess(); 116 122 } 117 123 … … 199 205 200 206 /** 207 * tries to parse the query_string according the CQL-syntax 208 * if successful returns the root-node of the parse-tree 209 */ 210 public void preprocess() { 211 212 try { 213 Admin.notifyUser(toXCQL()); 214 215 216 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); 217 DocumentBuilder builder = factory.newDocumentBuilder(); 218 Document doc = builder.parse(new org.xml.sax.InputSource(new java.io.StringReader(toXCQL()))); 219 220 //Admin.notifyUser("document created"); 221 SearchClauses searchclauses = new SearchClauses(doc); 222 //do the processing 223 searchclauses.process(); 224 String xml_s = searchclauses.toXML(); 225 226 //Admin.notifyUser("AAAA2:" + xml_s); 227 } 228 catch (Exception e) { 229 e.printStackTrace(); 230 } 231 return; 232 } 233 234 235 /** 201 236 * provides a xml-version of the query (if parsed successfully) 202 237 * according to the XCQL-schema defined in the SRU/CQL standard
Note: See TracChangeset
for help on using the changeset viewer.