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
(86) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:41:08
|
Update of /cvsroot/exist/eXist-1.0/webapp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31461/webapp Modified Files: sidebar.xml Log Message: Added News + Wiki links to the sidebar. Index: sidebar.xml =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/sidebar.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** sidebar.xml 1 Mar 2004 13:20:35 -0000 1.19 --- sidebar.xml 21 May 2004 08:40:56 -0000 1.20 *************** *** 2,5 **** --- 2,6 ---- <sidebar title="Navigation" xmlns="http://exist-db.org/NS/sidebar"> <group href="index.xml" name="Home"/> + <group href="http://wiki.exist-db.org" name="News"/> <group name="Donations" href="donations.xml"/> <group name="Documentation"> *************** *** 44,57 **** <link href="changes.xml">Changes</link> </item> <!--item> <link href="design.xml">Design</link> </item--> </group> ! <group name="HowTo"> <item> ! <link href="performance.xml">Performance Issues</link> </item> <item> ! <link href="howtos.xml">Misc</link> </item> </group> --- 45,64 ---- <link href="changes.xml">Changes</link> </item> + <item> + <link href="performance.xml">Performance Issues</link> + </item> + <item> + <link href="howtos.xml">Misc HowTos</link> + </item> <!--item> <link href="design.xml">Design</link> </item--> </group> ! <group name="Community"> <item> ! <link href="#mailing">Mailing List / IRC</link> </item> <item> ! <link href="http://wiki.exist-db.org">Wiki</link> </item> </group> |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:41:07
|
Update of /cvsroot/exist/eXist-1.0/webapp/xquery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31461/webapp/xquery Modified Files: sidebar.xml sitemap.xmap Log Message: Added News + Wiki links to the sidebar. Index: sidebar.xml =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/xquery/sidebar.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sidebar.xml 29 Jan 2004 15:06:46 -0000 1.5 --- sidebar.xml 21 May 2004 08:40:56 -0000 1.6 *************** *** 2,5 **** --- 2,6 ---- <sidebar title="Navigation" xmlns="http://exist-db.org/NS/sidebar"> <group href="../index.xml" name="Home"/> + <group href="http://wiki.exist-db.org" name="News"/> <group name="Donations" href="../donations.xml"/> <group name="Documentation"> *************** *** 44,55 **** <link href="../changes.xml">Changes</link> </item> - </group> - <group name="HowTo"> <item> ! <link href="../performance.xml">Performance HowTo</link> </item> <item> <link href="../howtos.xml">Misc HowTos</link> </item> </group> <group name="Examples"> --- 45,65 ---- <link href="../changes.xml">Changes</link> </item> <item> ! <link href="../performance.xml">Performance Issues</link> </item> <item> <link href="../howtos.xml">Misc HowTos</link> </item> + <!--item> + <link href="design.xml">Design</link> + </item--> + </group> + <group name="Community"> + <item> + <link href="../index.xml#mailing">Mailing List / IRC</link> + </item> + <item> + <link href="http://wiki.exist-db.org">Wiki</link> + </item> </group> <group name="Examples"> *************** *** 65,69 **** </item> <item> - <img src="../resources/new.gif" border="0"/> <link href="xquery.xq">Basic XQuery Interface</link> </item> --- 75,78 ---- Index: sitemap.xmap =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/xquery/sitemap.xmap,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** sitemap.xmap 10 May 2004 12:07:23 -0000 1.12 --- sitemap.xmap 21 May 2004 08:40:56 -0000 1.13 *************** *** 32,37 **** <map:serialize encoding="UTF-8" type="html"/> </map:match> ! ! <map:match pattern="xquery.xq"> <map:generate src="xquery.xq" type="xquery"> </map:generate> --- 32,40 ---- <map:serialize encoding="UTF-8" type="html"/> </map:match> ! <map:match pattern="test.xq"> ! <map:generate src="test.xq" type="xquery"/> ! <map:serialize type="xml"/> ! </map:match> ! <map:match pattern="xquery.xq"> <map:generate src="xquery.xq" type="xquery"> </map:generate> |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:38:37
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30987/src/org/exist/storage/store Modified Files: DOMFile.java Log Message: More fixes related to XUpdate: modified ExtArrayNodeSet to ensure that node sets are correctly ordered. Index: DOMFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/DOMFile.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** DOMFile.java 18 May 2004 14:18:46 -0000 1.27 --- DOMFile.java 21 May 2004 08:38:24 -0000 1.28 *************** *** 1128,1132 **** DOMPage page = getCurrentPage(pnum); pnum = page.getPageHeader().getNextDataPage(); - LOG.debug("REMOVING PAGE " + page.getPageNum() + ": " + page.page.hashCode()); dataCache.remove(page); try { --- 1128,1131 ---- |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:38:37
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/collections In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30987/src/org/exist/collections Modified Files: Collection.java Log Message: More fixes related to XUpdate: modified ExtArrayNodeSet to ensure that node sets are correctly ordered. Index: Collection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/collections/Collection.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Collection.java 10 May 2004 11:22:37 -0000 1.22 --- Collection.java 21 May 2004 08:38:23 -0000 1.23 *************** *** 543,547 **** * Remove the specified document from the collection. * ! *@param name Description of the Parameter */ public void removeDocument(DBBroker broker, String docname) --- 543,547 ---- * Remove the specified document from the collection. * ! *@param name */ public void removeDocument(DBBroker broker, String docname) *************** *** 1123,1127 **** } ! public synchronized BinaryDocument addBinaryResource(DBBroker broker, String name, byte[] data) throws EXistException, PermissionDeniedException, LockException { --- 1123,1127 ---- } ! public BinaryDocument addBinaryResource(DBBroker broker, String name, byte[] data) throws EXistException, PermissionDeniedException, LockException { |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:38:37
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30987/src/org/exist/storage Modified Files: NativeTextEngine.java NativeBroker.java Log Message: More fixes related to XUpdate: modified ExtArrayNodeSet to ensure that node sets are correctly ordered. Index: NativeBroker.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeBroker.java,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** NativeBroker.java 18 May 2004 14:18:45 -0000 1.68 --- NativeBroker.java 21 May 2004 08:38:23 -0000 1.69 *************** *** 472,476 **** } } ! result.sort(); // LOG.debug( // "found " --- 472,476 ---- } } ! // result.sort(); // LOG.debug( // "found " Index: NativeTextEngine.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeTextEngine.java,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** NativeTextEngine.java 18 May 2004 14:18:45 -0000 1.47 --- NativeTextEngine.java 21 May 2004 08:38:23 -0000 1.48 *************** *** 103,106 **** --- 103,107 ---- public final static byte ATTRIBUTE_SECTION = 1; public final static byte TEXT_SECTION = 0; + protected BFile dbWords; protected InvertedIndex invIdx; |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:38:37
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30987/src/org/exist/dom Modified Files: ExtArrayNodeSet.java Log Message: More fixes related to XUpdate: modified ExtArrayNodeSet to ensure that node sets are correctly ordered. Index: ExtArrayNodeSet.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/ExtArrayNodeSet.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ExtArrayNodeSet.java 17 May 2004 09:59:45 -0000 1.16 --- ExtArrayNodeSet.java 21 May 2004 08:38:23 -0000 1.17 *************** *** 300,304 **** public void sort() { ! // long start = System.currentTimeMillis(); if (isSorted) return; --- 300,304 ---- public void sort() { ! // long start = System.currentTimeMillis(); if (isSorted) return; *************** *** 312,317 **** isSorted = true; isInDocumentOrder = false; ! // System.out.println("sort took " + (System.currentTimeMillis() - ! // start) + "ms."); } --- 312,317 ---- isSorted = true; isInDocumentOrder = false; ! // System.out.println("sort took " + (System.currentTimeMillis() - ! // start) + "ms."); } *************** *** 346,352 **** --- 346,388 ---- } + public NodeSet selectParentChild(NodeSet al, int mode, boolean rememberContext) { + sort(); + return super.selectParentChild(al, mode, rememberContext); + } + + + /* (non-Javadoc) + * @see org.exist.dom.AbstractNodeSet#selectAncestorDescendant(org.exist.dom.NodeSet, int, boolean, boolean) + */ + public NodeSet selectAncestorDescendant(NodeSet al, int mode, + boolean includeSelf, boolean rememberContext) { + sort(); + return super.selectAncestorDescendant(al, mode, includeSelf, + rememberContext); + } + + + /* (non-Javadoc) + * @see org.exist.dom.AbstractNodeSet#selectSiblings(org.exist.dom.NodeSet, int) + */ + public NodeSet selectSiblings(NodeSet siblings, int mode) { + sort(); + return super.selectSiblings(siblings, mode); + } + + + /* (non-Javadoc) + * @see org.exist.dom.AbstractNodeSet#selectAncestors(org.exist.dom.NodeSet, boolean, boolean) + */ + public NodeSet selectAncestors(NodeSet al, boolean includeSelf, + boolean rememberContext) { + sort(); + return super.selectAncestors(al, includeSelf, rememberContext); + } + public NodeProxy parentWithChild(DocumentImpl doc, long gid, boolean directParent, boolean includeSelf, int level) { + sort(); Part part = getPart(doc, false, -1); return part == null ? null : part.parentWithChild(gid, directParent, includeSelf, level); |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:38:31
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30987/src/org/exist/xquery Modified Files: LocationStep.java Log Message: More fixes related to XUpdate: modified ExtArrayNodeSet to ensure that node sets are correctly ordered. Index: LocationStep.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/LocationStep.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** LocationStep.java 17 May 2004 09:59:42 -0000 1.7 --- LocationStep.java 21 May 2004 08:38:22 -0000 1.8 *************** *** 120,123 **** --- 120,124 ---- } } + // LOG.debug("processing " + pprint()); Sequence temp; switch (axis) { *************** *** 178,181 **** --- 179,183 ---- throw new IllegalArgumentException("Unsupported axis specified"); } + // LOG.debug("Found: " + temp.getLength()); if(contextSequence instanceof NodeSet) timestamp = ((NodeSet)contextSequence).getState(); |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:37:16
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/http In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30747/src/org/exist/http Modified Files: RESTServer.java Log Message: Fixed concurrent access conflict to the DOM parser in the REST interface. Index: RESTServer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/http/RESTServer.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RESTServer.java 17 May 2004 11:29:50 -0000 1.10 --- RESTServer.java 21 May 2004 08:37:05 -0000 1.11 *************** *** 105,120 **** private final static DateFormat dateFormat = new SimpleDateFormat( "MMM d, yyyy hh:mm:ss"); - - protected DocumentBuilder docBuilder = null; public RESTServer() { - DocumentBuilderFactory docFactory = DocumentBuilderFactory - .newInstance(); - docFactory.setNamespaceAware(true); - try { - docBuilder = docFactory.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - LOG.warn(e); - } } --- 105,110 ---- *************** *** 216,219 **** --- 206,219 ---- try { InputSource src = new InputSource(new StringReader(content)); + DocumentBuilderFactory docFactory = DocumentBuilderFactory + .newInstance(); + docFactory.setNamespaceAware(true); + DocumentBuilder docBuilder = null; + try { + docBuilder = docFactory.newDocumentBuilder(); + } catch (ParserConfigurationException e) { + LOG.warn(e); + throw new BadRequestException(e.getMessage()); + } Document doc = docBuilder.parse(src); Element root = doc.getDocumentElement(); |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:35:55
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/http/webdav/methods In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30445/src/org/exist/http/webdav/methods Modified Files: Delete.java Mkcol.java Put.java Propfind.java Log Message: Improved WebDAV methods and authorization. Index: Mkcol.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/http/webdav/methods/Mkcol.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Mkcol.java 3 May 2004 13:03:34 -0000 1.1 --- Mkcol.java 21 May 2004 08:35:42 -0000 1.2 *************** *** 72,76 **** String path = request.getPathInfo(); if(path == null || path.equals("")) { ! response.sendError(HttpServletResponse.SC_BAD_REQUEST, "no path specified"); return; --- 72,76 ---- String path = request.getPathInfo(); if(path == null || path.equals("")) { ! response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "no path specified"); return; *************** *** 92,96 **** broker.flush(); LOG.debug("created collection " + path); ! response.sendError(HttpServletResponse.SC_CREATED); } catch(EXistException e) { throw new ServletException("Database error: " + e.getMessage(), e); --- 92,96 ---- broker.flush(); LOG.debug("created collection " + path); ! response.setStatus(HttpServletResponse.SC_CREATED); } catch(EXistException e) { throw new ServletException("Database error: " + e.getMessage(), e); Index: Propfind.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/http/webdav/methods/Propfind.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Propfind.java 23 Apr 2004 13:14:02 -0000 1.1 --- Propfind.java 21 May 2004 08:35:42 -0000 1.2 *************** *** 69,72 **** --- 69,74 ---- /** + * Implements the WebDAV PROPFIND method. + * * @author wolf */ *************** *** 107,110 **** --- 109,127 ---- private final static QName COLLECTION_PROP = new QName("collection", WebDAV.DAV_NS, PREFIX); + private final static QName[] DEFAULT_COLLECTION_PROPS = { + DISPLAY_NAME_PROP, + RESOURCE_TYPE_PROP, + CREATION_DATE_PROP, + LAST_MODIFIED_PROP + }; + + private final static QName[] DEFAULT_RESOURCE_PROPS = { + DISPLAY_NAME_PROP, + RESOURCE_TYPE_PROP, + CREATION_DATE_PROP, + LAST_MODIFIED_PROP, + CONTENT_TYPE_PROP + }; + private DocumentBuilderFactory docFactory; private BrokerPool pool; *************** *** 131,171 **** return; } - if(resource != null && (!resource.getPermissions().validate(user, Permission.READ))) { - response.sendError(HttpServletResponse.SC_FORBIDDEN); - return; - } Document doc = parseRequestContent(request, response); - if(doc == null) - return; - Element propfind = doc.getDocumentElement(); - if(!(propfind.getLocalName().equals("propfind") && - propfind.getNamespaceURI().equals(WebDAV.DAV_NS))) { - LOG.debug(UNEXPECTED_ELEMENT_ERR + propfind.getNodeName()); - response.sendError(HttpServletResponse.SC_BAD_REQUEST, - UNEXPECTED_ELEMENT_ERR + propfind.getNodeName()); - return; - } - int type = FIND_ALL_PROPERTIES; DAVProperties searchedProperties = new DAVProperties(); ! NodeList childNodes = propfind.getChildNodes(); ! for(int i = 0; i < childNodes.getLength(); i++) { ! Node currentNode = childNodes.item(i); ! if(currentNode.getNodeType() == Node.ELEMENT_NODE) { ! if(currentNode.getNamespaceURI().equals(WebDAV.DAV_NS)) { ! if(currentNode.getLocalName().equals("prop")) { ! type = FIND_BY_PROPERTY; ! getPropertyNames(currentNode, searchedProperties); } - if(currentNode.getLocalName().equals("allprop")) - type = FIND_ALL_PROPERTIES; - if(currentNode.getLocalName().equals("propname")) - type = FIND_PROPERTY_NAMES; - } else { - // Found an unknown element: return with 400 Bad Request - LOG.debug("Unexpected child: " + currentNode.getNodeName()); - response.sendError(HttpServletResponse.SC_BAD_REQUEST, - UNEXPECTED_ELEMENT_ERR + currentNode.getNodeName()); - return; } } --- 148,184 ---- return; } Document doc = parseRequestContent(request, response); int type = FIND_ALL_PROPERTIES; DAVProperties searchedProperties = new DAVProperties(); ! if(doc != null) { ! Element propfind = doc.getDocumentElement(); ! if(!(propfind.getLocalName().equals("propfind") && ! propfind.getNamespaceURI().equals(WebDAV.DAV_NS))) { ! LOG.debug(UNEXPECTED_ELEMENT_ERR + propfind.getNodeName()); ! response.sendError(HttpServletResponse.SC_BAD_REQUEST, ! UNEXPECTED_ELEMENT_ERR + propfind.getNodeName()); ! return; ! } ! ! NodeList childNodes = propfind.getChildNodes(); ! for(int i = 0; i < childNodes.getLength(); i++) { ! Node currentNode = childNodes.item(i); ! if(currentNode.getNodeType() == Node.ELEMENT_NODE) { ! if(currentNode.getNamespaceURI().equals(WebDAV.DAV_NS)) { ! if(currentNode.getLocalName().equals("prop")) { ! type = FIND_BY_PROPERTY; ! getPropertyNames(currentNode, searchedProperties); ! } ! if(currentNode.getLocalName().equals("allprop")) ! type = FIND_ALL_PROPERTIES; ! if(currentNode.getLocalName().equals("propname")) ! type = FIND_PROPERTY_NAMES; ! } else { ! // Found an unknown element: return with 400 Bad Request ! LOG.debug("Unexpected child: " + currentNode.getNodeName()); ! response.sendError(HttpServletResponse.SC_BAD_REQUEST, ! UNEXPECTED_ELEMENT_ERR + currentNode.getNodeName()); ! return; } } } *************** *** 189,193 **** else writeCollectionProperties(user, searchedProperties, type, collection, serializer, servletPath, depth, 0); ! } serializer.endElement(WebDAV.DAV_NS, "multistatus", "D:multistatus"); --- 202,207 ---- else writeCollectionProperties(user, searchedProperties, type, collection, serializer, servletPath, depth, 0); ! } else if(type == FIND_PROPERTY_NAMES) ! writePropertyNames(collection, resource, serializer, servletPath); serializer.endElement(WebDAV.DAV_NS, "multistatus", "D:multistatus"); *************** *** 241,244 **** --- 255,264 ---- } + if(shouldIncludeProperty(type, searchedProperties, LAST_MODIFIED_PROP)) { + // for collections, the last modification date is the same as the creation date + long created = collection.getCreationTime(); + writeSimpleElement(LAST_MODIFIED_PROP, modificationDateFormat.format(new Date(created)), serializer); + } + serializer.endElement(WebDAV.DAV_NS, "prop", "D:prop"); writeSimpleElement(STATUS_PROP, "HTTP/1.1 200 OK", serializer); *************** *** 266,270 **** DBBroker broker = null; try { ! broker = pool.get(); for(Iterator i = collection.iterator(broker); i.hasNext(); ) { DocumentImpl doc = (DocumentImpl)i.next(); --- 286,290 ---- DBBroker broker = null; try { ! broker = pool.get(user); for(Iterator i = collection.iterator(broker); i.hasNext(); ) { DocumentImpl doc = (DocumentImpl)i.next(); *************** *** 279,294 **** for(Iterator i = collection.collectionIterator(); i.hasNext(); ) { String child = (String)i.next(); - Collection childCollection = null; DBBroker broker = null; try { ! broker = pool.get(); ! childCollection = broker.getCollection(collection.getName() + '/' + child); } catch (Exception e) { } finally { pool.release(broker); } - if(childCollection != null) - writeCollectionProperties(user, searchedProperties, type, childCollection, serializer, - servletPath, maxDepth, currentDepth); } } --- 299,313 ---- for(Iterator i = collection.collectionIterator(); i.hasNext(); ) { String child = (String)i.next(); DBBroker broker = null; try { ! broker = pool.get(user); ! Collection childCollection = broker.getCollection(collection.getName() + '/' + child); ! if(childCollection != null) ! writeCollectionProperties(user, searchedProperties, type, childCollection, serializer, ! servletPath, maxDepth, currentDepth); } catch (Exception e) { } finally { pool.release(broker); } } } *************** *** 334,337 **** --- 353,360 ---- } + if(shouldIncludeProperty(type, searchedProperties, CONTENT_LENGTH_PROP)) { + writeSimpleElement(CONTENT_LENGTH_PROP, "0", serializer); + } + if(shouldIncludeProperty(type, searchedProperties, CONTENT_TYPE_PROP)) { if(resource.getResourceType() == DocumentImpl.XML_FILE) *************** *** 363,366 **** --- 386,413 ---- } + private void writePropertyNames(Collection collection, DocumentImpl resource, SAXSerializer serializer, + String servletPath) + throws SAXException { + AttributesImpl attrs = new AttributesImpl(); + serializer.startElement(WebDAV.DAV_NS, "response", "D:response", attrs); + // write D:href + serializer.startElement(WebDAV.DAV_NS, "href", "D:href", attrs); + String href = servletPath + (resource != null ? resource.getFileName() : collection.getName()); + serializer.characters(href); + serializer.endElement(WebDAV.DAV_NS, "href", "D:href"); + + serializer.startElement(WebDAV.DAV_NS, "propstat", "D:propstat", attrs); + serializer.startElement(WebDAV.DAV_NS, "prop", "D:prop", attrs); + QName[] defaults = resource == null ? DEFAULT_COLLECTION_PROPS : DEFAULT_RESOURCE_PROPS; + for(int i = 0; i < defaults.length; i++) { + writeEmptyElement(defaults[i], serializer); + } + serializer.endElement(WebDAV.DAV_NS, "prop", "D:prop"); + writeSimpleElement(STATUS_PROP, "HTTP/1.1 200 OK", serializer); + + serializer.endElement(WebDAV.DAV_NS, "propstat", "D:propstat"); + serializer.endElement(WebDAV.DAV_NS, "response", "D:response"); + } + private boolean shouldIncludeProperty(int type, DAVProperties properties, QName name) { if(type == FIND_ALL_PROPERTIES) *************** *** 415,420 **** --- 462,471 ---- private Document parseRequestContent(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + if(request.getContentLength() == 0) + return null; try { String content = getRequestContent(request); + if(content.length() == 0) + return null; LOG.debug("request:\n" + content); Index: Delete.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/http/webdav/methods/Delete.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Delete.java 23 Apr 2004 13:14:02 -0000 1.1 --- Delete.java 21 May 2004 08:35:42 -0000 1.2 *************** *** 63,70 **** DBBroker broker = null; try { ! broker = pool.get(); ! if(resource == null) broker.removeCollection(collection.getName()); ! else { String path = resource.getFileName(); int p = path.lastIndexOf('/'); --- 63,70 ---- DBBroker broker = null; try { ! broker = pool.get(user); ! if(resource == null) { broker.removeCollection(collection.getName()); ! } else { String path = resource.getFileName(); int p = path.lastIndexOf('/'); *************** *** 86,89 **** --- 86,90 ---- pool.release(broker); } + response.setStatus(HttpServletResponse.SC_NO_CONTENT); } } Index: Put.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/http/webdav/methods/Put.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Put.java 3 May 2004 13:03:34 -0000 1.2 --- Put.java 21 May 2004 08:35:42 -0000 1.3 *************** *** 79,83 **** DBBroker broker = null; try { ! broker = pool.get(); if(collection == null) { if(path == null) --- 79,83 ---- DBBroker broker = null; try { ! broker = pool.get(user); if(collection == null) { if(path == null) |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:35:52
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/http/webdav In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30445/src/org/exist/http/webdav Modified Files: WebDAVMethod.java WebDAV.java Added Files: WebDAVMethodFactory.java Log Message: Improved WebDAV methods and authorization. Index: WebDAV.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/http/webdav/WebDAV.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WebDAV.java 3 May 2004 13:03:34 -0000 1.2 --- WebDAV.java 21 May 2004 08:35:42 -0000 1.3 *************** *** 24,29 **** import java.io.IOException; - import java.util.HashMap; - import java.util.Map; import java.util.Properties; --- 24,27 ---- *************** *** 40,45 **** import org.exist.http.servlets.BasicAuthenticator; import org.exist.http.servlets.DigestAuthenticator; - import org.exist.http.webdav.methods.*; - import org.exist.security.Permission; import org.exist.security.PermissionDeniedException; import org.exist.security.User; --- 38,41 ---- *************** *** 49,52 **** --- 45,50 ---- /** + * The main class for processing WebDAV requests. + * * @author wolf */ *************** *** 75,79 **** private Authenticator digestAuth, basicAuth; - private Map supportedMethods = new HashMap(); private BrokerPool pool; --- 73,76 ---- *************** *** 85,99 **** } - supportedMethods.put("OPTIONS", new Options()); - supportedMethods.put("GET", new Get(pool)); - supportedMethods.put("HEAD", new Head()); - supportedMethods.put("PROPFIND", new Propfind(pool)); - supportedMethods.put("PUT", new Put(pool)); - supportedMethods.put("DELETE", new Delete(pool)); - supportedMethods.put("MKCOL", new Mkcol(pool)); digestAuth = new DigestAuthenticator(pool); basicAuth = new BasicAuthenticator(pool); } public void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { --- 82,98 ---- } digestAuth = new DigestAuthenticator(pool); basicAuth = new BasicAuthenticator(pool); } + /** + * Process a WebDAV request. The request is delegated to the corresponding + * {@link WebDAVMethod} after authenticating the user. + * + * @param request + * @param response + * @throws ServletException + * @throws IOException + */ public void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { *************** *** 101,108 **** if(user == null) return; - String path = request.getPathInfo(); ! if(path == null || path.length() == 0 || path.equals("/")) ! path = "/db"; if(path.endsWith("/")) path = path.substring(0, path.length() - 1); --- 100,108 ---- if(user == null) return; String path = request.getPathInfo(); ! if(path == null || path.length() == 0 || path.equals("/")) { ! response.sendRedirect(request.getRequestURI() + "/db"); ! return; ! } if(path.endsWith("/")) path = path.substring(0, path.length() - 1); *************** *** 122,126 **** collection = resource.getCollection(); } ! method = (WebDAVMethod)supportedMethods.get(request.getMethod()); if(method == null) { response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, --- 122,126 ---- collection = resource.getCollection(); } ! method = WebDAVMethodFactory.create(request.getMethod(), pool); if(method == null) { response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, Index: WebDAVMethod.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/http/webdav/WebDAVMethod.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WebDAVMethod.java 23 Apr 2004 13:14:02 -0000 1.1 --- WebDAVMethod.java 21 May 2004 08:35:42 -0000 1.2 *************** *** 35,38 **** --- 35,40 ---- /** + * Interface for all WebDAV methods. + * * @author wolf */ *************** *** 41,44 **** --- 43,59 ---- final static Logger LOG = Logger.getLogger(WebDAVMethod.class); + /** + * Process a WebDAV request. The collection and resource parameters + * are set to the corresponding objects selected by the request path. + * The user parameter represents a valid database user. + * + * @param user + * @param request + * @param response + * @param collection + * @param resource + * @throws ServletException + * @throws IOException + */ void process(User user, HttpServletRequest request, HttpServletResponse response, Collection collection, DocumentImpl resource) --- NEW FILE: WebDAVMethodFactory.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-04 Wolfgang M. Meier * wol...@ex... * http://exist-db.org * * 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: WebDAVMethodFactory.java,v 1.1 2004/05/21 08:35:42 wolfgang_m Exp $ */ package org.exist.http.webdav; import org.exist.http.webdav.methods.Delete; import org.exist.http.webdav.methods.Get; import org.exist.http.webdav.methods.Head; import org.exist.http.webdav.methods.Mkcol; import org.exist.http.webdav.methods.Options; import org.exist.http.webdav.methods.Propfind; import org.exist.http.webdav.methods.Put; import org.exist.storage.BrokerPool; /** * Create a {@link WebDAVMethod} for the method specified in the * HTTP request. * * @author wolf */ public class WebDAVMethodFactory { public final static WebDAVMethod create(String method, BrokerPool pool) { if(method.equals("OPTIONS")) return new Options(); else if(method.equals("GET")) return new Get(pool); else if(method.equals("HEAD")) return new Head(); else if(method.equals("PUT")) return new Put(pool); else if(method.equals("DELETE")) return new Delete(pool); else if(method.equals("MKCOL")) return new Mkcol(pool); else if(method.equals("PROPFIND")) return new Propfind(pool); else return null; } } |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:35:52
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/http/servlets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30445/src/org/exist/http/servlets Modified Files: Authenticator.java BasicAuthenticator.java WebDAVServlet.java DigestAuthenticator.java Log Message: Improved WebDAV methods and authorization. Index: BasicAuthenticator.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/http/servlets/BasicAuthenticator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BasicAuthenticator.java 23 Apr 2004 13:14:02 -0000 1.1 --- BasicAuthenticator.java 21 May 2004 08:35:41 -0000 1.2 *************** *** 78,82 **** public void sendChallenge(HttpServletRequest request, HttpServletResponse response) throws IOException { - // TODO Auto-generated method stub } } --- 78,81 ---- Index: DigestAuthenticator.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/http/servlets/DigestAuthenticator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DigestAuthenticator.java 23 Apr 2004 13:14:02 -0000 1.1 --- DigestAuthenticator.java 21 May 2004 08:35:41 -0000 1.2 *************** *** 24,28 **** --- 24,30 ---- import java.io.IOException; + import java.io.UnsupportedEncodingException; import java.security.MessageDigest; + import java.security.NoSuchAlgorithmException; import javax.servlet.http.HttpServletRequest; *************** *** 35,38 **** --- 37,42 ---- /** + * An Authenticator that uses MD5 Digest Authentication. + * * @author wolf */ *************** *** 142,146 **** public boolean check(String credentials) throws IOException { ! try{ MessageDigest md = MessageDigest.getInstance("MD5"); --- 146,153 ---- public boolean check(String credentials) throws IOException { ! if(credentials == null) ! // no password set for the user: return true ! return true; ! try { MessageDigest md = MessageDigest.getInstance("MD5"); *************** *** 161,169 **** // check digest - System.out.println(MD5.byteArrayToHex(digest) + " = " + response); return (MD5.byteArrayToHex(digest).equalsIgnoreCase(response)); ! } catch (Exception e) { ! throw new IOException("Internal error while checking digest"); } } } --- 168,178 ---- // check digest return (MD5.byteArrayToHex(digest).equalsIgnoreCase(response)); ! } catch (NoSuchAlgorithmException e) { ! throw new RuntimeException("MD5 not supported"); ! } catch (UnsupportedEncodingException e) { ! throw new RuntimeException("Encoding not supported"); } + } } Index: Authenticator.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/http/servlets/Authenticator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Authenticator.java 23 Apr 2004 13:14:02 -0000 1.1 --- Authenticator.java 21 May 2004 08:35:41 -0000 1.2 *************** *** 29,39 **** --- 29,56 ---- /** + * Interface for HTTP authentication methods. + * * @author wolf */ public interface Authenticator { + /** + * Try to authenticate the user specified in the HTTP request. + * + * @param request + * @param response + * @return + * @throws IOException + */ public User authenticate(HttpServletRequest request, HttpServletResponse response) throws IOException; + /** + * Send an WWW-Authenticate header back to client. + * + * @param request + * @param response + * @throws IOException + */ public void sendChallenge(HttpServletRequest request, HttpServletResponse response) throws IOException; Index: WebDAVServlet.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/http/servlets/WebDAVServlet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WebDAVServlet.java 23 Apr 2004 13:14:02 -0000 1.1 --- WebDAVServlet.java 21 May 2004 08:35:41 -0000 1.2 *************** *** 34,37 **** --- 34,43 ---- import org.exist.http.webdav.WebDAV; + /** + * Provides a WebDAV interface to the database. All WebDAV requests + * are delegated to the {@link org.exist.http.webdav.WebDAV} class. + * + * @author wolf + */ public class WebDAVServlet extends HttpServlet { |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:32:33
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29825/src/org/exist/xmldb Modified Files: LocalXMLResource.java DatabaseImpl.java RemoteXMLResource.java RemoteUserManagementService.java RemoteResourceSet.java RemoteCollectionManagementService.java RemoteCollection.java Log Message: * RemoteCollection no longer caches the resource listing for a collection. This implies more network traffic, but also less memory consumption on the client side. * XMLDB methods can now be applied to resources retrieved from a query result if these resources point to the document root node. Index: RemoteCollectionManagementService.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteCollectionManagementService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RemoteCollectionManagementService.java 5 May 2004 11:14:46 -0000 1.2 --- RemoteCollectionManagementService.java 21 May 2004 08:32:14 -0000 1.3 *************** *** 39,43 **** } RemoteCollection collection = ! new RemoteCollection( client, (RemoteCollection) parent, null, name ); parent.addChildCollection( collection ); return collection; --- 39,43 ---- } RemoteCollection collection = ! new RemoteCollection( client, (RemoteCollection) parent, name ); parent.addChildCollection( collection ); return collection; Index: RemoteCollection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteCollection.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RemoteCollection.java 15 Apr 2004 09:24:16 -0000 1.12 --- RemoteCollection.java 21 May 2004 08:32:14 -0000 1.13 *************** *** 36,40 **** import java.util.Map; import java.util.Properties; - import java.util.Random; import java.util.Vector; --- 36,39 ---- *************** *** 65,75 **** protected Permission permissions = null; protected RemoteCollection parent = null; - protected List resources = null; protected XmlRpcClient rpcClient = null; protected Properties properties = null; ! ! public RemoteCollection(XmlRpcClient client, String host, String collection) throws XMLDBException { ! this(client, null, host, collection); } --- 64,73 ---- protected Permission permissions = null; protected RemoteCollection parent = null; protected XmlRpcClient rpcClient = null; protected Properties properties = null; ! ! public RemoteCollection(XmlRpcClient client, String collection) throws XMLDBException { ! this(client, null, collection); } *************** *** 77,85 **** XmlRpcClient client, RemoteCollection parent, - String host, String collection) throws XMLDBException { - this.name = collection; this.parent = parent; this.rpcClient = client; } --- 75,82 ---- XmlRpcClient client, RemoteCollection parent, String collection) throws XMLDBException { this.parent = parent; + this.name = collection; this.rpcClient = client; } *************** *** 91,100 **** } - protected void addResource(String id) throws XMLDBException { - if (childCollections == null) - readCollection(); - resources.add(id); - } - public void close() throws XMLDBException { try { --- 88,91 ---- *************** *** 108,129 **** public String createId() throws XMLDBException { ! if (childCollections == null) ! readCollection(); ! String id; ! Random rand = new Random(); ! boolean ok; ! do { ! ok = true; ! id = Integer.toHexString(rand.nextInt()) + ".xml"; ! // check if this id does already exist ! for (int i = 0; i < resources.size(); i++) ! if (((DocumentProxy) resources.get(i)).getName().equals(id)) ! ok = false; ! ! if (childCollections.containsKey(id)) ! ok = false; ! ! } while (!ok); ! return id; } --- 99,111 ---- public String createId() throws XMLDBException { ! Vector params = new Vector(1); ! params.addElement(getPath()); ! try { ! return (String)rpcClient.execute("createResourceId", params); ! } catch (XmlRpcException e) { ! throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, "failed to close collection", e); ! } catch (IOException e) { ! throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, "failed to close collection", e); ! } } *************** *** 164,173 **** public Collection getParentCollection() throws XMLDBException { return parent; } public String getPath() throws XMLDBException { ! if (parent == null) ! return "/db"; return name; } --- 146,163 ---- public Collection getParentCollection() throws XMLDBException { + if(parent == null && !name.equals("/db")) { + String parentName = name.substring(0, name.lastIndexOf('/')); + return new RemoteCollection(rpcClient, null, parentName); + } return parent; } public String getPath() throws XMLDBException { ! if (parent == null) { ! if(name != null) ! return name; ! else ! return "/db"; ! } return name; } *************** *** 183,213 **** return properties; } - - public Resource getResource(String id) throws XMLDBException { - if (childCollections == null) - readCollection(); - int rlen = resources.size(); - DocumentProxy dp; - for (int i = 0; i < rlen; i++) { - dp = (DocumentProxy) resources.get(i); - if (dp.getName().equals(id)) { - if(dp.getType() == null || dp.getType().equals("XMLResource")) { - RemoteXMLResource r = new RemoteXMLResource(this, -1, -1, dp.getName(), null); - r.setPermissions(dp.getPermissions()); - return r; - } else { - RemoteBinaryResource r = new RemoteBinaryResource(this, dp.getName()); - r.setPermissions(dp.getPermissions()); - return r; - } - } - } - return null; - } public int getResourceCount() throws XMLDBException { ! if (childCollections == null) ! readCollection(); ! return resources.size(); } --- 173,187 ---- return properties; } public int getResourceCount() throws XMLDBException { ! Vector params = new Vector(1); ! params.addElement(getPath()); ! try { ! return ((Integer)rpcClient.execute("getResourceCount", params)).intValue(); ! } catch (XmlRpcException e) { ! throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, "failed to close collection", e); ! } catch (IOException e) { ! throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, "failed to close collection", e); ! } } *************** *** 279,289 **** public String[] listResources() throws XMLDBException { ! if (childCollections == null) ! readCollection(); ! int lsize = resources.size(); ! String[] list = new String[lsize]; ! for (int i = 0; i < lsize; i++) ! list[i] = ((DocumentProxy) resources.get(i)).getName(); ! return list; } --- 253,273 ---- public String[] listResources() throws XMLDBException { ! Vector params = new Vector(); ! params.addElement(getPath()); ! try { ! Vector vec = (Vector)rpcClient.execute("getDocumentListing", params); ! String[] resources = new String[vec.size()]; ! return (String[])vec.toArray(resources); ! } catch (XmlRpcException xre) { ! throw new XMLDBException(ErrorCodes.VENDOR_ERROR, xre.getMessage(), xre); ! } catch (IOException ioe) { ! throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, "an io error occurred", ioe); ! } ! // List resources = readResources(); ! // int lsize = resources.size(); ! // String[] list = new String[lsize]; ! // for (int i = 0; i < lsize; i++) ! // list[i] = ((DocumentProxy) resources.get(i)).getName(); ! // return list; } *************** *** 295,304 **** } ! private void readCollection() throws XMLDBException { ! resources = new ArrayList(); ! childCollections = new HashMap(); ! Vector params = new Vector(); params.addElement(getPath()); - Hashtable collection; try { --- 279,321 ---- } ! public Resource getResource(String name) throws XMLDBException { ! Vector params = new Vector(); ! params.addElement(getPath() + '/' + name); ! Hashtable hash; ! try { ! hash = (Hashtable) rpcClient.execute("describeResource", params); ! } catch (XmlRpcException xre) { ! throw new XMLDBException(ErrorCodes.VENDOR_ERROR, xre.getMessage(), xre); ! } catch (IOException ioe) { ! throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, "an io error occurred", ioe); ! } ! Permission perm; ! String docName = (String) hash.get("name"); ! int p; ! if ((p = docName.lastIndexOf('/')) > -1) ! docName = docName.substring(p + 1); ! DocumentProxy proxy = new DocumentProxy(docName); ! perm = ! new Permission( ! (String) hash.get("owner"), ! (String) hash.get("group"), ! ((Integer) hash.get("permissions")).intValue()); ! proxy.setPermissions(perm); ! proxy.setType((String)hash.get("type")); ! if(proxy.getType() == null || proxy.getType().equals("XMLResource")) { ! RemoteXMLResource r = new RemoteXMLResource(this, -1, -1, proxy.getName(), null); ! r.setPermissions(proxy.getPermissions()); ! return r; ! } else { ! RemoteBinaryResource r = new RemoteBinaryResource(this, proxy.getName()); ! r.setPermissions(proxy.getPermissions()); ! return r; ! } ! } ! ! private List readResources() throws XMLDBException { ! List resources = new ArrayList(); ! Vector params = new Vector(); params.addElement(getPath()); Hashtable collection; try { *************** *** 310,319 **** } Vector documents = (Vector) collection.get("documents"); - Vector collections = (Vector) collection.get("collections"); - permissions = - new Permission( - (String) collection.get("owner"), - (String) collection.get("group"), - ((Integer) collection.get("permissions")).intValue()); String docName; String childName; --- 327,330 ---- *************** *** 337,345 **** resources.add(proxy); } for (int i = 0; i < collections.size(); i++) { childName = (String) collections.elementAt(i); try { RemoteCollection child = ! new RemoteCollection(rpcClient, this, null, getPath() + '/' + childName); addChildCollection(child); } catch (XMLDBException e) { --- 348,379 ---- resources.add(proxy); } + return resources; + } + + private void readCollection() throws XMLDBException { + childCollections = new HashMap(); + Vector params = new Vector(); + params.addElement(getPath()); + + Hashtable collection; + try { + collection = (Hashtable) rpcClient.execute("describeCollection", params); + } catch (XmlRpcException xre) { + throw new XMLDBException(ErrorCodes.VENDOR_ERROR, xre.getMessage(), xre); + } catch (IOException ioe) { + throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, "an io error occurred", ioe); + } + Vector collections = (Vector) collection.get("collections"); + permissions = + new Permission( + (String) collection.get("owner"), + (String) collection.get("group"), + ((Integer) collection.get("permissions")).intValue()); + String childName; for (int i = 0; i < collections.size(); i++) { childName = (String) collections.elementAt(i); try { RemoteCollection child = ! new RemoteCollection(rpcClient, this, getPath() + '/' + childName); addChildCollection(child); } catch (XMLDBException e) { *************** *** 359,376 **** public void removeResource(Resource res) throws XMLDBException { - if (resources == null) - readCollection(); - int pos = -1; - for (int i = 0; i < resources.size(); i++) - if (((DocumentProxy) resources.get(i)).getName().equals(res.getId())) { - pos = i; - break; - } - if (pos < 0) - throw new XMLDBException( - ErrorCodes.INVALID_RESOURCE, - "resource " + res.getId() + " not found"); Vector params = new Vector(); params.addElement(getPath() + '/' + res.getId()); try { --- 393,399 ---- public void removeResource(Resource res) throws XMLDBException { Vector params = new Vector(); params.addElement(getPath() + '/' + res.getId()); + System.out.println("Removing " + params.elementAt(0)); try { *************** *** 381,386 **** throw new XMLDBException(ErrorCodes.VENDOR_ERROR, ioe.getMessage(), ioe); } - - resources.remove(pos); } --- 404,407 ---- *************** *** 404,412 **** public void storeResource(Resource res) throws XMLDBException { - if (resources == null) - readCollection(); - for (int i = 0; i < resources.size(); i++) - if (((DocumentProxy) resources.get(i)).getName().equals(res.getId())) - resources.remove(i); Object content = res.getContent(); if (content instanceof File) { --- 425,428 ---- *************** *** 425,429 **** else store((RemoteXMLResource)res); - resources.add(new DocumentProxy(res.getId(), res.getResourceType())); } --- 441,444 ---- Index: LocalXMLResource.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/LocalXMLResource.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** LocalXMLResource.java 18 May 2004 14:18:47 -0000 1.33 --- LocalXMLResource.java 21 May 2004 08:32:14 -0000 1.34 *************** *** 312,316 **** public String getId() throws XMLDBException { ! return id < 0 ? docId : Long.toString(id); } --- 312,316 ---- public String getId() throws XMLDBException { ! return id < 2 ? docId : Long.toString(id); } Index: DatabaseImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/DatabaseImpl.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** DatabaseImpl.java 11 May 2004 08:10:39 -0000 1.15 --- DatabaseImpl.java 21 May 2004 08:32:14 -0000 1.16 *************** *** 90,94 **** temp = '/' + temp; Collection current = ! new RemoteCollection( rpcClient, null, address, temp ); while ( current != null && tok.hasMoreTokens() ) { temp = tok.nextToken(); --- 90,94 ---- temp = '/' + temp; Collection current = ! new RemoteCollection( rpcClient, null, temp ); while ( current != null && tok.hasMoreTokens() ) { temp = tok.nextToken(); Index: RemoteXMLResource.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteXMLResource.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RemoteXMLResource.java 6 Feb 2004 10:00:31 -0000 1.12 --- RemoteXMLResource.java 21 May 2004 08:32:14 -0000 1.13 *************** *** 210,214 **** public String getId() throws XMLDBException { ! return (id == null) ? documentName : documentName + '_' + id; } --- 210,216 ---- public String getId() throws XMLDBException { ! if (id == null || id.equals("1")) ! return documentName; ! return documentName + '_' + id; } Index: RemoteResourceSet.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteResourceSet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RemoteResourceSet.java 8 Mar 2004 11:21:22 -0000 1.4 --- RemoteResourceSet.java 21 May 2004 08:32:14 -0000 1.5 *************** *** 78,82 **** return null; // node or value? ! if ( resources.elementAt( (int) pos ) instanceof Vector ) { // node Vector v = (Vector) resources.elementAt( (int) pos ); --- 78,82 ---- return null; // node or value? ! if ( resources.elementAt( (int) pos ) instanceof Vector ) { // node Vector v = (Vector) resources.elementAt( (int) pos ); *************** *** 84,87 **** --- 84,88 ---- String s_id = (String) v.elementAt( 1 ); String path = doc.substring(0, doc.lastIndexOf('/')); + System.out.println("Processing " + doc); RemoteCollection parent = new RemoteCollection(collection.getClient(), null, path); Index: RemoteUserManagementService.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteUserManagementService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RemoteUserManagementService.java 3 Feb 2004 13:14:54 -0000 1.3 --- RemoteUserManagementService.java 21 May 2004 08:32:14 -0000 1.4 *************** *** 300,303 **** --- 300,304 ---- return ((EXistResource)res).getPermissions(); String path = ((RemoteCollection) res.getParentCollection()).getPath() + '/' + res.getId(); + System.out.println("Retrieving permissions for " + path); try { Vector params = new Vector(); |
From: Wolfgang M. M. <wol...@us...> - 2004-05-21 08:32:31
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29825/src/org/exist/xmlrpc Modified Files: RpcServer.java RpcAPI.java RpcConnection.java Log Message: * RemoteCollection no longer caches the resource listing for a collection. This implies more network traffic, but also less memory consumption on the client side. * XMLDB methods can now be applied to resources retrieved from a query result if these resources point to the document root node. Index: RpcServer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcServer.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** RpcServer.java 20 May 2004 13:09:35 -0000 1.33 --- RpcServer.java 21 May 2004 08:32:15 -0000 1.34 *************** *** 1,4 **** --- 1,24 ---- /* + <<<<<<< RpcServer.java + * eXist Open Source Native XML Database Copyright (C) 2001-03, Wolfgang M. + * Meier (me...@if...) + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Library General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) any [...2846 lines suppressed...] - return baos.toByteArray(); - } - - private static byte[] uncompress(byte[] whatToUncompress) - throws IOException { - ByteArrayInputStream bais = new ByteArrayInputStream(whatToUncompress); - ZipInputStream gzis = new ZipInputStream(bais); - ZipEntry zipentry = gzis.getNextEntry(); - int len = Integer.parseInt(zipentry.getName()); - ByteArrayOutputStream baos = new ByteArrayOutputStream(len); - byte[] buf = new byte[512]; - int bread; - while ((bread = gzis.read(buf)) != -1) - baos.write(buf, 0, bread); - gzis.closeEntry(); - gzis.close(); - return baos.toByteArray(); - } } --- 1565,1567 ---- Index: RpcAPI.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcAPI.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** RpcAPI.java 20 May 2004 13:09:10 -0000 1.26 --- RpcAPI.java 21 May 2004 08:32:15 -0000 1.27 *************** *** 200,203 **** --- 200,222 ---- throws EXistException, PermissionDeniedException; + Hashtable describeCollection(User user, String collectionName) + throws EXistException, PermissionDeniedException; + + Hashtable describeResource(User user, String resourceName) + throws EXistException, PermissionDeniedException; + + /** + * Returns the number of resources in the collection identified by + * collectionName. + * + * @param user + * @param collection + * @return + * @throws EXistException + * @throws PermissionDeniedException + */ + int getResourceCount(User user, String collectionName) + throws EXistException, PermissionDeniedException; + /** * Retrieve a single node from a document. The node is identified by it's *************** *** 341,344 **** --- 360,366 ---- throws EXistException, PermissionDeniedException; + String createResourceId(User user, String collection) + throws EXistException, PermissionDeniedException; + /** * Parse an XML document and store it into the database. The document will Index: RpcConnection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcConnection.java,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** RpcConnection.java 20 May 2004 13:10:08 -0000 1.56 --- RpcConnection.java 21 May 2004 08:32:15 -0000 1.57 *************** *** 325,328 **** --- 325,390 ---- } + Hashtable describeResource(User user, String resourceName) + throws EXistException, PermissionDeniedException { + DBBroker broker = brokerPool.get(user); + try { + DocumentImpl doc = (DocumentImpl) broker.getDocument(resourceName); + if (doc == null) { + LOG.debug("document " + resourceName + " not found!"); + throw new EXistException("document not found"); + } + if (!doc.getCollection().getPermissions().validate(user, Permission.READ)) { + throw new PermissionDeniedException("Not allowed to read collection"); + } + Hashtable desc = new Hashtable(); + Vector collections = new Vector(); + Permission perms = doc.getPermissions(); + Hashtable hash = new Hashtable(5); + hash.put("name", doc.getFileName()); + hash.put("owner", perms.getOwner()); + hash.put("group", perms.getOwnerGroup()); + hash + .put("permissions", new Integer(perms + .getPermissions())); + hash.put("type", + doc.getResourceType() == DocumentImpl.BINARY_FILE + ? "BinaryResource" + : "XMLResource"); + return hash; + } finally { + brokerPool.release(broker); + } + } + + public Hashtable describeCollection(User user, String rootCollection) + throws Exception { + DBBroker broker = brokerPool.get(user); + try { + if (rootCollection == null) + rootCollection = "/db"; + + Collection collection = broker.getCollection(rootCollection); + if (collection == null) + throw new EXistException("collection " + rootCollection + + " not found!"); + Hashtable desc = new Hashtable(); + Vector collections = new Vector(); + if (collection.getPermissions().validate(user, Permission.READ)) { + for (Iterator i = collection.collectionIterator(); i.hasNext(); ) + collections.addElement((String) i.next()); + } + Permission perms = collection.getPermissions(); + desc.put("collections", collections); + desc.put("name", collection.getName()); + desc.put("created", Long.toString(collection.getCreationTime())); + desc.put("owner", perms.getOwner()); + desc.put("group", perms.getOwnerGroup()); + desc.put("permissions", new Integer(perms.getPermissions())); + return desc; + } finally { + brokerPool.release(broker); + } + } + public String getDocument(User user, String name, Hashtable parametri) throws Exception { *************** *** 579,584 **** Collection collection = broker.getCollection(name); Vector vec = new Vector(); ! if (collection == null) return vec; String resource; int p; --- 641,648 ---- Collection collection = broker.getCollection(name); Vector vec = new Vector(); ! if (collection == null) { ! LOG.debug("collection " + name + " not found."); return vec; + } String resource; int p; *************** *** 594,597 **** --- 658,707 ---- } + public int getResourceCount(User user, String collectionName) + throws EXistException, PermissionDeniedException { + DBBroker broker = null; + try { + broker = brokerPool.get(user); + if (!collectionName.startsWith("/")) + collectionName = '/' + collectionName; + if (!collectionName.startsWith("/db")) + collectionName = "/db" + collectionName; + Collection collection = broker.getCollection(collectionName); + return collection.getDocumentCount(); + } finally { + brokerPool.release(broker); + } + } + + public String createResourceId(User user, String collectionName) + throws EXistException, PermissionDeniedException { + DBBroker broker = null; + try { + broker = brokerPool.get(user); + if (!collectionName.startsWith("/")) + collectionName = '/' + collectionName; + if (!collectionName.startsWith("/db")) + collectionName = "/db" + collectionName; + Collection collection = broker.getCollection(collectionName); + String id; + Random rand = new Random(); + boolean ok; + do { + ok = true; + id = Integer.toHexString(rand.nextInt()) + ".xml"; + // check if this id does already exist + if (collection.hasDocument(id)) + ok = false; + + if (collection.hasSubcollection(id)) + ok = false; + + } while (!ok); + return id; + } finally { + brokerPool.release(broker); + } + } + public Hashtable listDocumentPermissions(User user, String name) throws EXistException, PermissionDeniedException { |
From: Giulio V. <gva...@us...> - 2004-05-20 13:10:17
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6428/src/org/exist/xmlrpc Modified Files: RpcConnection.java Log Message: Add getDocumentChunk method Index: RpcConnection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcConnection.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** RpcConnection.java 18 May 2004 14:18:47 -0000 1.55 --- RpcConnection.java 20 May 2004 13:10:08 -0000 1.56 *************** *** 77,80 **** --- 77,81 ---- import antlr.collections.AST; + import java.io.RandomAccessFile; /** *************** *** 1766,1768 **** --- 1767,1786 ---- } + // FIXME: Check it for possible security hole. Check name. + public byte[] getDocumentChunk(User user, String name, int start, int len) + throws EXistException, PermissionDeniedException, IOException { + File file = new File(System.getProperty("java.io.tmpdir") + + File.separator + name); + if (!file.canRead()) + throw new EXistException("unable to read file " + name); + if (file.length() < start+len) + throw new EXistException("address too big " + name); + byte buffer[] = new byte[len]; + RandomAccessFile os = new RandomAccessFile(file.getAbsolutePath(), "r"); + LOG.debug("Read from: " + start + " to: " + (start + len)); + os.seek(start); + int reada = os.read(buffer); + os.close(); + return buffer; + } } |
From: Giulio V. <gva...@us...> - 2004-05-20 13:09:48
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6331/src/org/exist/xmlrpc Modified Files: RpcServer.java Log Message: Add getDocumentChunk method Index: RpcServer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcServer.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** RpcServer.java 1 Apr 2004 09:40:07 -0000 1.32 --- RpcServer.java 20 May 2004 13:09:35 -0000 1.33 *************** *** 43,46 **** --- 43,49 ---- import org.exist.util.hashtable.Int2ObjectHashMap; import org.xml.sax.SAXException; + import java.io.IOException; + import java.io.FileOutputStream; + /** *************** *** 1392,1419 **** } ! private static byte[] compress(byte[] whatToCompress) throws IOException { ! ByteArrayOutputStream baos = new ByteArrayOutputStream(); ! ZipOutputStream gzos = new ZipOutputStream(baos); ! gzos.setMethod(gzos.DEFLATED); ! gzos.putNextEntry(new ZipEntry(whatToCompress.length+"")); ! gzos.write(whatToCompress); ! gzos.closeEntry(); ! gzos.finish(); ! gzos.close(); ! return baos.toByteArray(); ! } ! private static byte[] uncompress(byte[] whatToUncompress) throws IOException { ! ByteArrayInputStream bais = new ByteArrayInputStream(whatToUncompress); ! ZipInputStream gzis = new ZipInputStream(bais); ! ZipEntry zipentry = gzis.getNextEntry(); ! int len = Integer.parseInt(zipentry.getName()); ! ByteArrayOutputStream baos = new ByteArrayOutputStream(len); ! byte[] buf = new byte[512]; ! int bread; ! while ((bread = gzis.read(buf)) != -1) baos.write(buf, 0, bread); ! gzis.closeEntry(); ! gzis.close(); ! return baos.toByteArray(); ! } } --- 1395,1455 ---- } ! ! //FIXME: Check it for possible security hole. The name of file is not generated in random mode ! public Vector getDocumentChunk(User user, String name, Hashtable parameters) ! throws EXistException, PermissionDeniedException, IOException { ! Vector result = new Vector(); ! File file; ! file = File.createTempFile("rpc", ".xml"); ! FileOutputStream os = new FileOutputStream(file.getAbsolutePath(), true); ! os.write(getDocument(user, name, parameters)); ! os.close(); ! result.addElement(file.getName()); ! result.addElement(Long.toString(file.length())); ! file.deleteOnExit(); ! LOG.debug("The file is created with name: "+file.getName()); ! return result; ! } ! ! public byte[] getDocumentChunk(User user, String name, int start, int len) ! throws EXistException, PermissionDeniedException, IOException { ! RpcConnection con = pool.get(); ! try { ! return con.getDocumentChunk(user, name, start, len); ! } finally { ! pool.release(con); ! } ! } ! ! ! ! ! private static byte[] compress(byte[] whatToCompress) throws IOException { ! ByteArrayOutputStream baos = new ByteArrayOutputStream(); ! ZipOutputStream gzos = new ZipOutputStream(baos); ! gzos.setMethod(gzos.DEFLATED); ! gzos.putNextEntry(new ZipEntry(whatToCompress.length + "")); ! gzos.write(whatToCompress); ! gzos.closeEntry(); ! gzos.finish(); ! gzos.close(); ! return baos.toByteArray(); ! } ! ! private static byte[] uncompress(byte[] whatToUncompress) ! throws IOException { ! ByteArrayInputStream bais = new ByteArrayInputStream(whatToUncompress); ! ZipInputStream gzis = new ZipInputStream(bais); ! ZipEntry zipentry = gzis.getNextEntry(); ! int len = Integer.parseInt(zipentry.getName()); ! ByteArrayOutputStream baos = new ByteArrayOutputStream(len); ! byte[] buf = new byte[512]; ! int bread; ! while ((bread = gzis.read(buf)) != -1) ! baos.write(buf, 0, bread); ! gzis.closeEntry(); ! gzis.close(); ! return baos.toByteArray(); ! } } |
From: Giulio V. <gva...@us...> - 2004-05-20 13:09:20
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6285/src/org/exist/xmlrpc Modified Files: RpcAPI.java Log Message: Add getDocumentChunk method Index: RpcAPI.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcAPI.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** RpcAPI.java 30 Mar 2004 16:56:32 -0000 1.25 --- RpcAPI.java 20 May 2004 13:09:10 -0000 1.26 *************** *** 24,27 **** --- 24,28 ---- import java.util.Hashtable; import java.util.Vector; + import java.io.IOException; import org.exist.EXistException; *************** *** 670,672 **** --- 671,679 ---- boolean copyCollection(User user, String name, String namedest) throws PermissionDeniedException, EXistException; + + Vector getDocumentChunk(User user, String name, Hashtable parameters) + throws EXistException, PermissionDeniedException, IOException; + + byte[] getDocumentChunk(User user, String name, int start, int stop) + throws EXistException, PermissionDeniedException, IOException; } |
From: Wolfgang M. M. <wol...@us...> - 2004-05-19 12:01:36
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18678/src/org/exist/storage/cache Modified Files: ClockCache.java Log Message: Removed log statement. Index: ClockCache.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache/ClockCache.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ClockCache.java 18 May 2004 14:18:46 -0000 1.13 --- ClockCache.java 19 May 2004 12:01:24 -0000 1.14 *************** *** 100,104 **** old = items[bucket]; if (old != null) { - LOG.debug("REMOVING " + old.getKey()); map.remove(old.getKey()); old.sync(); --- 100,103 ---- |
From: Wolfgang M. M. <wol...@us...> - 2004-05-19 08:19:04
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10684/src/org/exist/xquery/parser Modified Files: XQueryLexer.java XQueryParser.java XQuery.g Log Message: Fixed lexer to properly recognize numeric values in scientific notation. Index: XQueryParser.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/parser/XQueryParser.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** XQueryParser.java 17 May 2004 09:59:43 -0000 1.9 --- XQueryParser.java 19 May 2004 08:18:50 -0000 1.10 *************** *** 111,424 **** public final void imaginaryTokenDefinitions() throws RecognitionException, TokenStreamException { ! returnAST = null; ! ASTPair currentAST = new ASTPair(); ! org.exist.xquery.parser.XQueryAST imaginaryTokenDefinitions_AST = null; ! ! org.exist.xquery.parser.XQueryAST tmp79_AST = null; ! tmp79_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); ! astFactory.addASTChild(currentAST, tmp79_AST); ! match(QNAME); [...12050 lines suppressed...] ! astFactory.addASTChild(currentAST, tmp367_AST); ! match(LITERAL_return); ! if ( inputState.guessing==0 ) { ! name = "return"; ! } ! reservedKeywords_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; ! break; } ! default: ! { ! throw new NoViableAltException(LT(1), getFilename()); ! } ! } ! returnAST = reservedKeywords_AST; ! return name; ! } finally { // debugging ! traceOut("reservedKeywords"); } } Index: XQueryLexer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/parser/XQueryLexer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** XQueryLexer.java 17 May 2004 09:59:43 -0000 1.6 --- XQueryLexer.java 19 May 2004 08:18:36 -0000 1.7 *************** *** 3265,3279 **** { mDIGITS(false); - match('.'); { ! if ((_tokenSet_3.member(LA(1)))) { ! mDIGITS(false); } ! else if ((LA(1)=='E'||LA(1)=='e')) { } ! else { [...2172 lines suppressed...] ! data[124]=-3233808385L; ! data[125]=4611686017001275199L; ! data[126]=6908521828386340863L; ! data[127]=2295745090394464220L; ! data[132]=83837761617920L; ! data[134]=7L; ! data[192]=4389456576640L; ! data[193]=-2L; ! data[194]=-8587837441L; ! data[195]=576460752303423487L; ! data[196]=35184372088800L; ! for (int i = 312; i<=637; i++) { data[i]=-1L; } ! data[638]=274877906943L; ! for (int i = 688; i<=861; i++) { data[i]=-1L; } ! data[862]=68719476735L; ! return data; ! } ! public static final BitSet _tokenSet_20 = new BitSet(mk_tokenSet_20()); ! } Index: XQuery.g =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/parser/XQuery.g,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** XQuery.g 17 May 2004 09:59:43 -0000 1.10 --- XQuery.g 19 May 2004 08:18:50 -0000 1.11 *************** *** 2463,2474 **** : { !(inElementContent || inAttributeContent) }? ! ( ( '.' DIGITS ) | ( DIGITS '.' ( DIGITS )? ) ) ( 'e' | 'E' ) ( '+' | '-' )? DIGITS ; protected DECIMAL_LITERAL : ! { !(inElementContent || inAttributeContent) }? ! ( '.' DIGITS ) | ( DIGITS '.' ) => ! ( '.' DIGITS ) | ( DIGITS '.' ( DIGITS )? ) ; --- 2463,2473 ---- : { !(inElementContent || inAttributeContent) }? ! ( ( '.' DIGITS ) | ( DIGITS ( '.' ( DIGIT )* )? ) ) ( 'e' | 'E' ) ( '+' | '-' )? DIGITS ; protected DECIMAL_LITERAL : ! { !(inElementContent || inAttributeContent) }? ! ( '.' DIGITS ) | ( DIGITS ( '.' ( DIGIT )* )? ) ; *************** *** 2610,2613 **** --- 2609,2615 ---- => PARENT { $setType(PARENT); } | + ( '.' INTEGER_LITERAL ( 'e' | 'E' ) ) + => DECIMAL_LITERAL { $setType(DECIMAL_LITERAL); } + | ( '.' INTEGER_LITERAL ) => DECIMAL_LITERAL { $setType(DECIMAL_LITERAL); } *************** *** 2616,2620 **** => SELF { $setType(SELF); } | ! ( DECIMAL_LITERAL ( 'e' | 'E' ) ) => DOUBLE_LITERAL { $setType(DOUBLE_LITERAL); } --- 2618,2622 ---- => SELF { $setType(SELF); } | ! ( INTEGER_LITERAL ( '.' ( INTEGER_LITERAL )? )? ( 'e' | 'E' ) ) => DOUBLE_LITERAL { $setType(DOUBLE_LITERAL); } |
From: Wolfgang M. M. <wol...@us...> - 2004-05-18 14:19:20
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/cocoon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6898/src/org/exist/cocoon Modified Files: XQueryGenerator.java Log Message: XUpdate fixes: nodes not found after multiple XUpdates. Index: XQueryGenerator.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/cocoon/XQueryGenerator.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** XQueryGenerator.java 17 May 2004 09:59:44 -0000 1.17 --- XQueryGenerator.java 18 May 2004 14:18:40 -0000 1.18 *************** *** 23,29 **** package org.exist.cocoon; - import java.io.ByteArrayOutputStream; import java.io.IOException; - import java.io.InputStream; import java.util.HashMap; import java.util.Iterator; --- 23,27 ---- |
From: Wolfgang M. M. <wol...@us...> - 2004-05-18 14:18:58
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6898/src/org/exist/xmlrpc Modified Files: RpcConnection.java Log Message: XUpdate fixes: nodes not found after multiple XUpdates. Index: RpcConnection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcConnection.java,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** RpcConnection.java 17 May 2004 09:59:44 -0000 1.54 --- RpcConnection.java 18 May 2004 14:18:47 -0000 1.55 *************** *** 8,12 **** import java.io.StringReader; import java.io.StringWriter; - import java.net.MalformedURLException; import java.net.URI; import java.util.Date; --- 8,11 ---- *************** *** 53,58 **** import org.exist.util.Occurrences; import org.exist.util.SyntaxException; - import org.exist.util.serializer.DOMSerializer; - import org.exist.util.serializer.DOMSerializerPool; import org.exist.util.serializer.SAXSerializer; import org.exist.util.serializer.SAXSerializerPool; --- 52,55 ---- *************** *** 74,78 **** import org.w3c.dom.Document; import org.w3c.dom.DocumentType; - import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; --- 71,74 ---- |
From: Wolfgang M. M. <wol...@us...> - 2004-05-18 14:18:58
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xupdate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6898/src/org/exist/xupdate Modified Files: XUpdateProcessor.java Rename.java Append.java Insert.java Remove.java Modification.java Update.java Log Message: XUpdate fixes: nodes not found after multiple XUpdates. Index: XUpdateProcessor.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xupdate/XUpdateProcessor.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** XUpdateProcessor.java 10 May 2004 11:22:38 -0000 1.22 --- XUpdateProcessor.java 18 May 2004 14:18:46 -0000 1.23 *************** *** 245,261 **** if (localName.equals("append")) { String child = atts.getValue("child"); ! modification = new Append(broker, documentSet, select, child); } else if (localName.equals("update")) ! modification = new Update(broker, documentSet, select); else if (localName.equals("insert-before")) modification = ! new Insert(broker, documentSet, select, Insert.INSERT_BEFORE); else if (localName.equals("insert-after")) modification = ! new Insert(broker, documentSet, select, Insert.INSERT_AFTER); else if (localName.equals("remove")) ! modification = new Remove(broker, documentSet, select); else if (localName.equals("rename")) ! modification = new Rename(broker, documentSet, select); // process commands for node creation --- 245,261 ---- if (localName.equals("append")) { String child = atts.getValue("child"); ! modification = new Append(broker, documentSet, select, child, namespaces); } else if (localName.equals("update")) ! modification = new Update(broker, documentSet, select, namespaces); else if (localName.equals("insert-before")) modification = ! new Insert(broker, documentSet, select, Insert.INSERT_BEFORE, namespaces); else if (localName.equals("insert-after")) modification = ! new Insert(broker, documentSet, select, Insert.INSERT_AFTER, namespaces); else if (localName.equals("remove")) ! modification = new Remove(broker, documentSet, select, namespaces); else if (localName.equals("rename")) ! modification = new Rename(broker, documentSet, select, namespaces); // process commands for node creation Index: Append.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xupdate/Append.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Append.java 10 May 2004 11:22:38 -0000 1.14 --- Append.java 18 May 2004 14:18:46 -0000 1.15 *************** *** 1,4 **** --- 1,6 ---- package org.exist.xupdate; + import java.util.Map; + import org.exist.EXistException; import org.exist.collections.Collection; *************** *** 25,30 **** * @param selectStmt */ ! public Append(DBBroker broker, DocumentSet docs, String selectStmt, String childAttr) { ! super(broker, docs, selectStmt); if(childAttr == null || childAttr.equals("last()")) child = -1; --- 27,33 ---- * @param selectStmt */ ! public Append(DBBroker broker, DocumentSet docs, String selectStmt, ! String childAttr, Map namespaces) { ! super(broker, docs, selectStmt, namespaces); if(childAttr == null || childAttr.equals("last()")) child = -1; Index: Update.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xupdate/Update.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Update.java 10 May 2004 11:22:38 -0000 1.12 --- Update.java 18 May 2004 14:18:46 -0000 1.13 *************** *** 6,9 **** --- 6,11 ---- package org.exist.xupdate; + import java.util.Map; + import org.exist.EXistException; import org.exist.collections.Collection; *************** *** 28,33 **** * @param selectStmt */ ! public Update(DBBroker broker, DocumentSet docs, String selectStmt) { ! super(broker, docs, selectStmt); } --- 30,35 ---- * @param selectStmt */ ! public Update(DBBroker broker, DocumentSet docs, String selectStmt, Map namespaces) { ! super(broker, docs, selectStmt, namespaces); } Index: Insert.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xupdate/Insert.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Insert.java 29 Jan 2004 15:06:45 -0000 1.12 --- Insert.java 18 May 2004 14:18:46 -0000 1.13 *************** *** 1,4 **** --- 1,6 ---- package org.exist.xupdate; + import java.util.Map; + import org.apache.log4j.Logger; import org.exist.EXistException; *************** *** 33,43 **** * @param selectStmt */ ! public Insert(DBBroker broker, DocumentSet docs, String selectStmt) { ! super(broker, docs, selectStmt); } public Insert(DBBroker broker, DocumentSet docs, ! String selectStmt, int mode) { ! this(broker, docs, selectStmt); this.mode = mode; } --- 35,45 ---- * @param selectStmt */ ! public Insert(DBBroker broker, DocumentSet docs, String selectStmt, Map namespaces) { ! super(broker, docs, selectStmt, namespaces); } public Insert(DBBroker broker, DocumentSet docs, ! String selectStmt, int mode, Map namespaces) { ! this(broker, docs, selectStmt, namespaces); this.mode = mode; } Index: Modification.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xupdate/Modification.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Modification.java 10 May 2004 11:22:38 -0000 1.22 --- Modification.java 18 May 2004 14:18:46 -0000 1.23 *************** *** 4,7 **** --- 4,10 ---- import java.util.ArrayList; import java.util.Comparator; + import java.util.HashMap; + import java.util.Iterator; + import java.util.Map; import org.apache.log4j.Logger; *************** *** 42,53 **** protected DBBroker broker; protected DocumentSet docs; /** * Constructor for Modification. */ ! public Modification(DBBroker broker, DocumentSet docs, String selectStmt) { this.selectStmt = selectStmt; this.broker = broker; this.docs = docs; } --- 45,59 ---- protected DBBroker broker; protected DocumentSet docs; + protected Map namespaces; /** * Constructor for Modification. */ ! public Modification(DBBroker broker, DocumentSet docs, String selectStmt, ! Map namespaces) { this.selectStmt = selectStmt; this.broker = broker; this.docs = docs; + this.namespaces = new HashMap(namespaces); } *************** *** 65,68 **** --- 71,81 ---- XQueryContext context = new XQueryContext(broker); context.setStaticallyKnownDocuments(docs); + Map.Entry entry; + for (Iterator i = namespaces.entrySet().iterator(); i.hasNext();) { + entry = (Map.Entry) i.next(); + context.declareNamespace( + (String) entry.getKey(), + (String) entry.getValue()); + } XQueryLexer lexer = new XQueryLexer(new StringReader(selectStmt)); XQueryParser parser = new XQueryParser(lexer); Index: Remove.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xupdate/Remove.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Remove.java 29 Jan 2004 15:06:45 -0000 1.10 --- Remove.java 18 May 2004 14:18:46 -0000 1.11 *************** *** 1,4 **** --- 1,6 ---- package org.exist.xupdate; + import java.util.Map; + import org.apache.log4j.Logger; import org.exist.EXistException; *************** *** 28,33 **** * @param selectStmt */ ! public Remove(DBBroker broker, DocumentSet docs, String selectStmt) { ! super(broker, docs, selectStmt); } --- 30,35 ---- * @param selectStmt */ ! public Remove(DBBroker broker, DocumentSet docs, String selectStmt, Map namespaces) { ! super(broker, docs, selectStmt, namespaces); } Index: Rename.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xupdate/Rename.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Rename.java 27 Apr 2004 15:46:57 -0000 1.12 --- Rename.java 18 May 2004 14:18:46 -0000 1.13 *************** *** 1,4 **** --- 1,6 ---- package org.exist.xupdate; + import java.util.Map; + import org.exist.EXistException; import org.exist.collections.Collection; *************** *** 23,28 **** * @param selectStmt */ ! public Rename(DBBroker broker, DocumentSet docs, String selectStmt) { ! super(broker, docs, selectStmt); } --- 25,30 ---- * @param selectStmt */ ! public Rename(DBBroker broker, DocumentSet docs, String selectStmt, Map namespaces) { ! super(broker, docs, selectStmt, namespaces); } |
From: Wolfgang M. M. <wol...@us...> - 2004-05-18 14:18:58
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6898/src/org/exist/storage/store Modified Files: DOMFile.java NodeIterator.java Log Message: XUpdate fixes: nodes not found after multiple XUpdates. Index: DOMFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/DOMFile.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** DOMFile.java 17 May 2004 09:54:41 -0000 1.26 --- DOMFile.java 18 May 2004 14:18:46 -0000 1.27 *************** *** 317,321 **** if (dataLen + value.length + 4 < fileHeader.getWorkSize()) { // LOG ! // .debug("copying data in page " + rec.page.getPageNum() // + "; offset = " + rec.offset + "; dataLen = " // + dataLen); --- 317,321 ---- if (dataLen + value.length + 4 < fileHeader.getWorkSize()) { // LOG ! // .debug("copying data in page " + rec.page.getPageNum() + "; " + rec.page.page.hashCode() // + "; offset = " + rec.offset + "; dataLen = " // + dataLen); *************** *** 370,373 **** --- 370,375 ---- } // write the data + // LOG.debug("inserting " + new String(value) + " to " + rec.page.page.getPageInfo() + "; " + + // rec.page.page.hashCode()); short tid = rec.page.getPageHeader().getNextTID(); ByteConversion.shortToByte((short) tid, rec.page.data, rec.offset); *************** *** 1027,1031 **** public void remove(long p) { RecordPos rec = findRecord(p); ! // LOG.debug("removing value from " + rec.page.getPageNum()); int startOffset = rec.offset - 2; DOMFilePageHeader ph = rec.page.getPageHeader(); --- 1029,1033 ---- public void remove(long p) { RecordPos rec = findRecord(p); ! // LOG.debug("removing value " + rec.tid + " from " + rec.page.getPageNum() + "; " + rec.page.page.hashCode()); int startOffset = rec.offset - 2; DOMFilePageHeader ph = rec.page.getPageHeader(); *************** *** 1126,1129 **** --- 1128,1132 ---- DOMPage page = getCurrentPage(pnum); pnum = page.getPageHeader().getNextDataPage(); + LOG.debug("REMOVING PAGE " + page.getPageNum() + ": " + page.page.hashCode()); dataCache.remove(page); try { Index: NodeIterator.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/NodeIterator.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** NodeIterator.java 11 May 2004 07:50:40 -0000 1.9 --- NodeIterator.java 18 May 2004 14:18:46 -0000 1.10 *************** *** 199,205 **** p = rec.page; startAddress = -1; ! } else if (page > -1) p = db.getCurrentPage(page); ! else return false; return true; --- 199,207 ---- p = rec.page; startAddress = -1; ! } else if (page > -1) { p = db.getCurrentPage(page); ! db.addToBuffer(p); ! // LOG.debug("reading " + p.page.getPageNum() + "; " + p.page.hashCode()); ! } else return false; return true; |
From: Wolfgang M. M. <wol...@us...> - 2004-05-18 14:18:57
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6898/src/org/exist/xmldb Modified Files: LocalXMLResource.java Log Message: XUpdate fixes: nodes not found after multiple XUpdates. Index: LocalXMLResource.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/LocalXMLResource.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** LocalXMLResource.java 17 May 2004 09:59:42 -0000 1.32 --- LocalXMLResource.java 18 May 2004 14:18:47 -0000 1.33 *************** *** 81,85 **** this.document = doc; this.docId = doc.getFileName(); - System.out.println(docId); if (docId.indexOf('/') > -1) docId = docId.substring(docId.lastIndexOf('/') + 1); --- 81,84 ---- |
From: Wolfgang M. M. <wol...@us...> - 2004-05-18 14:18:57
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6898/src/org/exist/storage/cache Modified Files: ClockCache.java Log Message: XUpdate fixes: nodes not found after multiple XUpdates. Index: ClockCache.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache/ClockCache.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ClockCache.java 3 May 2004 12:58:11 -0000 1.12 --- ClockCache.java 18 May 2004 14:18:46 -0000 1.13 *************** *** 100,103 **** --- 100,104 ---- old = items[bucket]; if (old != null) { + LOG.debug("REMOVING " + old.getKey()); map.remove(old.getKey()); old.sync(); |
From: Wolfgang M. M. <wol...@us...> - 2004-05-18 14:18:56
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6898/src/org/exist/storage Modified Files: NativeTextEngine.java NativeBroker.java Log Message: XUpdate fixes: nodes not found after multiple XUpdates. Index: NativeBroker.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeBroker.java,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** NativeBroker.java 17 May 2004 09:54:41 -0000 1.67 --- NativeBroker.java 18 May 2004 14:18:45 -0000 1.68 *************** *** 397,401 **** public NodeSet findElementsByTagName(byte type, DocumentSet docs, QName qname, NodeSelector selector) { ! final long start = System.currentTimeMillis(); final ExtArrayNodeSet result = new ExtArrayNodeSet(docs.getLength(), 256); DocumentImpl doc; --- 397,401 ---- public NodeSet findElementsByTagName(byte type, DocumentSet docs, QName qname, NodeSelector selector) { ! // final long start = System.currentTimeMillis(); final ExtArrayNodeSet result = new ExtArrayNodeSet(docs.getLength(), 256); DocumentImpl doc; *************** *** 472,476 **** } } ! // result.sort(); // LOG.debug( // "found " --- 472,476 ---- } } ! result.sort(); // LOG.debug( // "found " *************** *** 2197,2203 **** public Object start() { long address = previous.getInternalAddress(); ! if (address > -1) address = domDb.insertAfter(doc, address, data); ! else { NodeRef ref = new NodeRef(doc.getDocId(), previous.getGID()); address = domDb.insertAfter(doc, ref, data); --- 2197,2203 ---- public Object start() { long address = previous.getInternalAddress(); ! if (address > -1) { address = domDb.insertAfter(doc, address, data); ! } else { NodeRef ref = new NodeRef(doc.getDocId(), previous.getGID()); address = domDb.insertAfter(doc, ref, data); Index: NativeTextEngine.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeTextEngine.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** NativeTextEngine.java 17 May 2004 09:54:41 -0000 1.46 --- NativeTextEngine.java 18 May 2004 14:18:45 -0000 1.47 *************** *** 295,299 **** if (stoplist.contains(expr)) return null; ! // long start = System.currentTimeMillis(); DocumentImpl doc; Value ref; --- 295,299 ---- if (stoplist.contains(expr)) return null; ! long start = System.currentTimeMillis(); DocumentImpl doc; Value ref; *************** *** 373,387 **** if (contextSet != null) ((ExtArrayNodeSet) result).sort(); ! // LOG.debug( ! // "found " ! // + expr ! // + ": " ! // + result.getLength() ! // + " (" ! // + count ! // + ") " ! // + " in " ! // + (System.currentTimeMillis() - start) ! // + "ms."); return result; } --- 373,387 ---- if (contextSet != null) ((ExtArrayNodeSet) result).sort(); ! LOG.debug( ! "found " ! + expr ! + ": " ! + result.getLength() ! + " (" ! + count ! + ") " ! + " in " ! + (System.currentTimeMillis() - start) ! + "ms."); return result; } |