From: Wolfgang M. M. <wol...@us...> - 2004-06-08 08:16:53
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29485/src/org/exist/xquery/functions Modified Files: FunDocumentURI.java FunLang.java FunId.java Log Message: * Resolved concurrency conflicts when accessing a collection: avoid dirty reads on the old document while it is being replaced. * The index settings specified in the configuration are now also applied to reindexed document fragments during an XUpdate. * Removed unnecessary data from org.exist.dom.DocumentImpl to reduce its in memory size. * Deferred addition of new documents to collection: when adding a large number of documents, keeping the actual document objects in memory slows down the indexing process. Class Collection now just remembers the document name, not the object itself. Index: FunId.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/FunId.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FunId.java 25 Mar 2004 13:17:43 -0000 1.3 --- FunId.java 8 Jun 2004 08:16:09 -0000 1.4 *************** *** 89,93 **** QName id) { NodeSet attribs = ! (NodeSet) context.getBroker().findElementsByTagName(ElementValue.ATTRIBUTE_ID, docs, id, null); NodeProxy n, p; for (Iterator i = attribs.iterator(); i.hasNext();) { --- 89,93 ---- QName id) { NodeSet attribs = ! (NodeSet) context.getBroker().getElementIndex().findElementsByTagName(ElementValue.ATTRIBUTE_ID, docs, id, null); NodeProxy n, p; for (Iterator i = attribs.iterator(); i.hasNext();) { Index: FunLang.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/FunLang.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FunLang.java 28 May 2004 10:54:09 -0000 1.2 --- FunLang.java 8 Jun 2004 08:16:09 -0000 1.3 *************** *** 73,77 **** .getStringValue(); QName qname = new QName("lang", context.getURIForPrefix("xml"), "xml"); ! NodeSet attribs = context.getBroker().getAttributesByName(contextSequence.toNodeSet().getDocumentSet(), qname); NodeSet temp = new ExtArrayNodeSet(); NodeProxy p; --- 73,77 ---- .getStringValue(); QName qname = new QName("lang", context.getURIForPrefix("xml"), "xml"); ! NodeSet attribs = context.getBroker().getElementIndex().getAttributesByName(contextSequence.toNodeSet().getDocumentSet(), qname); NodeSet temp = new ExtArrayNodeSet(); NodeProxy p; Index: FunDocumentURI.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/FunDocumentURI.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FunDocumentURI.java 28 May 2004 10:54:09 -0000 1.2 --- FunDocumentURI.java 8 Jun 2004 08:16:09 -0000 1.3 *************** *** 67,71 **** Sequence s = arg.eval(contextSequence, contextItem); NodeProxy node = (NodeProxy) s.itemAt(0); ! return new StringValue(node.doc.getFileName()); } --- 67,72 ---- Sequence s = arg.eval(contextSequence, contextItem); NodeProxy node = (NodeProxy) s.itemAt(0); ! String path = node.doc.getCollection().getName() + '/' +node.doc.getFileName(); ! return new StringValue(path); } |