You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(57) |
Apr
(103) |
May
(164) |
Jun
(139) |
Jul
(173) |
Aug
(196) |
Sep
(221) |
Oct
(333) |
Nov
(214) |
Dec
(88) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(163) |
Feb
(165) |
Mar
(98) |
Apr
(93) |
May
(199) |
Jun
(118) |
Jul
(200) |
Aug
(212) |
Sep
(185) |
Oct
(297) |
Nov
(437) |
Dec
(272) |
2006 |
Jan
(542) |
Feb
(329) |
Mar
(267) |
Apr
(332) |
May
(267) |
Jun
(130) |
Jul
(161) |
Aug
(348) |
Sep
(166) |
Oct
(305) |
Nov
(173) |
Dec
(173) |
2007 |
Jan
(199) |
Feb
(118) |
Mar
(133) |
Apr
(200) |
May
(208) |
Jun
(146) |
Jul
(198) |
Aug
(146) |
Sep
(187) |
Oct
(182) |
Nov
(181) |
Dec
(83) |
2008 |
Jan
(252) |
Feb
(124) |
Mar
(124) |
Apr
(101) |
May
(143) |
Jun
(122) |
Jul
(129) |
Aug
(60) |
Sep
(80) |
Oct
(89) |
Nov
(54) |
Dec
(112) |
2009 |
Jan
(88) |
Feb
(145) |
Mar
(105) |
Apr
(164) |
May
(123) |
Jun
(154) |
Jul
(374) |
Aug
(341) |
Sep
(219) |
Oct
(137) |
Nov
(373) |
Dec
(240) |
2010 |
Jan
(197) |
Feb
(270) |
Mar
(253) |
Apr
(150) |
May
(102) |
Jun
(51) |
Jul
(300) |
Aug
(512) |
Sep
(254) |
Oct
(258) |
Nov
(288) |
Dec
(143) |
2011 |
Jan
(238) |
Feb
(179) |
Mar
(253) |
Apr
(332) |
May
(248) |
Jun
(255) |
Jul
(216) |
Aug
(282) |
Sep
(146) |
Oct
(77) |
Nov
(86) |
Dec
(69) |
2012 |
Jan
(172) |
Feb
(234) |
Mar
(229) |
Apr
(101) |
May
(212) |
Jun
(267) |
Jul
(129) |
Aug
(210) |
Sep
(239) |
Oct
(271) |
Nov
(368) |
Dec
(220) |
2013 |
Jan
(179) |
Feb
(155) |
Mar
(59) |
Apr
(47) |
May
(99) |
Jun
(158) |
Jul
(185) |
Aug
(16) |
Sep
(16) |
Oct
(7) |
Nov
(20) |
Dec
(12) |
2014 |
Jan
(21) |
Feb
(17) |
Mar
(18) |
Apr
(13) |
May
(27) |
Jun
(15) |
Jul
(19) |
Aug
(22) |
Sep
(30) |
Oct
(16) |
Nov
(19) |
Dec
(16) |
2015 |
Jan
(14) |
Feb
(24) |
Mar
(33) |
Apr
(41) |
May
(14) |
Jun
(80) |
Jul
(53) |
Aug
(8) |
Sep
(7) |
Oct
(15) |
Nov
(13) |
Dec
(2) |
2016 |
Jan
(22) |
Feb
(12) |
Mar
(30) |
Apr
(6) |
May
(33) |
Jun
(16) |
Jul
(8) |
Aug
(20) |
Sep
(12) |
Oct
(18) |
Nov
(12) |
Dec
(11) |
2017 |
Jan
(24) |
Feb
(26) |
Mar
(47) |
Apr
(23) |
May
(19) |
Jun
(14) |
Jul
(28) |
Aug
(30) |
Sep
(17) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(1) |
Feb
(73) |
Mar
(90) |
Apr
(42) |
May
(116) |
Jun
(90) |
Jul
(127) |
Aug
(103) |
Sep
(56) |
Oct
(42) |
Nov
(95) |
Dec
(58) |
2020 |
Jan
(102) |
Feb
(31) |
Mar
(93) |
Apr
(60) |
May
(57) |
Jun
(45) |
Jul
(29) |
Aug
(32) |
Sep
(44) |
Oct
(86) |
Nov
(51) |
Dec
(71) |
2021 |
Jan
(44) |
Feb
(25) |
Mar
(78) |
Apr
(130) |
May
(64) |
Jun
(74) |
Jul
(21) |
Aug
(64) |
Sep
(40) |
Oct
(43) |
Nov
(21) |
Dec
(99) |
2022 |
Jan
(154) |
Feb
(64) |
Mar
(45) |
Apr
(95) |
May
(62) |
Jun
(48) |
Jul
(73) |
Aug
(37) |
Sep
(71) |
Oct
(27) |
Nov
(40) |
Dec
(65) |
2023 |
Jan
(89) |
Feb
(130) |
Mar
(124) |
Apr
(50) |
May
(93) |
Jun
(46) |
Jul
(45) |
Aug
(68) |
Sep
(62) |
Oct
(71) |
Nov
(108) |
Dec
(82) |
2024 |
Jan
(53) |
Feb
(76) |
Mar
(64) |
Apr
(75) |
May
(36) |
Jun
(54) |
Jul
(98) |
Aug
(137) |
Sep
(58) |
Oct
(177) |
Nov
(84) |
Dec
(52) |
2025 |
Jan
(70) |
Feb
(53) |
Mar
(72) |
Apr
(47) |
May
(88) |
Jun
(49) |
Jul
(80) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:26:41
|
Update of /cvsroot/exist/eXist-1.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676 Modified Files: build.xml Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: build.xml =================================================================== RCS file: /cvsroot/exist/eXist-1.0/build.xml,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** build.xml 2 Mar 2004 12:51:23 -0000 1.43 --- build.xml 29 Mar 2004 14:15:12 -0000 1.44 *************** *** 229,232 **** --- 229,233 ---- <exclude name="**/xupdate/test/*.java"/> <exclude name="**/xquery/test/*.java"/> + <exclude name="org/exist/test/ServerTest.java"/> </fileset> </batchtest> |
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:26:41
|
Update of /cvsroot/exist/eXist-1.0/webapp/xquery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676/webapp/xquery Modified Files: sitemap.xmap Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: sitemap.xmap =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/xquery/sitemap.xmap,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** sitemap.xmap 1 Mar 2004 13:20:35 -0000 1.10 --- sitemap.xmap 29 Mar 2004 14:15:12 -0000 1.11 *************** *** 32,36 **** <map:match pattern="xquery.xq"> ! <map:generate src="xquery.xq" type="xquery"/> <map:transform type="xinclude"/> <map:transform src="context://stylesheets/doc2html-2.xsl"/> --- 32,36 ---- <map:match pattern="xquery.xq"> ! <map:generate src="xquery.xq" type="xquery"/> <map:transform type="xinclude"/> <map:transform src="context://stylesheets/doc2html-2.xsl"/> |
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:26:40
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676/src/org/exist/storage/store Modified Files: BFile.java DOMFile.java Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: DOMFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/DOMFile.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** DOMFile.java 2 Feb 2004 15:30:37 -0000 1.19 --- DOMFile.java 29 Mar 2004 14:15:12 -0000 1.20 *************** *** 69,72 **** --- 69,74 ---- public class DOMFile extends BTree implements Lockable { + public final static short FILE_FORMAT_VERSION_ID = 1; + // page types public final static byte LOB = 21; *************** *** 118,121 **** --- 120,130 ---- /** + * @return + */ + public short getFileVersion() { + return FILE_FORMAT_VERSION_ID; + } + + /** * Append a value to the current page * *************** *** 751,755 **** */ public boolean open() throws DBException { ! if (super.open()) return true; else --- 760,764 ---- */ public boolean open() throws DBException { ! if (super.open(FILE_FORMAT_VERSION_ID)) return true; else *************** *** 1074,1081 **** page = getCurrentPage(pageNr); dataCache.add(page); - pos = 0; dlen = page.getPageHeader().getDataLength(); ! //System.out.println(pos + " < " + dlen); ! while (pos < dlen) { //System.out.println(current + " = " + tid); if (ByteConversion.byteToShort(page.data, pos) == tid) --- 1083,1088 ---- page = getCurrentPage(pageNr); dataCache.add(page); dlen = page.getPageHeader().getDataLength(); ! for (pos = 0; pos < dlen; ) { //System.out.println(current + " = " + tid); if (ByteConversion.byteToShort(page.data, pos) == tid) *************** *** 1089,1102 **** return null; } ! /*LOG.debug( ! owner.toString() ! + ": tid " ! + tid ! + " not found on " ! + page.page.getPageInfo() ! + ". Loading " ! + pageNr);*/ } - Thread.dumpStack(); LOG.debug("tid " + tid + " not found."); return null; --- 1096,1108 ---- return null; } ! // LOG.debug( ! // owner.toString() ! // + ": tid " ! // + tid ! // + " not found on " ! // + page.page.getPageInfo() ! // + ". Loading " ! // + pageNr); } LOG.debug("tid " + tid + " not found."); return null; Index: BFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/BFile.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** BFile.java 25 Mar 2004 12:50:50 -0000 1.15 --- BFile.java 29 Mar 2004 14:15:12 -0000 1.16 *************** *** 67,74 **** * *@author Wolfgang Meier <wol...@ex...> - *@created 25. Mai 2002 */ public class BFile extends BTree { // minimum free space a page should have to be // considered for reusing --- 67,75 ---- * *@author Wolfgang Meier <wol...@ex...> */ public class BFile extends BTree { + public final static short FILE_FORMAT_VERSION_ID = 2; + // minimum free space a page should have to be // considered for reusing *************** *** 123,126 **** --- 124,134 ---- /** + * @return + */ + public short getFileVersion() { + return FILE_FORMAT_VERSION_ID; + } + + /** * Returns the Lock object responsible for this BFile. * *************** *** 390,393 **** --- 398,405 ---- final short tid = (short) StorageAddress.tidFromPointer(pointer); final int offset = findValuePosition(page, tid); + if(offset < 0) { + System.out.println("no data found at tid " + tid + "; page " + page.getPageNum()); + throw new IOException("no data found at tid " + tid + "; page " + page.getPageNum()); + } final byte[] data = page.getData(); final int l = ByteConversion.byteToInt(data, offset); *************** *** 491,495 **** public boolean open() throws DBException { ! return super.open(); } --- 503,507 ---- public boolean open() throws DBException { ! return super.open(FILE_FORMAT_VERSION_ID); } *************** *** 834,837 **** --- 846,850 ---- private final class BFileHeader extends BTreeFileHeader { + private OrderedLinkedList freeList = new OrderedLinkedList(); private long freeSpacePage = -1; |
From: Giulio V. <gva...@us...> - 2004-03-26 11:14:58
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30151/src/org/exist/xquery/functions/xmldb Modified Files: ModuleImpl.java Added Files: XMLDBCreated.java XMLDBLastModified.java Log Message: add created and last-modified to xquery --- NEW FILE: XMLDBLastModified.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-03 Wolfgang M. Meier * wol...@ex... * http://exist.sourceforge.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ package org.exist.xquery.functions.xmldb; import org.exist.dom.NodeProxy; import org.exist.dom.QName; import org.exist.xquery.BasicFunction; import org.exist.xquery.Cardinality; import org.exist.xquery.FunctionSignature; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; import org.exist.xquery.value.NodeValue; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; import org.exist.xquery.value.Type; import org.exist.xquery.value.DateTimeValue; import org.exist.security.User; /** * @author Wolfgang Meier (wol...@ex...) * */ public class XMLDBLastModified extends BasicFunction { public final static FunctionSignature signature = new FunctionSignature( new QName("last-modified", ModuleImpl.NAMESPACE_URI, ModuleImpl.PREFIX), "Returns the modified date", new SequenceType[] { new SequenceType(Type.NODE, Cardinality.EXACTLY_ONE) }, new SequenceType(Type.DATE_TIME, Cardinality.EXACTLY_ONE)); public XMLDBLastModified(XQueryContext context) { super(context, signature); } /* (non-Javadoc) * @see org.exist.xquery.BasicFunction#eval(org.exist.xquery.value.Sequence[], org.exist.xquery.value.Sequence) */ public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException { NodeValue node = (NodeValue)args[0].itemAt(0); if(node.getImplementationType() == NodeValue.PERSISTENT_NODE) { NodeProxy proxy = (NodeProxy)node; return new DateTimeValue(proxy.doc.getLastModified(),0); } return Sequence.EMPTY_SEQUENCE; } } --- NEW FILE: XMLDBCreated.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-03 Wolfgang M. Meier * wol...@ex... * http://exist.sourceforge.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ package org.exist.xquery.functions.xmldb; import org.exist.dom.NodeProxy; import org.exist.dom.QName; import org.exist.xquery.BasicFunction; import org.exist.xquery.Cardinality; import org.exist.xquery.FunctionSignature; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; import org.exist.xquery.value.NodeValue; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; import org.exist.xquery.value.Type; import org.exist.xquery.value.DateTimeValue; import org.exist.security.User; /** * @author Wolfgang Meier (wol...@ex...) * */ public class XMLDBCreated extends BasicFunction { public final static FunctionSignature signature = new FunctionSignature( new QName("created", ModuleImpl.NAMESPACE_URI, ModuleImpl.PREFIX), "Returns the creation date", new SequenceType[] { new SequenceType(Type.NODE, Cardinality.EXACTLY_ONE) }, new SequenceType(Type.DATE_TIME, Cardinality.EXACTLY_ONE)); public XMLDBCreated(XQueryContext context) { super(context, signature); } /* (non-Javadoc) * @see org.exist.xquery.BasicFunction#eval(org.exist.xquery.value.Sequence[], org.exist.xquery.value.Sequence) */ public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException { NodeValue node = (NodeValue)args[0].itemAt(0); if(node.getImplementationType() == NodeValue.PERSISTENT_NODE) { NodeProxy proxy = (NodeProxy)node; return new DateTimeValue(proxy.doc.getCreated(),0); } return Sequence.EMPTY_SEQUENCE; } } Index: ModuleImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/xmldb/ModuleImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ModuleImpl.java 1 Mar 2004 13:20:35 -0000 1.4 --- ModuleImpl.java 26 Mar 2004 11:04:01 -0000 1.5 *************** *** 43,47 **** new FunctionDef(XMLDBXUpdate.signature, XMLDBXUpdate.class), new FunctionDef(XMLDBRemove.signature, XMLDBRemove.class), ! new FunctionDef(XMLDBHasLock.signature, XMLDBHasLock.class) }; --- 43,49 ---- new FunctionDef(XMLDBXUpdate.signature, XMLDBXUpdate.class), new FunctionDef(XMLDBRemove.signature, XMLDBRemove.class), ! new FunctionDef(XMLDBHasLock.signature, XMLDBHasLock.class), ! new FunctionDef(XMLDBCreated.signature, XMLDBCreated.class), ! new FunctionDef(XMLDBLastModified.signature, XMLDBLastModified.class) }; |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:36:49
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31049/src/org/exist/dom Modified Files: DocumentImpl.java Log Message: Method signature for DBBroker.findElementsByTagName had been modified. Index: DocumentImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/DocumentImpl.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** DocumentImpl.java 2 Mar 2004 20:53:59 -0000 1.34 --- DocumentImpl.java 25 Mar 2004 13:25:56 -0000 1.35 *************** *** 41,44 **** --- 41,46 ---- import org.exist.util.VariableByteInputStream; import org.exist.util.VariableByteOutputStream; + import org.exist.xquery.DescendantSelector; + import org.exist.xquery.NodeSelector; /** *************** *** 291,296 **** DocumentSet docs = new DocumentSet(); docs.add(this); ! NodeSet temp = (NodeSet) broker.findElementsByTagName(ElementValue.ELEMENT, docs, qname); ! return temp.selectAncestorDescendant(new NodeProxy(root), NodeSet.DESCENDANT); } --- 293,298 ---- DocumentSet docs = new DocumentSet(); docs.add(this); ! NodeSelector selector = new DescendantSelector(new NodeProxy(root), false); ! return (NodeSet) broker.findElementsByTagName(ElementValue.ELEMENT, docs, qname, selector); } *************** *** 374,385 **** public NodeList getElementsByTagName(String tagname) { ! DocumentSet docs = new DocumentSet(); ! docs.add(this); ! QName qname = new QName(tagname, "", null); ! return broker.findElementsByTagName(ElementValue.ELEMENT, docs, qname); } public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { ! return null; } --- 376,387 ---- public NodeList getElementsByTagName(String tagname) { ! return getElementsByTagNameNS("", tagname); } public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { ! DocumentSet docs = new DocumentSet(); ! docs.add(this); ! QName qname = new QName(localName, namespaceURI, null); ! return broker.findElementsByTagName(ElementValue.ELEMENT, docs, qname, null); } |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:36:48
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31049/src/org/exist/xmldb Modified Files: RemoteXPathQueryService.java Log Message: Method signature for DBBroker.findElementsByTagName had been modified. Index: RemoteXPathQueryService.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteXPathQueryService.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RemoteXPathQueryService.java 3 Feb 2004 08:33:51 -0000 1.13 --- RemoteXPathQueryService.java 25 Mar 2004 13:25:56 -0000 1.14 *************** *** 136,141 **** public void declareVariable(String qname, Object initialValue) throws XMLDBException { // TODO Not implemented ! throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED, ! "method not implemented"); } --- 136,141 ---- public void declareVariable(String qname, Object initialValue) throws XMLDBException { // TODO Not implemented ! //throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED, ! // "method not implemented"); } |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:28:32
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29458/src/org/exist/xquery/functions Modified Files: FunId.java Log Message: Method signature for DBBroker.findElementsByTagName had been modified. Index: FunId.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/FunId.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FunId.java 2 Feb 2004 15:30:39 -0000 1.2 --- FunId.java 25 Mar 2004 13:17:43 -0000 1.3 *************** *** 89,93 **** QName id) { NodeSet attribs = ! (NodeSet) context.getBroker().findElementsByTagName(ElementValue.ATTRIBUTE_ID, docs, id); NodeProxy n, p; for (Iterator i = attribs.iterator(); i.hasNext();) { --- 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();) { |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:39
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/soap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/soap Modified Files: QuerySoapBindingImpl.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: QuerySoapBindingImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/soap/QuerySoapBindingImpl.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** QuerySoapBindingImpl.java 25 Feb 2004 15:31:59 -0000 1.18 --- QuerySoapBindingImpl.java 25 Mar 2004 12:50:51 -0000 1.19 *************** *** 288,291 **** --- 288,292 ---- resp.setQueryTime(System.currentTimeMillis() - start); expr.reset(); + context.reset(); } catch (Exception e) { LOG.debug(e.getMessage(), e); |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/xmlrpc Modified Files: RpcConnection.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: RpcConnection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcConnection.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** RpcConnection.java 8 Mar 2004 11:21:21 -0000 1.48 --- RpcConnection.java 25 Mar 2004 12:50:51 -0000 1.49 *************** *** 212,215 **** --- 212,216 ---- LOG.info("query took " + (System.currentTimeMillis() - start) + "ms."); expr.reset(); + context.reset(); return result; } |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/storage/store Modified Files: BFile.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: BFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/BFile.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** BFile.java 2 Feb 2004 15:30:37 -0000 1.14 --- BFile.java 25 Mar 2004 12:50:50 -0000 1.15 *************** *** 1523,1527 **** } ! public final long getAddress() { return address_; } --- 1523,1527 ---- } ! public long getAddress() { return address_; } *************** *** 1530,1543 **** * @see java.io.InputStream#read() */ ! public final int read() throws IOException { ! if (pageLen_ < 0) ! return -1; if (offset_ == pageLen_) { ! final long next = nextPage_.getPageHeader().getNextInChain(); ! if (next < 1) { ! pageLen_ = -1; ! offset_ = 0; ! return -1; ! } try { lock.acquire(Lock.READ_LOCK); --- 1530,1546 ---- * @see java.io.InputStream#read() */ ! public int read() throws IOException { if (offset_ == pageLen_) { ! advance(); ! } ! return pageLen_ == -1 ? -1 : (int) (nextPage_.data[offset_++] & 0xFF); ! } ! ! private void advance() throws IOException { ! long next = nextPage_.getPageHeader().getNextInChain(); ! if (next < 1) { ! pageLen_ = -1; ! offset_ = 0; ! } else { try { lock.acquire(Lock.READ_LOCK); *************** *** 1553,1559 **** } } - return (int) (nextPage_.data[offset_++] & 0xFF); } ! /* (non-Javadoc) * @see java.io.InputStream#available() --- 1556,1561 ---- } } } ! /* (non-Javadoc) * @see java.io.InputStream#available() |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/xmldb Modified Files: LocalXPathQueryService.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: LocalXPathQueryService.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/LocalXPathQueryService.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** LocalXPathQueryService.java 5 Mar 2004 11:15:27 -0000 1.34 --- LocalXPathQueryService.java 25 Mar 2004 12:50:51 -0000 1.35 *************** *** 125,128 **** --- 125,129 ---- NodeSet contextSet, CompiledExpression expression, String sortExpr) throws XMLDBException { + long start = System.currentTimeMillis(); DBBroker broker = null; Sequence result; *************** *** 155,158 **** --- 156,160 ---- result = ((PathExpr)expression).eval(contextSet, null); expression.reset(); + context.reset(); } catch (EXistException e) { throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(), e); *************** *** 162,165 **** --- 164,168 ---- brokerPool.release(broker); } + LOG.debug("query took " + (System.currentTimeMillis() - start) + " ms."); if(result != null) return new LocalResourceSet(user, brokerPool, collection, properties, result, sortExpr); *************** *** 171,174 **** --- 174,178 ---- DBBroker broker = null; try { + long start = System.currentTimeMillis(); broker = brokerPool.get(user); XQueryContext context = new XQueryContext(broker); *************** *** 211,215 **** treeParser.getLastException()); } ! LOG.debug("compiled: " + expr.pprint()); return expr; } catch (EXistException e) { --- 215,219 ---- treeParser.getLastException()); } ! LOG.debug("compilation took " + (System.currentTimeMillis() - start)); return expr; } catch (EXistException e) { |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/xquery Modified Files: XQueryContext.java LocationStep.java Added Files: DescendantSelector.java DescendantOrSelfSelector.java ChildSelector.java NodeSelector.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: LocationStep.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/LocationStep.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LocationStep.java 25 Feb 2004 15:31:57 -0000 1.2 --- LocationStep.java 25 Mar 2004 12:50:50 -0000 1.3 *************** *** 197,220 **** } else { DocumentSet docs = contextSet.getDocumentSet(); ! if (currentSet == null || currentDocs == null || !(docs.equals(currentDocs))) { ! currentDocs = docs; ! currentSet = ! (NodeSet) context.getBroker().getAttributesByName( ! currentDocs, test.getName()); ! } ! if (axis == Constants.DESCENDANT_ATTRIBUTE_AXIS) { ! result = ! currentSet.selectAncestorDescendant( ! contextSet, ! NodeSet.DESCENDANT, ! inPredicate); ! ! } else { ! result = ! currentSet.selectParentChild( ! contextSet, ! NodeSet.DESCENDANT, ! inPredicate); ! } } return result; --- 197,208 ---- } else { DocumentSet docs = contextSet.getDocumentSet(); ! NodeSelector selector; ! if(axis == Constants.DESCENDANT_ATTRIBUTE_AXIS) ! selector = new DescendantSelector(contextSet, inPredicate); ! else ! selector = new ChildSelector(contextSet, inPredicate); ! result = context.getBroker().findElementsByTagName( ! ElementValue.ATTRIBUTE, docs, test.getName(), selector ! ); } return result; *************** *** 231,244 **** } else { DocumentSet docs = contextSet.getDocumentSet(); ! if (currentSet == null || currentDocs == null || !(docs.equals(currentDocs))) { ! currentDocs = docs; ! currentSet = ! (NodeSet) context.getBroker().findElementsByTagName( ! ElementValue.ELEMENT, ! currentDocs, ! test.getName()); ! } ! NodeSet result = ! currentSet.selectParentChild(contextSet, NodeSet.DESCENDANT, inPredicate); return result; } --- 219,226 ---- } else { DocumentSet docs = contextSet.getDocumentSet(); ! NodeSelector selector = new ChildSelector(contextSet, inPredicate); ! NodeSet result = context.getBroker().findElementsByTagName( ! ElementValue.ELEMENT, docs, test.getName(), selector ! ); return result; } *************** *** 255,270 **** } else { DocumentSet docs = contextSet.getDocumentSet(); ! if (currentSet == null || currentDocs == null || !(docs.equals(currentDocs))) { ! currentDocs = docs; ! currentSet = ! (NodeSet) context.getBroker().findElementsByTagName( ! ElementValue.ELEMENT, currentDocs, ! test.getName()); ! } ! NodeSet result = currentSet.selectAncestorDescendant( ! contextSet, ! NodeSet.DESCENDANT, ! axis == Constants.DESCENDANT_SELF_AXIS, ! inPredicate); return result; } --- 237,246 ---- } else { DocumentSet docs = contextSet.getDocumentSet(); ! NodeSelector selector = axis == Constants.DESCENDANT_SELF_AXIS ? ! new DescendantOrSelfSelector(contextSet, inPredicate) : ! new DescendantSelector(contextSet, inPredicate); ! NodeSet result = context.getBroker().findElementsByTagName( ! ElementValue.ELEMENT, docs, test.getName(), selector ! ); return result; } *************** *** 282,286 **** (NodeSet) context.getBroker().findElementsByTagName( ElementValue.ELEMENT, currentDocs, ! test.getName()); } result = contextSet.selectSiblings( --- 258,262 ---- (NodeSet) context.getBroker().findElementsByTagName( ElementValue.ELEMENT, currentDocs, ! test.getName(), null); } result = contextSet.selectSiblings( *************** *** 328,332 **** (NodeSet) context.getBroker().findElementsByTagName( ElementValue.ELEMENT, currentDocs, ! test.getName()); } result = contextSet.selectFollowing(currentSet); --- 304,308 ---- (NodeSet) context.getBroker().findElementsByTagName( ElementValue.ELEMENT, currentDocs, ! test.getName(), null); } result = contextSet.selectFollowing(currentSet); *************** *** 346,350 **** (NodeSet) context.getBroker().findElementsByTagName( ElementValue.ELEMENT, currentDocs, ! test.getName()); } result = --- 322,326 ---- (NodeSet) context.getBroker().findElementsByTagName( ElementValue.ELEMENT, currentDocs, ! test.getName(), null); } result = *************** *** 384,387 **** --- 360,364 ---- super.resetState(); currentSet = null; + currentDocs = null; cachedContext = null; cachedResult = null; --- NEW FILE: NodeSelector.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-03 Wolfgang M. Meier * wol...@ex... * http://exist.sourceforge.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: NodeSelector.java,v 1.1 2004/03/25 12:50:50 wolfgang_m Exp $ */ package org.exist.xquery; import org.exist.dom.NodeProxy; /** * @author Wolfgang Meier (wol...@ex...) */ public interface NodeSelector { public boolean match(NodeProxy node); } --- NEW FILE: DescendantSelector.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-03 Wolfgang M. Meier * wol...@ex... * http://exist.sourceforge.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: DescendantSelector.java,v 1.1 2004/03/25 12:50:50 wolfgang_m Exp $ */ package org.exist.xquery; import org.exist.dom.NodeProxy; import org.exist.dom.NodeSet; /** * @author Wolfgang Meier (wol...@ex...) */ public class DescendantSelector implements NodeSelector { protected NodeSet context; protected boolean rememberContext = false; public DescendantSelector(NodeSet contextSet, boolean rememberContext) { this.context = contextSet; this.rememberContext = rememberContext; } /* (non-Javadoc) * @see org.exist.xquery.NodeSelector#match(org.exist.dom.NodeProxy) */ public boolean match(NodeProxy node) { NodeProxy p; if((p = context.parentWithChild(node.doc, node.gid, false, false, -1)) != null) { if (rememberContext) node.addContextNode(p); else node.copyContext(p); return true; } return false; } } Index: XQueryContext.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/XQueryContext.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** XQueryContext.java 8 Mar 2004 11:21:22 -0000 1.8 --- XQueryContext.java 25 Mar 2004 12:50:50 -0000 1.9 *************** *** 296,299 **** --- 296,306 ---- } + public void reset() { + builder = null; + staticDocuments = null; + variableStack.clear(); + fragmentStack.clear(); + } + /** * Returns true if whitespace between constructed element nodes --- NEW FILE: DescendantOrSelfSelector.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-03 Wolfgang M. Meier * wol...@ex... * http://exist.sourceforge.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: DescendantOrSelfSelector.java,v 1.1 2004/03/25 12:50:50 wolfgang_m Exp $ */ package org.exist.xquery; import org.exist.dom.NodeProxy; import org.exist.dom.NodeSet; /** * @author Wolfgang Meier (wol...@ex...) */ public class DescendantOrSelfSelector extends DescendantSelector { public DescendantOrSelfSelector(NodeSet contextSet, boolean rememberContext) { super(contextSet, rememberContext); } /* (non-Javadoc) * @see org.exist.xquery.NodeSelector#match(org.exist.dom.NodeProxy) */ public boolean match(NodeProxy node) { NodeProxy p; if((p = context.parentWithChild(node.doc, node.gid, false, true, -1)) != null) { if (rememberContext) node.addContextNode(p); else node.copyContext(p); return true; } return false; } } --- NEW FILE: ChildSelector.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-03 Wolfgang M. Meier * wol...@ex... * http://exist.sourceforge.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: ChildSelector.java,v 1.1 2004/03/25 12:50:50 wolfgang_m Exp $ */ package org.exist.xquery; import org.exist.dom.NodeProxy; import org.exist.dom.NodeSet; /** * @author Wolfgang Meier (wol...@ex...) */ public class ChildSelector implements NodeSelector { private NodeSet context; private boolean rememberContext = false; public ChildSelector(NodeSet contextSet, boolean rememberContext) { this.context = contextSet; this.rememberContext = rememberContext; } /* (non-Javadoc) * @see org.exist.xquery.NodeSelector#match(org.exist.dom.NodeProxy) */ public boolean match(NodeProxy node) { NodeProxy p; if((p = context.parentWithChild(node.doc, node.gid, true, false, -1)) != null) { if (rememberContext) node.addContextNode(p); else node.copyContext(p); return true; } return false; } } |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:37
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/storage Modified Files: DBBroker.java TextSearchEngine.java NativeBroker.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: NativeBroker.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeBroker.java,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** NativeBroker.java 5 Mar 2004 11:15:28 -0000 1.59 --- NativeBroker.java 25 Mar 2004 12:50:50 -0000 1.60 *************** *** 85,88 **** --- 85,89 ---- import org.exist.util.VariableByteOutputStream; import org.exist.xquery.Constants; + import org.exist.xquery.NodeSelector; import org.exist.xquery.XQueryContext; import org.w3c.dom.Document; *************** *** 370,376 **** *@param docs Description of the Parameter *@param tagName Description of the Parameter ! *@return Description of the Return Value */ ! public NodeSet findElementsByTagName(byte type, DocumentSet docs, QName qname) { // final long start = System.currentTimeMillis(); final ExtArrayNodeSet result = new ExtArrayNodeSet(docs.getLength(), 256); --- 371,378 ---- *@param docs Description of the Parameter *@param tagName Description of the Parameter ! *@return */ ! public NodeSet findElementsByTagName(byte type, DocumentSet docs, QName qname, ! NodeSelector selector) { // final long start = System.currentTimeMillis(); final ExtArrayNodeSet result = new ExtArrayNodeSet(docs.getLength(), 256); *************** *** 379,389 **** int len; short collectionId; ! long gid; // , address; VariableByteInputStream is; ElementValue ref; - // byte[] data; InputStream dis = null; short sym, nsSym; Collection collection; final short nodeType = (type == ElementValue.ATTRIBUTE ? Node.ATTRIBUTE_NODE : Node.ELEMENT_NODE); --- 381,391 ---- int len; short collectionId; ! long gid; VariableByteInputStream is; ElementValue ref; InputStream dis = null; short sym, nsSym; Collection collection; + NodeProxy p; final short nodeType = (type == ElementValue.ATTRIBUTE ? Node.ATTRIBUTE_NODE : Node.ELEMENT_NODE); *************** *** 430,436 **** for (int k = 0; k < len; k++) { gid = gid + is.readLong(); ! result.add( ! new NodeProxy(doc, gid, nodeType, StorageAddress.read(is)), ! len); } } --- 432,438 ---- for (int k = 0; k < len; k++) { gid = gid + is.readLong(); ! p = new NodeProxy(doc, gid, nodeType, StorageAddress.read(is)); ! if(selector == null || selector.match(p)) ! result.add(p, len); } } *************** *** 440,444 **** } } ! result.sort(); // LOG.debug( // "found " --- 442,446 ---- } } ! // result.sort(); // LOG.debug( // "found " *************** *** 501,505 **** public NodeSet getAttributesByName(DocumentSet docs, QName qname) { qname.setLocalName(qname.getLocalName()); ! NodeSet result = findElementsByTagName(ElementValue.ATTRIBUTE, docs, qname); return result; } --- 503,507 ---- public NodeSet getAttributesByName(DocumentSet docs, QName qname) { qname.setLocalName(qname.getLocalName()); ! NodeSet result = findElementsByTagName(ElementValue.ATTRIBUTE, docs, qname, null); return result; } Index: TextSearchEngine.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/TextSearchEngine.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TextSearchEngine.java 1 Mar 2004 13:20:35 -0000 1.7 --- TextSearchEngine.java 25 Mar 2004 12:50:50 -0000 1.8 *************** *** 21,38 **** package org.exist.storage; - import org.apache.log4j.Category; import java.io.FileNotFoundException; import java.io.IOException; import java.io.StreamTokenizer; - import java.io.FileReader; - import java.util.TreeSet; import java.util.Observable; ! import org.exist.util.*; ! import org.exist.collections.*; ! import org.exist.dom.*; import org.exist.security.PermissionDeniedException; import org.exist.security.User; - import org.exist.storage.analysis.Tokenizer; import org.exist.storage.analysis.SimpleTokenizer; /** --- 21,46 ---- package org.exist.storage; import java.io.FileNotFoundException; + import java.io.FileReader; import java.io.IOException; import java.io.StreamTokenizer; import java.util.Observable; ! import java.util.TreeSet; ! ! import org.apache.log4j.Logger; ! import org.exist.collections.Collection; ! import org.exist.dom.AttrImpl; ! import org.exist.dom.DocumentImpl; ! import org.exist.dom.DocumentSet; ! import org.exist.dom.NodeImpl; ! import org.exist.dom.NodeSet; ! import org.exist.dom.TextImpl; import org.exist.security.PermissionDeniedException; import org.exist.security.User; import org.exist.storage.analysis.SimpleTokenizer; + import org.exist.storage.analysis.Tokenizer; + import org.exist.util.Configuration; + import org.exist.util.Occurrences; + import org.exist.util.PorterStemmer; /** *************** *** 46,51 **** public abstract class TextSearchEngine extends Observable { ! protected final static Category LOG = ! Category.getInstance(TextSearchEngine.class.getName()); protected TreeSet stoplist = new TreeSet(); --- 54,59 ---- public abstract class TextSearchEngine extends Observable { ! protected final static Logger LOG = ! Logger.getLogger(TextSearchEngine.class); protected TreeSet stoplist = new TreeSet(); Index: DBBroker.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/DBBroker.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** DBBroker.java 8 Mar 2004 11:21:21 -0000 1.22 --- DBBroker.java 25 Mar 2004 12:50:50 -0000 1.23 *************** *** 49,52 **** --- 49,53 ---- import org.exist.util.VariableByteInputStream; import org.exist.util.VariableByteOutputStream; + import org.exist.xquery.NodeSelector; import org.w3c.dom.Document; import org.w3c.dom.Node; *************** *** 169,173 **** byte type, DocumentSet docs, ! QName qname); /** flush all data that has not been written before. */ --- 170,175 ---- byte type, DocumentSet docs, ! QName qname, ! NodeSelector selector); /** flush all data that has not been written before. */ |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:37
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/dom Modified Files: AbstractNodeSet.java ExtArrayNodeSet.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: AbstractNodeSet.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/AbstractNodeSet.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AbstractNodeSet.java 5 Mar 2004 16:15:47 -0000 1.13 --- AbstractNodeSet.java 25 Mar 2004 12:50:49 -0000 1.14 *************** *** 444,448 **** for (Iterator i = iterator(); i.hasNext();) { n = (NodeProxy) i.next(); ! p = al.parentWithChild(n.doc, n.gid, false, includeSelf); if (p != null) { if ((temp = result.get(p)) == null) { --- 444,448 ---- for (Iterator i = iterator(); i.hasNext();) { n = (NodeProxy) i.next(); ! p = al.parentWithChild(n.doc, n.gid, false, includeSelf, -1); if (p != null) { if ((temp = result.get(p)) == null) { Index: ExtArrayNodeSet.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/ExtArrayNodeSet.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ExtArrayNodeSet.java 4 Mar 2004 10:09:37 -0000 1.12 --- ExtArrayNodeSet.java 25 Mar 2004 12:50:49 -0000 1.13 *************** *** 22,26 **** import java.util.Iterator; - import org.exist.util.FastQSort; import org.exist.util.Range; --- 22,25 ---- *************** *** 58,65 **** private boolean isSorted = false; private boolean isInDocumentOrder = false; - private int lastDoc = -1; private Part lastPart = null; - private int state = 0; --- 57,62 ---- *************** *** 67,79 **** this.map = new Int2ObjectHashMap(512); } ! /** ! * Constructor for ExtArrayNodeSet. * ! * The first argument specifies the expected number of documents in ! * this node set. The second int argument specifies the default ! * array size, which is used whenever a new array has to be allocated for ! * nodes. The default array size can be overwritten by the sizeHint ! * argument passed to {@link #add(NodeProxy, int). * * @param initialDocsCount --- 64,76 ---- this.map = new Int2ObjectHashMap(512); } ! /** ! * Constructor for ExtArrayNodeSet. * ! * The first argument specifies the expected number of documents in this ! * node set. The second int argument specifies the default array size, ! * which is used whenever a new array has to be allocated for nodes. The ! * default array size can be overwritten by the sizeHint argument passed to ! * {@link #add(NodeProxy, int). * * @param initialDocsCount *************** *** 88,94 **** this(512, initialArraySize); } ! public void add(NodeProxy proxy) { ! getPart(proxy.doc.docId, true, initalSize).add(proxy); ++size; isSorted = false; --- 85,91 ---- this(512, initialArraySize); } ! public void add(NodeProxy proxy) { ! getPart(proxy.doc, true, initalSize).add(proxy); ++size; isSorted = false; *************** *** 105,109 **** */ public void add(NodeProxy proxy, int sizeHint) { ! getPart(proxy.doc.docId, true, sizeHint > -1 ? sizeHint : initalSize).add(proxy); ++size; isSorted = false; --- 102,107 ---- */ public void add(NodeProxy proxy, int sizeHint) { ! getPart(proxy.doc, true, sizeHint > -1 ? sizeHint : initalSize).add( ! proxy); ++size; isSorted = false; *************** *** 117,134 **** public int getSizeHint(DocumentImpl doc) { ! Part part = getPart(doc.docId, false, 0); return part == null ? -1 : part.length; } ! private Part getPart(int docId, boolean create, int sizeHint) { ! if (docId == lastDoc && lastPart != null) return lastPart; ! Part part = (Part) map.get(docId); if (part == null && create) { ! part = new Part(sizeHint); ! map.put(docId, part); } lastPart = part; ! lastDoc = docId; return part; } --- 115,132 ---- public int getSizeHint(DocumentImpl doc) { ! Part part = getPart(doc, false, 0); return part == null ? -1 : part.length; } ! private Part getPart(DocumentImpl doc, boolean create, int sizeHint) { ! if (doc.docId == lastDoc && lastPart != null) return lastPart; ! Part part = (Part) map.get(doc.docId); if (part == null && create) { ! part = new Part(sizeHint, doc); ! map.put(doc.docId, part); } lastPart = part; ! lastDoc = doc.docId; return part; } *************** *** 179,183 **** */ public boolean contains(DocumentImpl doc, long nodeId) { ! final Part part = getPart(doc.docId, false, 0); return part == null ? false : part.contains(nodeId); } --- 177,181 ---- */ public boolean contains(DocumentImpl doc, long nodeId) { ! final Part part = getPart(doc, false, 0); return part == null ? false : part.contains(nodeId); } *************** *** 189,193 **** */ public boolean contains(NodeProxy proxy) { ! final Part part = getPart(proxy.doc.docId, false, 0); return part == null ? false : part.contains(proxy.gid); } --- 187,191 ---- */ public boolean contains(NodeProxy proxy) { ! final Part part = getPart(proxy.doc, false, 0); return part == null ? false : part.contains(proxy.gid); } *************** *** 199,203 **** */ public void addAll(NodeSet other) { ! for (Iterator i = other.iterator(); i.hasNext(); ) { add((NodeProxy) i.next()); } --- 197,201 ---- */ public void addAll(NodeSet other) { ! for (Iterator i = other.iterator(); i.hasNext();) { add((NodeProxy) i.next()); } *************** *** 210,214 **** */ public int getLength() { ! sort(); // sort to remove duplicates return size; } --- 208,212 ---- */ public int getLength() { ! sort(); // sort to remove duplicates return size; } *************** *** 233,237 **** int count = 0; Part part; ! for (Iterator i = map.valueIterator(); i.hasNext(); ) { part = (Part) i.next(); if (count + part.length > pos) --- 231,235 ---- int count = 0; Part part; ! for (Iterator i = map.valueIterator(); i.hasNext();) { part = (Part) i.next(); if (count + part.length > pos) *************** *** 248,252 **** */ public NodeProxy get(NodeProxy p) { ! final Part part = getPart(p.doc.docId, false, 0); return part == null ? null : part.get(p.gid); } --- 246,250 ---- */ public NodeProxy get(NodeProxy p) { ! final Part part = getPart(p.doc, false, 0); return part == null ? null : part.get(p.gid); } *************** *** 259,263 **** public NodeProxy get(DocumentImpl doc, long nodeId) { sort(); ! final Part part = getPart(doc.docId, false, 0); return part == null ? null : part.get(nodeId); } --- 257,261 ---- public NodeProxy get(DocumentImpl doc, long nodeId) { sort(); ! final Part part = getPart(doc, false, 0); return part == null ? null : part.get(nodeId); } *************** *** 279,283 **** */ public void remove(NodeProxy node) { ! final Part part = getPart(node.doc.getDocId(), false, 0); if (part == null) return; --- 277,281 ---- */ public void remove(NodeProxy node) { ! final Part part = getPart(node.doc, false, 0); if (part == null) return; *************** *** 289,299 **** public NodeSet getRange(DocumentImpl doc, long lower, long upper) { ! final Part part = getPart(doc.docId, false, 0); return part.getRange(lower, upper); } public NodeSet hasChildrenInSet(NodeProxy parent, int mode, ! boolean rememberContext) { ! final Part part = getPart(parent.doc.docId, false, 0); if (part == null) return new ArraySet(1); --- 287,297 ---- public NodeSet getRange(DocumentImpl doc, long lower, long upper) { ! final Part part = getPart(doc, false, 0); return part.getRange(lower, upper); } public NodeSet hasChildrenInSet(NodeProxy parent, int mode, ! boolean rememberContext) { ! final Part part = getPart(parent.doc, false, 0); if (part == null) return new ArraySet(1); *************** *** 307,311 **** Part part; size = 0; ! for (Iterator i = map.valueIterator(); i.hasNext(); ) { part = (Part) i.next(); part.sort(); --- 305,309 ---- Part part; size = 0; ! for (Iterator i = map.valueIterator(); i.hasNext();) { part = (Part) i.next(); part.sort(); *************** *** 320,328 **** public final void sortInDocumentOrder() { // long start = System.currentTimeMillis(); ! if(isInDocumentOrder) return; Part part; size = 0; ! for (Iterator i = map.valueIterator(); i.hasNext(); ) { part = (Part) i.next(); part.sortInDocumentOrder(); --- 318,326 ---- public final void sortInDocumentOrder() { // long start = System.currentTimeMillis(); ! if (isInDocumentOrder) return; Part part; size = 0; ! for (Iterator i = map.valueIterator(); i.hasNext();) { part = (Part) i.next(); part.sortInDocumentOrder(); *************** *** 342,346 **** public void setSelfAsContext() { Part part; ! for (Iterator i = map.valueIterator(); i.hasNext(); ) { part = (Part) i.next(); part.setSelfAsContext(); --- 340,344 ---- public void setSelfAsContext() { Part part; ! for (Iterator i = map.valueIterator(); i.hasNext();) { part = (Part) i.next(); part.setSelfAsContext(); *************** *** 348,351 **** --- 346,356 ---- } + public NodeProxy parentWithChild(DocumentImpl doc, long gid, + boolean directParent, + boolean includeSelf, int level) { + Part part = getPart(doc, false, -1); + return part == null ? null : part.parentWithChild(gid, directParent, includeSelf, level); + } + public DocumentSet getDocumentSet() { if (!isSorted) *************** *** 354,358 **** DocumentSet ds = new DocumentSet(); DocumentImpl doc, last = null; ! for (Iterator i = map.valueIterator(); i.hasNext(); ) { part = (Part) i.next(); if (!isSorted) { --- 359,363 ---- DocumentSet ds = new DocumentSet(); DocumentImpl doc, last = null; ! for (Iterator i = map.valueIterator(); i.hasNext();) { part = (Part) i.next(); if (!isSorted) { *************** *** 388,399 **** return state; } - private static class Part { NodeProxy array[]; int length = 0; ! Part(int initialSize) { array = new NodeProxy[initialSize]; } --- 393,405 ---- return state; } private static class Part { NodeProxy array[]; + DocumentImpl doc; int length = 0; ! Part(int initialSize, DocumentImpl myDoc) { array = new NodeProxy[initialSize]; + doc = myDoc; } *************** *** 441,445 **** return null; } ! void sort() { FastQSort.sortByNodeId(array, 0, length - 1); --- 447,451 ---- return null; } ! void sort() { FastQSort.sortByNodeId(array, 0, length - 1); *************** *** 461,466 **** * itself is contained in the node set. */ ! NodeProxy parentWithChild(DocumentImpl doc, long gid, ! boolean directParent, boolean includeSelf, int level) { NodeProxy temp; if (includeSelf && (temp = get(gid)) != null) --- 467,472 ---- * itself is contained in the node set. */ ! public NodeProxy parentWithChild(long gid, boolean directParent, ! boolean includeSelf, int level) { NodeProxy temp; if (includeSelf && (temp = get(gid)) != null) *************** *** 470,474 **** while (gid > 0) { gid = XMLUtil.getParentId(doc, gid, level); - if ((temp = get(gid)) != null) return temp; --- 476,479 ---- *************** *** 491,495 **** */ NodeSet getChildrenInSet(NodeProxy parent, int mode, ! boolean rememberContext) { NodeSet result = new ExtArrayNodeSet(); // get the range of node ids reserved for children of the parent --- 496,500 ---- */ NodeSet getChildrenInSet(NodeProxy parent, int mode, ! boolean rememberContext) { NodeSet result = new ExtArrayNodeSet(); // get the range of node ids reserved for children of the parent *************** *** 514,522 **** if (low > high) return result; // no node found - // find the first child node in the range while (mid > 0 && array[mid - 1].gid >= range.getStart()) --mid; - // walk through the range of child nodes we found for (int i = mid; i < length && array[i].gid <= range.getEnd(); i++) { --- 519,525 ---- *************** *** 561,565 **** if (low > high) return result; // no node found - // find the first child node in the range while (mid > 0 && array[mid - 1].gid >= lower) --- 564,567 ---- *************** *** 616,620 **** } } - private class ExtArrayIterator implements Iterator, SequenceIterator { --- 618,621 ---- |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:36
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/util Modified Files: VariableByteInputStream.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: VariableByteInputStream.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/VariableByteInputStream.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** VariableByteInputStream.java 2 Oct 2003 12:20:19 -0000 1.8 --- VariableByteInputStream.java 25 Mar 2004 12:50:49 -0000 1.9 *************** *** 17,21 **** * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ! * $Id: */ package org.exist.util; --- 17,21 ---- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ! * $Id$ */ package org.exist.util; *************** *** 97,105 **** } - /** - * Description of the Method - * - *@return Description of the Return Value - */ public long readLong() throws EOFException, IOException { byte b = (byte) is_.read(); --- 97,100 ---- |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 12:53:10
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22694/src/org/exist/xquery/functions Modified Files: FunDoc.java Log Message: The cached root element of the document should be cleared before reusing a compiled expression, otherwise the node might be out-of-sync. Index: FunDoc.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/FunDoc.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FunDoc.java 29 Jan 2004 15:06:41 -0000 1.1 --- FunDoc.java 25 Mar 2004 12:42:19 -0000 1.2 *************** *** 105,107 **** --- 105,114 ---- } + /* (non-Javadoc) + * @see org.exist.xquery.PathExpr#resetState() + */ + public void resetState() { + cachedNode = null; + cachedPath = null; + } } |
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 12:49:41
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21955/src/org/exist/xquery/functions Modified Files: ExtNear.java Log Message: Wildcards only worked for the last keyword; no match if first keyword appears several times within searching distance. Index: ExtNear.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/ExtNear.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ExtNear.java 29 Jan 2004 15:06:41 -0000 1.1 --- ExtNear.java 25 Mar 2004 12:38:53 -0000 1.2 *************** *** 32,36 **** import org.apache.oro.text.regex.Perl5Matcher; import org.exist.EXistException; - import org.exist.dom.DocumentSet; import org.exist.dom.ExtArrayNodeSet; import org.exist.dom.NodeProxy; --- 32,35 ---- *************** *** 41,46 **** import org.exist.xquery.Constants; import org.exist.xquery.Expression; - import org.exist.xquery.XQueryContext; import org.exist.xquery.XPathException; import org.exist.xquery.value.IntegerValue; import org.exist.xquery.value.Sequence; --- 40,45 ---- import org.exist.xquery.Constants; import org.exist.xquery.Expression; import org.exist.xquery.XPathException; + import org.exist.xquery.XQueryContext; import org.exist.xquery.value.IntegerValue; import org.exist.xquery.value.Sequence; *************** *** 82,86 **** boolean hasWildcards = false; for(int i = 0; i < terms.length; i++) { ! hasWildcards = NativeTextEngine.containsWildcards(terms[i]); } --- 81,85 ---- boolean hasWildcards = false; for(int i = 0; i < terms.length; i++) { ! hasWildcards |= NativeTextEngine.containsWildcards(terms[i]); } *************** *** 118,124 **** term = terms[j]; distance = -1; ! continue; ! } ! if (word.equalsIgnoreCase(term)) { distance = 0; j++; --- 117,122 ---- term = terms[j]; distance = -1; ! ! } else if (word.equalsIgnoreCase(term)) { distance = 0; j++; *************** *** 132,138 **** } else if (j > 0 && word.equalsIgnoreCase(terms[0])) { // first search term found: start again ! j = 0; term = terms[j]; ! distance = -1; continue; } else if (-1 < distance) --- 130,136 ---- } else if (j > 0 && word.equalsIgnoreCase(terms[0])) { // first search term found: start again ! j = 1; term = terms[j]; ! distance = 0 ; continue; } else if (-1 < distance) *************** *** 202,208 **** } else if (j > 0 && matcher.matches(word, patterns[0])) { // first search term found: start again ! j = 0; term = patterns[j]; ! distance = -1; continue; } else if (-1 < distance) --- 200,206 ---- } else if (j > 0 && matcher.matches(word, patterns[0])) { // first search term found: start again ! j = 1; term = patterns[j]; ! distance = 0; continue; } else if (-1 < distance) |
From: Houman K. <kho...@we...> - 2004-03-24 06:55:39
|
Houman M. Khorasani |
From: <jm...@us...> - 2004-03-08 18:36:32
|
Update of /cvsroot/exist/eXist-1.0/webapp/xse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12615 Modified Files: sprocess-foc.xsp Log Message: adapt to new XQuery queries, with summary of criteria Index: sprocess-foc.xsp =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/xse/sprocess-foc.xsp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sprocess-foc.xsp 16 Feb 2004 10:28:49 -0000 1.5 --- sprocess-foc.xsp 8 Mar 2004 18:12:02 -0000 1.6 *************** *** 81,96 **** // ]]> - // add document(*) to query if missing - if(!(query.startsWith("document(") || query.startsWith("collection(")) || - query.startsWith("xcollection(")) { - if(cname == null || cname.equals("all documents")) - query = "document()" + query; - else - query = "collection('" + cname + "')" + query; - } - <!-- print current query --> ! <span>XPath Query: ! <tt><xsp:expr>query</xsp:expr></tt> </span> <br /> --- 81,87 ---- // ]]> <!-- print current query --> ! <span>XQuery: ! <pre><xsp:expr>query</xsp:expr></pre> </span> <br /> *************** *** 115,123 **** <xdb:execute encoding="ISO-8859-1"> <xdb:xpath>query</xdb:xpath> ! <xsp:logic> hits = <xdb:get-hit-count/>; ! <!-- print a summary of hits per document --> ! <p>Found <xdb:get-hit-count/> hits in <xdb:get-query-time/> ms.</p> --- 106,119 ---- <xdb:execute encoding="ISO-8859-1"> <xdb:xpath>query</xdb:xpath> ! <xsp:logic> hits = <xdb:get-hit-count/>; ! <!-- print a summary of hits per document --> ! <p>Found ! <xsp:expr> ! <xdb:get-hit-count/> ! -1 ! </xsp:expr> ! hits in <xdb:get-query-time/> ms.</p> |
From: <wol...@us...> - 2004-03-08 11:45:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22257/src/org/exist/xquery/parser Modified Files: XQueryParser.java XQuery.g Log Message: * class BrokerPool now detects if a thread does already hold a broker object and increments a reference count instead of returning a new object. Otherwise, deadlock situations could occurr. * documentCache in RpcConnection should be cleared if changes have been made to the database. * implemented missing getMembersAsResource method in RemoteResourceSet. Index: XQueryParser.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/parser/XQueryParser.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** XQueryParser.java 2 Mar 2004 08:35:51 -0000 1.6 --- XQueryParser.java 8 Mar 2004 11:21:22 -0000 1.7 *************** *** 367,370 **** --- 367,371 ---- case LITERAL_every: case LITERAL_if: + case LITERAL_return: case LITERAL_order: case LITERAL_by: *************** *** 2868,2871 **** --- 2869,2873 ---- case LITERAL_every: case LITERAL_if: + case LITERAL_return: case LITERAL_order: case LITERAL_by: *************** *** 3107,3110 **** --- 3109,3113 ---- case LITERAL_every: case LITERAL_if: + case LITERAL_return: case LITERAL_order: case LITERAL_by: *************** *** 3365,3368 **** --- 3368,3372 ---- case LITERAL_every: case LITERAL_if: + case LITERAL_return: case LITERAL_order: case LITERAL_by: *************** *** 3863,3866 **** --- 3867,3871 ---- case LITERAL_every: case LITERAL_if: + case LITERAL_return: case LITERAL_order: case LITERAL_by: *************** *** 3929,3932 **** --- 3934,3938 ---- case LITERAL_every: case LITERAL_if: + case LITERAL_return: case LITERAL_order: case LITERAL_by: *************** *** 4180,4183 **** --- 4186,4190 ---- case LITERAL_every: case LITERAL_if: + case LITERAL_return: case LITERAL_order: case LITERAL_by: *************** *** 4254,4257 **** --- 4261,4265 ---- case LITERAL_every: case LITERAL_if: + case LITERAL_return: case LITERAL_order: case LITERAL_by: *************** *** 4404,4407 **** --- 4412,4416 ---- case LITERAL_every: case LITERAL_if: + case LITERAL_return: case LITERAL_order: case LITERAL_by: *************** *** 4531,4534 **** --- 4540,4544 ---- case LITERAL_every: case LITERAL_if: + case LITERAL_return: case LITERAL_order: case LITERAL_by: *************** *** 5934,5937 **** --- 5944,5959 ---- break; } + case LITERAL_return: + { + org.exist.xquery.parser.XQueryAST tmp366_AST = null; + tmp366_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); + astFactory.addASTChild(currentAST, tmp366_AST); + match(LITERAL_return); + if ( inputState.guessing==0 ) { + name = "return"; + } + reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; + break; + } default: { *************** *** 6115,6134 **** private static final long[] mk_tokenSet_0() { ! long[] data = { -1468195881072197632L, -6760403073825249L, 237823L, 0L, 0L, 0L}; return data; } public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0()); private static final long[] mk_tokenSet_1() { ! long[] data = { -1468195881072197630L, -6760403073825249L, 237823L, 0L, 0L, 0L}; return data; } public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1()); private static final long[] mk_tokenSet_2() { ! long[] data = { -8392629979174666240L, -35576541255629281L, 229411L, 0L, 0L, 0L}; return data; } public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2()); private static final long[] mk_tokenSet_3() { ! long[] data = { -8390378179360980992L, -35576541255629281L, 229603L, 0L, 0L, 0L}; return data; } --- 6137,6156 ---- private static final long[] mk_tokenSet_0() { ! long[] data = { -1468195881072197632L, -6760403073825185L, 237823L, 0L, 0L, 0L}; return data; } public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0()); private static final long[] mk_tokenSet_1() { ! long[] data = { -1468195881072197630L, -6760403073825185L, 237823L, 0L, 0L, 0L}; return data; } public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1()); private static final long[] mk_tokenSet_2() { ! long[] data = { -8392629979174666240L, -35576541255629217L, 229411L, 0L, 0L, 0L}; return data; } public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2()); private static final long[] mk_tokenSet_3() { ! long[] data = { -8390378179360980992L, -35576541255629217L, 229603L, 0L, 0L, 0L}; return data; } *************** *** 6140,6144 **** public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4()); private static final long[] mk_tokenSet_5() { ! long[] data = { -1468336618560552960L, -6760403073825249L, 237823L, 0L, 0L, 0L}; return data; } --- 6162,6166 ---- public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4()); private static final long[] mk_tokenSet_5() { ! long[] data = { -1468336618560552960L, -6760403073825185L, 237823L, 0L, 0L, 0L}; return data; } *************** *** 6155,6169 **** public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7()); private static final long[] mk_tokenSet_8() { ! long[] data = { -6084535170147287040L, -8554943491406305L, 229603L, 0L, 0L, 0L}; return data; } public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8()); private static final long[] mk_tokenSet_9() { ! long[] data = { -8388117446015320064L, -33887691393268193L, 237631L, 0L, 0L, 0L}; return data; } public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9()); private static final long[] mk_tokenSet_10() { ! long[] data = { -6086786969960972288L, -35576541255629281L, 229411L, 0L, 0L, 0L}; return data; } --- 6177,6191 ---- public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7()); private static final long[] mk_tokenSet_8() { ! long[] data = { -6084535170147287040L, -8554943491406241L, 229603L, 0L, 0L, 0L}; return data; } public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8()); private static final long[] mk_tokenSet_9() { ! long[] data = { -8388117446015320064L, -33887691393268129L, 237631L, 0L, 0L, 0L}; return data; } public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9()); private static final long[] mk_tokenSet_10() { ! long[] data = { -6086786969960972288L, -35576541255629217L, 229411L, 0L, 0L, 0L}; return data; } Index: XQuery.g =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/parser/XQuery.g,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XQuery.g 2 Mar 2004 08:35:51 -0000 1.5 --- XQuery.g 8 Mar 2004 11:21:22 -0000 1.6 *************** *** 908,911 **** --- 908,913 ---- | "cast" { name = "cast"; } + | + "return" { name = "return"; } ; |
From: <wol...@us...> - 2004-03-08 11:45:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22257/src/org/exist/xmldb Modified Files: RemoteResourceSet.java LocalResourceSet.java Log Message: * class BrokerPool now detects if a thread does already hold a broker object and increments a reference count instead of returning a new object. Otherwise, deadlock situations could occurr. * documentCache in RpcConnection should be cleared if changes have been made to the database. * implemented missing getMembersAsResource method in RemoteResourceSet. Index: RemoteResourceSet.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteResourceSet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RemoteResourceSet.java 5 Mar 2004 16:15:48 -0000 1.3 --- RemoteResourceSet.java 8 Mar 2004 11:21:22 -0000 1.4 *************** *** 3,9 **** --- 3,12 ---- import java.io.IOException; + import java.io.UnsupportedEncodingException; import java.util.Properties; import java.util.Vector; + import javax.xml.transform.OutputKeys; + import org.apache.xmlrpc.XmlRpcClient; import org.apache.xmlrpc.XmlRpcException; *************** *** 48,53 **** public Resource getMembersAsResource() throws XMLDBException { ! // TODO: implement this ! throw new XMLDBException( ErrorCodes.NOT_IMPLEMENTED ); } --- 51,75 ---- public Resource getMembersAsResource() throws XMLDBException { ! Vector params = new Vector(); ! params.addElement(new Integer(handle)); ! params.addElement(outputProperties); ! try { ! byte[] data = (byte[]) collection.getClient().execute("retrieveAll", params); ! String content; ! try { ! content = new String(data, outputProperties.getProperty(OutputKeys.ENCODING, "UTF-8")); ! } catch (UnsupportedEncodingException ue) { ! content = new String(data); ! } ! RemoteXMLResource res = new RemoteXMLResource( collection, handle, 0, ! "", null ); ! res.setContent( content ); ! res.setProperties(outputProperties); ! return res; ! } catch (XmlRpcException xre) { ! throw new XMLDBException(ErrorCodes.INVALID_RESOURCE, xre.getMessage(), xre); ! } catch (IOException ioe) { ! throw new XMLDBException(ErrorCodes.VENDOR_ERROR, ioe.getMessage(), ioe); ! } } Index: LocalResourceSet.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/LocalResourceSet.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** LocalResourceSet.java 3 Feb 2004 08:33:51 -0000 1.16 --- LocalResourceSet.java 8 Mar 2004 11:21:22 -0000 1.17 *************** *** 18,21 **** --- 18,22 ---- import org.exist.xquery.value.AtomicValue; import org.exist.xquery.value.Item; + import org.exist.xquery.value.NodeValue; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceIterator; *************** *** 117,127 **** "exist:result", attribs); ! Object current; char[] value; for(Iterator i = resources.iterator(); i.hasNext(); ) { ! current = (Object)i.next(); ! if(current instanceof NodeProxy) ! serializer.toSAX((NodeProxy)current); ! else { value = current.toString().toCharArray(); handler.characters(value, 0, value.length); --- 118,128 ---- "exist:result", attribs); ! Item current; char[] value; for(Iterator i = resources.iterator(); i.hasNext(); ) { ! current = (Item)i.next(); ! if(Type.subTypeOf(current.getType(), Type.NODE)) { ! ((NodeValue)current).toSAX(broker, handler); ! } else { value = current.toString().toCharArray(); handler.characters(value, 0, value.length); |
From: <wol...@us...> - 2004-03-08 11:45:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22257/src/org/exist/xmlrpc Modified Files: RpcConnection.java RpcServer.java RpcAPI.java Log Message: * class BrokerPool now detects if a thread does already hold a broker object and increments a reference count instead of returning a new object. Otherwise, deadlock situations could occurr. * documentCache in RpcConnection should be cleared if changes have been made to the database. * implemented missing getMembersAsResource method in RemoteResourceSet. Index: RpcConnection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcConnection.java,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** RpcConnection.java 5 Mar 2004 11:15:28 -0000 1.47 --- RpcConnection.java 8 Mar 2004 11:21:21 -0000 1.48 *************** *** 50,53 **** --- 50,55 ---- import org.exist.util.serializer.DOMSerializer; import org.exist.util.serializer.DOMSerializerPool; + import org.exist.util.serializer.SAXSerializer; + import org.exist.util.serializer.SAXSerializerPool; import org.exist.xquery.PathExpr; import org.exist.xquery.XPathException; *************** *** 69,72 **** --- 71,75 ---- import org.xml.sax.InputSource; import org.xml.sax.SAXException; + import org.xml.sax.helpers.AttributesImpl; import antlr.collections.AST; *************** *** 802,805 **** --- 805,809 ---- LOG.debug("parsing " + docName + " took " + (System.currentTimeMillis() - startTime) + "ms."); + documentCache.clear(); return doc != null; } catch (Exception e) { *************** *** 852,855 **** --- 856,860 ---- } file.delete(); + documentCache.clear(); return doc != null; } *************** *** 861,866 **** try { broker = brokerPool.get(user); - } finally { - brokerPool.release(broker); int p = docName.lastIndexOf('/'); if (p < 0 || p == docName.length() - 1) --- 866,869 ---- *************** *** 879,883 **** --- 882,889 ---- } doc = collection.addBinaryResource(broker, docName, data); + } finally { + brokerPool.release(broker); } + documentCache.clear(); return doc != null; } *************** *** 1052,1055 **** --- 1058,1062 ---- public void releaseQueryResult(int handle) { connectionPool.resultSets.remove(handle); + documentCache.clear(); LOG.debug("removed query result with handle " + handle); } *************** *** 1075,1078 **** --- 1082,1086 ---- else collection.removeDocument(broker, docName); + documentCache.clear(); } finally { brokerPool.release(broker); *************** *** 1087,1090 **** --- 1095,1099 ---- return false; LOG.debug("removing collection " + name); + documentCache.clear(); return broker.removeCollection(name); } finally { *************** *** 1112,1115 **** --- 1121,1125 ---- DocumentImpl doc; if (!documentCache.containsKey(docName)) { + LOG.debug("loading doc " + docName); doc = (DocumentImpl) broker.getDocument(docName); documentCache.put(docName, doc); *************** *** 1129,1134 **** public String retrieve(User user, int resultId, int num, Hashtable parameters) throws Exception { ! DBBroker broker = brokerPool.get(user); try { QueryResult qr = (QueryResult) connectionPool.resultSets .get(resultId); --- 1139,1145 ---- public String retrieve(User user, int resultId, int num, Hashtable parameters) throws Exception { ! DBBroker broker = null; try { + broker = brokerPool.get(user); QueryResult qr = (QueryResult) connectionPool.resultSets .get(resultId); *************** *** 1164,1167 **** --- 1175,1232 ---- } + public String retrieveAll(User user, int resultId, Hashtable parameters) throws Exception { + DBBroker broker = null; + try { + broker = brokerPool.get(user); + QueryResult qr = (QueryResult) connectionPool.resultSets + .get(resultId); + if (qr == null) + throw new EXistException("result set unknown or timed out"); + qr.timestamp = System.currentTimeMillis(); + + Serializer serializer = broker.getSerializer(); + serializer.reset(); + serializer.setProperties(parameters); + + SAXSerializer handler = SAXSerializerPool.getInstance().borrowSAXSerializer(); + handler.setOutputProperties(getProperties(parameters)); + StringWriter writer = new StringWriter(); + handler.setWriter(writer); + + // serialize results + handler.startDocument(); + handler.startPrefixMapping("exist", Serializer.EXIST_NS); + AttributesImpl attribs = new AttributesImpl(); + attribs.addAttribute( + "", + "hitCount", + "hitCount", + "CDATA", + Integer.toString(qr.result.getLength())); + handler.startElement( + Serializer.EXIST_NS, + "result", + "exist:result", + attribs); + Item current; + char[] value; + for(SequenceIterator i = qr.result.iterate(); i.hasNext(); ) { + current = i.nextItem(); + if(Type.subTypeOf(current.getType(), Type.NODE)) + ((NodeValue)current).toSAX(broker, handler); + else { + value = current.toString().toCharArray(); + handler.characters(value, 0, value.length); + } + } + handler.endElement(Serializer.EXIST_NS, "result", "exist:result"); + handler.endPrefixMapping("exist"); + handler.endDocument(); + return writer.toString(); + } finally { + brokerPool.release(broker); + } + } + public void run() { synchronized (this) { Index: RpcServer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcServer.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** RpcServer.java 3 Feb 2004 13:14:48 -0000 1.29 --- RpcServer.java 8 Mar 2004 11:21:21 -0000 1.30 *************** *** 958,961 **** --- 958,985 ---- } } + + /* (non-Javadoc) + * @see org.exist.xmlrpc.RpcAPI#retrieveAll(org.exist.security.User, int, java.util.Hashtable) + */ + public byte[] retrieveAll(User user, int resultId, Hashtable parameters) throws EXistException, PermissionDeniedException { + RpcConnection con = null; + try { + con = pool.get(); + String xml = con.retrieveAll(user, resultId, parameters); + String encoding = (String)parameters.get(OutputKeys.ENCODING); + if(encoding == null) + encoding = "UTF-8"; + try { + return xml.getBytes(encoding); + } catch (UnsupportedEncodingException uee) { + return xml.getBytes(); + } + } catch (Exception e) { + handleException(e); + return null; + } finally { + pool.release(con); + } + } /** Index: RpcAPI.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcAPI.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** RpcAPI.java 3 Feb 2004 13:14:48 -0000 1.23 --- RpcAPI.java 8 Mar 2004 11:21:21 -0000 1.24 *************** *** 231,234 **** --- 231,237 ---- throws EXistException, PermissionDeniedException; + public byte[] retrieveAll(User user, int resultId, Hashtable parameters) + throws EXistException, PermissionDeniedException; + Hashtable queryP(User user, byte[] xpath, Hashtable parameters) throws EXistException, PermissionDeniedException; |
From: <wol...@us...> - 2004-03-08 11:45:38
|
Update of /cvsroot/exist/eXist-1.0/samples/org/exist/examples/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22257/samples/org/exist/examples/xmldb Modified Files: XQueryExample.java Log Message: * class BrokerPool now detects if a thread does already hold a broker object and increments a reference count instead of returning a new object. Otherwise, deadlock situations could occurr. * documentCache in RpcConnection should be cleared if changes have been made to the database. * implemented missing getMembersAsResource method in RemoteResourceSet. Index: XQueryExample.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/samples/org/exist/examples/xmldb/XQueryExample.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** XQueryExample.java 3 Feb 2004 08:33:52 -0000 1.3 --- XQueryExample.java 8 Mar 2004 11:21:22 -0000 1.4 *************** *** 78,85 **** start = System.currentTimeMillis(); ! for ( int i = 0; i < (int) result.getSize(); i++ ) { ! XMLResource resource = (XMLResource) result.getResource( (long) i ); ! System.out.println( resource.getContent().toString() ); ! } long rtime = System.currentTimeMillis() - start; System.out.println("hits: " + result.getSize()); --- 78,86 ---- start = System.currentTimeMillis(); ! System.out.println(result.getMembersAsResource().getContent()); ! // for ( int i = 0; i < (int) result.getSize(); i++ ) { ! // XMLResource resource = (XMLResource) result.getResource( (long) i ); ! // System.out.println( resource.getContent().toString() ); ! // } long rtime = System.currentTimeMillis() - start; System.out.println("hits: " + result.getSize()); |
From: <wol...@us...> - 2004-03-08 11:45:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22257/src/org/exist/xquery Modified Files: XQueryContext.java Log Message: * class BrokerPool now detects if a thread does already hold a broker object and increments a reference count instead of returning a new object. Otherwise, deadlock situations could occurr. * documentCache in RpcConnection should be cleared if changes have been made to the database. * implemented missing getMembersAsResource method in RemoteResourceSet. Index: XQueryContext.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/XQueryContext.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** XQueryContext.java 5 Mar 2004 11:15:29 -0000 1.7 --- XQueryContext.java 8 Mar 2004 11:21:22 -0000 1.8 *************** *** 147,152 **** */ public void declareNamespace(String prefix, String uri) { ! if (prefix == null || uri == null) ! throw new IllegalArgumentException("null argument passed to declareNamespace"); namespaces.put(prefix, uri); prefixes.put(uri, prefix); --- 147,154 ---- */ public void declareNamespace(String prefix, String uri) { ! if (prefix == null) ! prefix = ""; ! if(uri == null) ! uri = ""; namespaces.put(prefix, uri); prefixes.put(uri, prefix); *************** *** 156,162 **** this.namespaces = namespaceMap; Map.Entry entry; for(Iterator i = namespaceMap.entrySet().iterator(); i.hasNext(); ) { entry = (Map.Entry)i.next(); ! prefixes.put(entry.getValue(), entry.getKey()); } } --- 158,171 ---- this.namespaces = namespaceMap; Map.Entry entry; + String prefix, uri; for(Iterator i = namespaceMap.entrySet().iterator(); i.hasNext(); ) { entry = (Map.Entry)i.next(); ! prefix = (String)entry.getKey(); ! uri = (String) entry.getValue(); ! if(prefix == null) ! prefix = ""; ! if(uri == null) ! uri = ""; ! prefixes.put(prefix, uri); } } |
From: <wol...@us...> - 2004-03-08 11:45:37
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22257/src/org/exist/dom Modified Files: ArraySet.java Log Message: * class BrokerPool now detects if a thread does already hold a broker object and increments a reference count instead of returning a new object. Otherwise, deadlock situations could occurr. * documentCache in RpcConnection should be cleared if changes have been made to the database. * implemented missing getMembersAsResource method in RemoteResourceSet. Index: ArraySet.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/ArraySet.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ArraySet.java 5 Mar 2004 16:15:48 -0000 1.29 --- ArraySet.java 8 Mar 2004 11:21:21 -0000 1.30 *************** *** 243,247 **** int pos = search(nodes, 0, counter - 1, p); if (pos < 0) { - System.out.println(p.gid + " not found"); return null; } --- 243,246 ---- |