From: Wolfgang M. M. <wol...@us...> - 2004-05-03 13:09:25
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19067/src/org/exist/dom Modified Files: SymbolTable.java QName.java DocumentImpl.java BinaryDocument.java NodeProxy.java DocumentSet.java DocumentTypeImpl.java Log Message: Implemented lazy evaluation for XQuery enclosed expressions. Index: BinaryDocument.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/BinaryDocument.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BinaryDocument.java 2 Feb 2004 15:30:39 -0000 1.2 --- BinaryDocument.java 3 May 2004 13:08:42 -0000 1.3 *************** *** 31,36 **** import org.exist.security.User; import org.exist.storage.DBBroker; ! import org.exist.util.VariableByteInputStream; ! import org.exist.util.VariableByteOutputStream; /** --- 31,36 ---- import org.exist.security.User; import org.exist.storage.DBBroker; ! import org.exist.storage.io.VariableByteArrayInput; ! import org.exist.storage.io.VariableByteOutputStream; /** *************** *** 96,100 **** } ! public void read(VariableByteInputStream istream) throws IOException, EOFException { docId = istream.readInt(); --- 96,100 ---- } ! public void read(VariableByteArrayInput istream) throws IOException, EOFException { docId = istream.readInt(); *************** *** 133,137 **** public void deserialize(byte[] data) { ! VariableByteInputStream istream = new VariableByteInputStream(data); try { created = istream.readLong(); --- 133,137 ---- public void deserialize(byte[] data) { ! VariableByteArrayInput istream = new VariableByteArrayInput(data); try { created = istream.readLong(); Index: NodeProxy.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/NodeProxy.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** NodeProxy.java 27 Apr 2004 15:46:56 -0000 1.27 --- NodeProxy.java 3 May 2004 13:08:42 -0000 1.28 *************** *** 634,644 **** public void copyTo(DBBroker broker, Receiver receiver) throws SAXException { ! Serializer serializer = broker.getSerializer(); ! serializer.toReceiver(this, receiver); ! // if (nodeType == Node.ATTRIBUTE_NODE) { ! // AttrImpl attr = (AttrImpl) getNode(); ! // receiver.attribute(attr.getQName(), attr.getValue()); ! // } else ! // toSAX(broker, receiver); } --- 634,640 ---- public void copyTo(DBBroker broker, Receiver receiver) throws SAXException { ! receiver.addReferenceNode(this); ! // Serializer serializer = broker.getSerializer(); ! // serializer.toReceiver(this, receiver); } Index: SymbolTable.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/SymbolTable.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SymbolTable.java 27 Apr 2004 15:46:56 -0000 1.11 --- SymbolTable.java 3 May 2004 13:08:42 -0000 1.12 *************** *** 28,35 **** import org.apache.log4j.Logger; ! import org.exist.util.VariableByteInputStream; ! import org.exist.util.VariableByteOutputStream; import org.exist.util.hashtable.Int2ObjectHashMap; - import org.exist.util.hashtable.NamePool; import org.exist.util.hashtable.Object2IntHashMap; import org.w3c.dom.Attr; --- 28,34 ---- import org.apache.log4j.Logger; ! import org.exist.storage.io.VariableByteInput; ! import org.exist.storage.io.VariableByteOutputStream; import org.exist.util.hashtable.Int2ObjectHashMap; import org.exist.util.hashtable.Object2IntHashMap; import org.w3c.dom.Attr; *************** *** 198,202 **** } ! public synchronized void read(VariableByteInputStream istream) throws IOException { max = istream.readShort(); nsMax = istream.readShort(); --- 197,201 ---- } ! public synchronized void read(VariableByteInput istream) throws IOException { max = istream.readShort(); nsMax = istream.readShort(); Index: DocumentSet.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/DocumentSet.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DocumentSet.java 1 Apr 2004 14:12:46 -0000 1.11 --- DocumentSet.java 3 May 2004 13:08:42 -0000 1.12 *************** *** 108,111 **** --- 108,113 ---- if((broker == null || doc.getPermissions().validate(broker.getUser(), Permission.READ)) && (!doc.isLockedForWrite())) put(doc.getDocId(), doc); + else + LOG.debug("document is locked"); } } Index: DocumentTypeImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/DocumentTypeImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DocumentTypeImpl.java 9 Sep 2003 07:29:03 -0000 1.3 --- DocumentTypeImpl.java 3 May 2004 13:08:42 -0000 1.4 *************** *** 19,24 **** package org.exist.dom; ! import org.exist.util.VariableByteInputStream; ! import org.exist.util.VariableByteOutputStream; import org.w3c.dom.*; import java.io.DataInput; --- 19,24 ---- package org.exist.dom; ! import org.exist.storage.io.VariableByteArrayInput; ! import org.exist.storage.io.VariableByteOutputStream; import org.w3c.dom.*; import java.io.DataInput; *************** *** 102,106 **** } ! protected void read(VariableByteInputStream istream) throws IOException { name = istream.readUTF(); systemId = istream.readUTF(); --- 102,106 ---- } ! protected void read(VariableByteArrayInput istream) throws IOException { name = istream.readUTF(); systemId = istream.readUTF(); Index: DocumentImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/DocumentImpl.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** DocumentImpl.java 23 Apr 2004 13:07:48 -0000 1.36 --- DocumentImpl.java 3 May 2004 13:08:42 -0000 1.37 *************** *** 22,26 **** */ package org.exist.dom; ! import java.io.*; import java.util.Iterator; import java.util.LinkedList; --- 22,27 ---- */ package org.exist.dom; ! import java.io.EOFException; ! import java.io.IOException; import java.util.Iterator; import java.util.LinkedList; *************** *** 29,46 **** import org.apache.log4j.Category; import org.exist.EXistException; ! import org.exist.collections.*; import org.exist.security.Group; import org.exist.security.Permission; import org.exist.security.SecurityManager; import org.exist.security.User; ! ! import org.exist.storage.*; import org.exist.storage.store.StorageAddress; - import org.w3c.dom.*; import org.exist.util.SyntaxException; - import org.exist.util.VariableByteInputStream; - import org.exist.util.VariableByteOutputStream; import org.exist.xquery.DescendantSelector; import org.exist.xquery.NodeSelector; /** --- 30,60 ---- import org.apache.log4j.Category; import org.exist.EXistException; ! import org.exist.collections.Collection; import org.exist.security.Group; import org.exist.security.Permission; import org.exist.security.SecurityManager; import org.exist.security.User; ! import org.exist.storage.DBBroker; ! import org.exist.storage.ElementValue; ! import org.exist.storage.io.VariableByteArrayInput; ! import org.exist.storage.io.VariableByteInput; ! import org.exist.storage.io.VariableByteOutputStream; import org.exist.storage.store.StorageAddress; import org.exist.util.SyntaxException; import org.exist.xquery.DescendantSelector; import org.exist.xquery.NodeSelector; + import org.w3c.dom.Attr; + import org.w3c.dom.CDATASection; + import org.w3c.dom.Comment; + import org.w3c.dom.DOMException; + import org.w3c.dom.Document; + import org.w3c.dom.DocumentFragment; + import org.w3c.dom.DocumentType; + import org.w3c.dom.Element; + import org.w3c.dom.EntityReference; + import org.w3c.dom.Node; + import org.w3c.dom.NodeList; + import org.w3c.dom.ProcessingInstruction; + import org.w3c.dom.Text; /** *************** *** 486,490 **** } ! public void read(VariableByteInputStream istream) throws IOException, EOFException { docId = istream.readInt(); fileName = collection.getName() + '/' + istream.readUTF(); --- 500,504 ---- } ! public void read(VariableByteInput istream) throws IOException, EOFException { docId = istream.readInt(); fileName = collection.getName() + '/' + istream.readUTF(); *************** *** 652,656 **** public void deserialize(byte[] data) { ! VariableByteInputStream istream = new VariableByteInputStream(data); try { long address; --- 666,670 ---- public void deserialize(byte[] data) { ! VariableByteArrayInput istream = new VariableByteArrayInput(data); try { long address; Index: QName.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/QName.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** QName.java 27 Apr 2004 15:46:56 -0000 1.12 --- QName.java 3 May 2004 13:08:42 -0000 1.13 *************** *** 35,38 **** --- 35,39 ---- public class QName implements Comparable { + public final static QName DOCUMENT_QNAME = new QName("#document", "", null); public final static QName TEXT_QNAME = new QName("#text", "", null); public final static QName COMMENT_QNAME = new QName("#comment", "", null); |