From: Wolfgang M. M. <wol...@us...> - 2004-09-12 09:25:40
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/soap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21081/src/org/exist/soap Modified Files: QuerySoapBindingImpl.java Log Message: * Added support for XQuery pragmas to set serialization and watchdog settings. * org.exist.storage.serializers.Serializer now passes all output to an instance of the Receiver interface instead of a SAX ContentHandler. Receiver resembles SAX, but has methods that are closer to eXist's internal storage. For example, it directly accepts a QName in startElement to avoid unnecessary string allocations. * Fixed various performance leaks in cross-document joins. Index: QuerySoapBindingImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/soap/QuerySoapBindingImpl.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** QuerySoapBindingImpl.java 2 Jul 2004 16:53:55 -0000 1.22 --- QuerySoapBindingImpl.java 12 Sep 2004 09:25:24 -0000 1.23 *************** *** 261,265 **** context.setStaticallyKnownDocuments(docs); ! XQueryLexer lexer = new XQueryLexer(new StringReader(query)); XQueryParser parser = new XQueryParser(lexer); XQueryTreeParser treeParser = new XQueryTreeParser(context); --- 261,265 ---- context.setStaticallyKnownDocuments(docs); ! XQueryLexer lexer = new XQueryLexer(context, new StringReader(query)); XQueryParser parser = new XQueryParser(lexer); XQueryTreeParser treeParser = new XQueryTreeParser(context); *************** *** 394,398 **** for (Iterator i = ((NodeSet) resultSet).iterator(); i.hasNext();) { p = (NodeProxy) i.next(); ! path = p.doc.getCollection().getName() + '/' + p.doc.getFileName(); if (path.equals(docPath)) hitsByDoc.add(p); --- 394,398 ---- for (Iterator i = ((NodeSet) resultSet).iterator(); i.hasNext();) { p = (NodeProxy) i.next(); ! path = p.getDocument().getCollection().getName() + '/' + p.getDocument().getFileName(); if (path.equals(docPath)) hitsByDoc.add(p); *************** *** 441,452 **** if(node.getImplementationType() == NodeValue.PERSISTENT_NODE) { NodeProxy p = (NodeProxy)node; ! if ((documents = (TreeMap) collections.get(p.doc.getCollection().getName())) == null) { documents = new TreeMap(); ! collections.put(p.doc.getCollection().getName(), documents); } ! if ((hits = (Integer) documents.get(p.doc.getFileName())) == null) ! documents.put(p.doc.getFileName(), new Integer(1)); else ! documents.put(p.doc.getFileName(), new Integer(hits.intValue() + 1)); } } --- 441,452 ---- if(node.getImplementationType() == NodeValue.PERSISTENT_NODE) { NodeProxy p = (NodeProxy)node; ! if ((documents = (TreeMap) collections.get(p.getDocument().getCollection().getName())) == null) { documents = new TreeMap(); ! collections.put(p.getDocument().getCollection().getName(), documents); } ! if ((hits = (Integer) documents.get(p.getDocument().getFileName())) == null) ! documents.put(p.getDocument().getFileName(), new Integer(1)); else ! documents.put(p.getDocument().getFileName(), new Integer(hits.intValue() + 1)); } } |