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
(51) |
Sep
(65) |
Oct
(91) |
Nov
(18) |
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
|
2
|
3
|
4
(2) |
5
(12) |
6
|
|
7
(1) |
8
(9) |
9
|
10
|
11
|
12
|
13
|
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
|
21
|
22
|
23
|
24
(1) |
25
(13) |
26
(1) |
27
|
|
28
|
29
(10) |
30
(7) |
31
(1) |
|
|
|
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-31 12:33:55
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/analysis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23288/src/org/exist/storage/analysis Modified Files: SimpleTokenizer.java Log Message: Text tokenizer got caught in an endless loop. Index: SimpleTokenizer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/analysis/SimpleTokenizer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SimpleTokenizer.java 2 Oct 2003 12:20:19 -0000 1.6 --- SimpleTokenizer.java 31 Mar 2004 12:22:07 -0000 1.7 *************** *** 43,50 **** char ch = LA(1); int count = 0; ! while (ch != (char) - 1) { if (ch == '\\' && isWildcard(LA(2))) { break; ! } else if (singleCharToken(ch)) { // if this is a single char token and first in the sequence, // consume it --- 43,51 ---- char ch = LA(1); int count = 0; ! while (ch != (char) -1) { if (ch == '\\' && isWildcard(LA(2))) { break; ! } ! if (singleCharToken(ch)) { // if this is a single char token and first in the sequence, // consume it *************** *** 55,59 **** } break; ! } else if (isNonBreakingCharacter(ch) || (allowWildcards && isWildcard(ch))) { token.consumeNext(); consume(); --- 56,60 ---- } break; ! } else if (Character.isLetter(ch) || nonBreakingChar(ch) || (allowWildcards && isWildcard(ch))) { token.consumeNext(); consume(); *************** *** 291,299 **** } - private boolean isNonBreakingCharacter(char ch) { - return Character.isLetter(ch) - && (!singleCharToken(ch)); - } - /** * The code ranges defined here should be interpreted as 1-char --- 292,295 ---- *************** *** 348,365 **** public static void main(String args[]) { ! String t1 = "\u30A8\u31A1\uACFF\u2FAA\u312A\u3045"; String t2 = "é¸å®çè¥ç©¶åºä¸æ³ä»¥é¸ä½éªå¸«åå ¶è¨æ¯ æ¬²è¶ "; String t3 = "문ì ì¬ì© ìì ì¤ë¥ë¥¼ ì°¾ìë´ê¸° ìí´ ê²ì¦ë ì¤êµì´ íì ì¬ê²í íê³ , ë³´ë¤ ì½ê¸° ì½ê² í기 ìí´ ì¸ì´ì ííì ë¤ë¬ëë¤."; ! for(int i = 0; i < t2.length(); i++) { ! char ch = t2.charAt(i); ! System.out.print( ! Integer.toHexString(ch) + ' ' ! ); ! } SimpleTokenizer tokenizer = new SimpleTokenizer(); ! tokenizer.setText(t3); TextToken token = tokenizer.nextToken(true); while(token != null && token.getType() != TextToken.EOF) { ! System.out.println(token.getText()); token = tokenizer.nextToken(true); } --- 344,361 ---- public static void main(String args[]) { ! String t1 = "\u30A8\u30FB\u31A1\uACFF\u2FAA\u312A\u3045"; String t2 = "é¸å®çè¥ç©¶åºä¸æ³ä»¥é¸ä½éªå¸«åå ¶è¨æ¯ æ¬²è¶ "; String t3 = "문ì ì¬ì© ìì ì¤ë¥ë¥¼ ì°¾ìë´ê¸° ìí´ ê²ì¦ë ì¤êµì´ íì ì¬ê²í íê³ , ë³´ë¤ ì½ê¸° ì½ê² í기 ìí´ ì¸ì´ì ííì ë¤ë¬ëë¤."; ! // for(int i = 0; i < t2.length(); i++) { ! // char ch = t2.charAt(i); ! // System.out.print( ! // Integer.toHexString(ch) + ' ' ! // ); ! // } SimpleTokenizer tokenizer = new SimpleTokenizer(); ! tokenizer.setText(t2); TextToken token = tokenizer.nextToken(true); while(token != null && token.getType() != TextToken.EOF) { ! //System.out.println(token.getText()); token = tokenizer.nextToken(true); } |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-30 17:24:31
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11617/src/org/exist/xquery/functions/text Added Files: TextRank.java Log Message: Added the text ranking example function. This is just an example and not meant for real use. --- NEW FILE: TextRank.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-03 Wolfgang M. Meier * wol...@ex... * http://exist.sourceforge.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: TextRank.java,v 1.1 2004/03/30 17:12:52 wolfgang_m Exp $ */ package org.exist.xquery.functions.text; import java.util.Set; import java.util.TreeSet; import org.exist.dom.Match; import org.exist.dom.NodeProxy; import org.exist.dom.QName; import org.exist.xquery.BasicFunction; import org.exist.xquery.Cardinality; import org.exist.xquery.FunctionSignature; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; import org.exist.xquery.value.DoubleValue; import org.exist.xquery.value.NodeValue; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; import org.exist.xquery.value.Type; /** * @author wolf */ public class TextRank extends BasicFunction { public final static FunctionSignature signature = new FunctionSignature( new QName("text-rank", TextModule.NAMESPACE_URI, TextModule.PREFIX), "This is just a skeleton for a possible ranking function. Don't use this.", new SequenceType[]{ new SequenceType(Type.NODE, Cardinality.ZERO_OR_ONE)}, new SequenceType(Type.DOUBLE, Cardinality.EXACTLY_ONE)); public TextRank(XQueryContext context) { super(context, signature); } /* (non-Javadoc) * @see org.exist.xquery.BasicFunction#eval(org.exist.xquery.value.Sequence[], org.exist.xquery.value.Sequence) */ public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException { // return 0.0 if the argument sequence is empty if(args[0].getLength() == 0) return DoubleValue.ZERO; NodeValue val = (NodeValue)args[0].itemAt(0); // Ranking cannot be applied to constructed nodes if(val.getImplementationType() == NodeValue.IN_MEMORY_NODE) return DoubleValue.ZERO; NodeProxy proxy = (NodeProxy)val; // this is a persistent node, so casting is safe Set distinctTerms = new TreeSet(); Match nextMatch = proxy.match; // we just count the number of distinct terms matched while(nextMatch != null) { distinctTerms.add(nextMatch.getMatchingTerm()); nextMatch = nextMatch.getNextMatch(); } return new DoubleValue(distinctTerms.size()); } } |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-30 17:08:13
|
Update of /cvsroot/exist/eXist-1.0/src/org/dbxml/core/filer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7528/src/org/dbxml/core/filer Modified Files: Paged.java Log Message: It is now possible to pass user declared variables via XMLRPC. Index: Paged.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/dbxml/core/filer/Paged.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Paged.java 29 Mar 2004 14:15:13 -0000 1.20 --- Paged.java 30 Mar 2004 16:56:32 -0000 1.21 *************** *** 270,274 **** fileHeader.write(); } catch (IOException ioe) { - ioe.printStackTrace(); } return true; --- 270,273 ---- |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-30 17:08:12
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7528/src/org/exist/xmlrpc Modified Files: RpcServer.java RpcAPI.java RpcConnection.java Log Message: It is now possible to pass user declared variables via XMLRPC. Index: RpcServer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcServer.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** RpcServer.java 8 Mar 2004 11:21:21 -0000 1.30 --- RpcServer.java 30 Mar 2004 16:56:31 -0000 1.31 *************** *** 107,115 **** } ! public int executeQuery(User user, String xpath) throws EXistException, PermissionDeniedException { RpcConnection con = pool.get(); try { ! return con.executeQuery(user, xpath); } catch (Exception e) { handleException(e); --- 107,115 ---- } ! public int executeQuery(User user, String xpath, Hashtable parameters) throws EXistException, PermissionDeniedException { RpcConnection con = pool.get(); try { ! return con.executeQuery(user, xpath, parameters); } catch (Exception e) { handleException(e); *************** *** 123,127 **** User user, byte[] xpath, ! String encoding) throws EXistException, PermissionDeniedException { String xpathString = null; --- 123,128 ---- User user, byte[] xpath, ! String encoding, ! Hashtable parameters) throws EXistException, PermissionDeniedException { String xpathString = null; *************** *** 136,145 **** LOG.debug("query: " + xpathString); ! return executeQuery(user, xpathString); } ! public int executeQuery(User user, byte[] xpath) throws EXistException, PermissionDeniedException { ! return executeQuery(user, xpath, null); } --- 137,146 ---- LOG.debug("query: " + xpathString); ! return executeQuery(user, xpathString, parameters); } ! public int executeQuery(User user, byte[] xpath, Hashtable parameters) throws EXistException, PermissionDeniedException { ! return executeQuery(user, xpath, null, parameters); } Index: RpcAPI.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcAPI.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** RpcAPI.java 8 Mar 2004 11:21:21 -0000 1.24 --- RpcAPI.java 30 Mar 2004 16:56:32 -0000 1.25 *************** *** 40,43 **** --- 40,44 ---- public final static String SORT_EXPR = "sort-expr"; public final static String NAMESPACES = "namespaces"; + public final static String VARIABLES = "variables"; public final static String BASE_URI = "base-uri"; *************** *** 486,495 **** *@exception PermissionDeniedException Description of the Exception */ ! int executeQuery(User user, byte[] xpath, String encoding) throws EXistException, PermissionDeniedException; ! int executeQuery(User user, byte[] xpath) throws EXistException, PermissionDeniedException; ! int executeQuery(User user, String xpath) throws EXistException, PermissionDeniedException; /** --- 487,496 ---- *@exception PermissionDeniedException Description of the Exception */ ! int executeQuery(User user, byte[] xpath, String encoding, Hashtable parameters) throws EXistException, PermissionDeniedException; ! int executeQuery(User user, byte[] xpath, Hashtable parameters) throws EXistException, PermissionDeniedException; ! int executeQuery(User user, String xpath, Hashtable parameters) throws EXistException, PermissionDeniedException; /** Index: RpcConnection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcConnection.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** RpcConnection.java 25 Mar 2004 12:50:51 -0000 1.49 --- RpcConnection.java 30 Mar 2004 16:56:32 -0000 1.50 *************** *** 156,159 **** --- 156,168 ---- context.declareNamespaces(namespaces); } + // declare static variables + Hashtable variableDecls = (Hashtable)parameters.get(RpcAPI.VARIABLES); + if(variableDecls != null) { + for (Iterator i = variableDecls.entrySet().iterator(); i.hasNext();) { + Map.Entry entry = (Map.Entry) i.next(); + LOG.debug("declaring " + entry.getKey().toString() + " = " + entry.getValue()); + context.declareVariable((String) entry.getKey(), entry.getValue()); + } + } LOG.debug("compiling " + xquery); XQueryLexer lexer = new XQueryLexer(new StringReader(xquery)); *************** *** 206,209 **** --- 215,227 ---- context.declareNamespaces(namespaces); } + // declare static variables + Hashtable variableDecls = (Hashtable)parameters.get(RpcAPI.VARIABLES); + if(variableDecls != null) { + for (Iterator i = variableDecls.entrySet().iterator(); i.hasNext();) { + Map.Entry entry = (Map.Entry) i.next(); + LOG.debug("declaring " + entry.getKey().toString() + " = " + entry.getValue()); + context.declareVariable((String) entry.getKey(), entry.getValue()); + } + } // set the current broker object when reusing a compiled query: context.setBroker(broker); *************** *** 216,220 **** } ! public int executeQuery(User user, String xpath) throws Exception { long startTime = System.currentTimeMillis(); LOG.debug("query: " + xpath); --- 234,238 ---- } ! public int executeQuery(User user, String xpath, Hashtable parameters) throws Exception { long startTime = System.currentTimeMillis(); LOG.debug("query: " + xpath); *************** *** 223,227 **** broker = brokerPool.get(user); Sequence resultValue = doQuery(user, broker, xpath, null, null, ! new Hashtable()); QueryResult qr = new QueryResult(resultValue, (System .currentTimeMillis() - startTime)); --- 241,245 ---- broker = brokerPool.get(user); Sequence resultValue = doQuery(user, broker, xpath, null, null, ! parameters); QueryResult qr = new QueryResult(resultValue, (System .currentTimeMillis() - startTime)); *************** *** 1674,1679 **** for (Iterator i = parameters.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry) i.next(); ! properties.setProperty((String) entry.getKey(), (String) entry ! .getValue()); } return properties; --- 1692,1696 ---- for (Iterator i = parameters.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry) i.next(); ! properties.setProperty((String) entry.getKey(), entry.getValue().toString()); } return properties; |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-30 17:08:11
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7528/src/org/exist/xmldb Modified Files: RemoteXPathQueryService.java Log Message: It is now possible to pass user declared variables via XMLRPC. Index: RemoteXPathQueryService.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteXPathQueryService.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** RemoteXPathQueryService.java 25 Mar 2004 13:25:56 -0000 1.14 --- RemoteXPathQueryService.java 30 Mar 2004 16:56:32 -0000 1.15 *************** *** 21,24 **** --- 21,25 ---- protected RemoteCollection collection; protected Hashtable namespaceMappings = new Hashtable(5); + protected Hashtable variableDecls = new Hashtable(); protected Properties outputProperties = null; *************** *** 39,42 **** --- 40,45 ---- if(namespaceMappings.size() > 0) optParams.put(RpcAPI.NAMESPACES, namespaceMappings); + if(variableDecls.size() > 0) + optParams.put(RpcAPI.VARIABLES, variableDecls); optParams.put(RpcAPI.BASE_URI, collection.getPath()); Vector params = new Vector(); *************** *** 66,70 **** try { Hashtable optParams = new Hashtable(); ! optParams.put(RpcAPI.NAMESPACES, namespaceMappings); if(sortExpr != null) optParams.put(RpcAPI.SORT_EXPR, sortExpr); --- 69,76 ---- try { Hashtable optParams = new Hashtable(); ! if(namespaceMappings.size() > 0) ! optParams.put(RpcAPI.NAMESPACES, namespaceMappings); ! if(variableDecls.size() > 0) ! optParams.put(RpcAPI.VARIABLES, variableDecls); if(sortExpr != null) optParams.put(RpcAPI.SORT_EXPR, sortExpr); *************** *** 135,141 **** */ public void declareVariable(String qname, Object initialValue) throws XMLDBException { ! // TODO Not implemented ! //throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED, ! // "method not implemented"); } --- 141,145 ---- */ public void declareVariable(String qname, Object initialValue) throws XMLDBException { ! variableDecls.put(qname, initialValue); } |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-30 17:08:11
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7528/src/org/exist/xquery/functions/text Modified Files: TextModule.java Log Message: It is now possible to pass user declared variables via XMLRPC. Index: TextModule.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/text/TextModule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TextModule.java 1 Mar 2004 13:20:35 -0000 1.1 --- TextModule.java 30 Mar 2004 16:56:31 -0000 1.2 *************** *** 39,43 **** new FunctionDef(FuzzyMatchAll.signature, FuzzyMatchAll.class), new FunctionDef(FuzzyMatchAny.signature, FuzzyMatchAny.class), ! new FunctionDef(FuzzyIndexTerms.signature, FuzzyIndexTerms.class) }; --- 39,44 ---- new FunctionDef(FuzzyMatchAll.signature, FuzzyMatchAll.class), new FunctionDef(FuzzyMatchAny.signature, FuzzyMatchAny.class), ! new FunctionDef(FuzzyIndexTerms.signature, FuzzyIndexTerms.class), ! new FunctionDef(TextRank.signature, TextRank.class) }; |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-30 17:08:10
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/serializers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7528/src/org/exist/storage/serializers Modified Files: Serializer.java Log Message: It is now possible to pass user declared variables via XMLRPC. Index: Serializer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/serializers/Serializer.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Serializer.java 25 Feb 2004 15:31:57 -0000 1.20 --- Serializer.java 30 Mar 2004 16:56:31 -0000 1.21 *************** *** 170,174 **** for (Iterator i = properties.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry) i.next(); ! setProperty((String)entry.getKey(), (String)entry.getValue()); } } --- 170,174 ---- for (Iterator i = properties.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry) i.next(); ! setProperty((String)entry.getKey(), entry.getValue().toString()); } } *************** *** 180,184 **** for(Iterator i = table.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry) i.next(); ! setProperty((String)entry.getKey(), (String)entry.getValue()); } } --- 180,184 ---- for(Iterator i = table.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry) i.next(); ! setProperty((String)entry.getKey(), entry.getValue().toString()); } } |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-30 10:48:02
|
Update of /cvsroot/exist/exist_php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30166 Modified Files: exist_class.php Log Message: Updated for eXist-1.0beta1 Index: exist_class.php =================================================================== RCS file: /cvsroot/exist/exist_php/exist_class.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** exist_class.php 9 Aug 2002 08:01:43 -0000 1.1.1.1 --- exist_class.php 30 Mar 2004 10:36:24 -0000 1.2 *************** *** 1,125 **** ! <?php ! // ############################################################################################################### ! // Title : exist_class.php ! // Version : 0.5 ! // Author : Andrew Jenks (aje...@ya...) ! // Last modification date : 07-08-2002 ! // Description : This class allows you to use an eXist native database from PHP using the XML-RPC API. ! // License : This code is released as is GNU General Public License (GPL) ! // ############################################################################################################### ! // History: ! // 07-08-2002 (first rev. to get the functionality that I need) ! // This class is an inspiration based on the same class written by Luis Argerich for the Xindice xml ! // native database. ! // ############################################################################################################### ! // Function Info: ! //function-->getCollectionDesc(); ! //returns a hashtable that has three fields: "name", "collections", "documents". "name" is the collection's //name,"documents" contains an array listing the names of all documents contained in this collection, //"collections"is an array listing the names of available sub-collections in this collection. ! // ! // function--> queryCollection(); ! //Execute the XPath query and return a reference to the generated result set. This method may later be used to ! //retrieve results or get a result-summary. ! // ! // function--> getSummary(); ! //Get a summary of query results for the result-set referenced by resultId. Returns a struct with the following ! //fields: "queryTime", "hits", "documents", "doctype". ! //"queryTime" and "hits" are integers, describing the time in milliseconds consumed by query execution and the ! //number of hits in the result-set. Field "documents" is an array of array (Object[][3]), representing a table ! //where every row identifies one document. The first field in each row contains the document-id as integer. The ! //second has the document's name as string. The third contains the number of hits found in this document (int). ! //The "doctype" field is an array of array (Object[][2]) in each row containing the doctype's public identifier ! //and the number of hits found for this doctype. ! // ! // function--> queryCollectionXML(); ! //Execute XPath query and return results. This method will directly return a part of the result-set, starting at ! //start, as a new XML document. The number of results returned is determined by parameter howmany. The ! //result-set will be deleted on the server, so later calls to this method will again execute the query. ! // ################################################################################################################ ! // How to use it: ! // To make a query to the database and return XML; ! // $xmlstring=$xi->queryCollectionXML("document(*)//HEADER[AUTHOR&='GEORGE']","ISO-8859-1",10,1,1); ! // ! // $xh = xslt_create(); ! // ! // $args = array ( '/_xml' => $xmlstring ); ! // $params = array ( 'somevariable' => 'somecontent' ); ! // ! // $result = xslt_process($xh, 'arg:/_xml', 'your_transform_file.xsl', NULL, $args, $params); ! // ! // echo $result; ! // ! // xslt_free($xh); ! // ################################################################################################################ ! ! include_once("xmlrpc/xmlrpc.inc"); ! ! class eXist { ! var $client; ! var $error; ! ! function getError() { ! return $this->error; ! } ! ! function setXmlRpcDebug($debug) { ! $this->client->setDebug($debug); ! } ! ! function eXist($server_host,$server_port) { ! $this->client=new xmlrpc_client("/",$server_host,$server_port); ! } ! ! // General collection functions ! ! function getCollectionDesc($collection) { ! $method="getCollectionDesc"; ! $msg=new xmlrpcmsg($method,array(new xmlrpcval($collection,"string"))); ! return $this->sendMsg($msg); ! } ! ! // Query functions ! ! function queryCollection($query) { ! $method="executeQuery"; ! $msg=new xmlrpcmsg($method,array(new xmlrpcval($query,"string"))); ! return $this->sendMsg($msg); ! } ! ! ! function getSummary($queryint) { ! $method="querySummary"; ! $msg=new xmlrpcmsg($method, array(new xmlrpcval($queryint,"int"))); ! return $this->sendMsg($msg); ! } ! ! function queryCollectionXML($xpath, $encoding, $howmany, $start, $prettyPrint ) { ! $method="query"; ! $msg=new xmlrpcmsg($method, array(new xmlrpcval($xpath,"string"),new xmlrpcval($encoding,"string"), new xmlrpcval($howmany,"int"), new xmlrpcval($start,"int"), new xmlrpcval($prettyPrint, "int"))); ! return $this->sendMsg($msg); ! } ! ! ! // PRIVATE METHODS ! function getBase($collection) { ! $paths=split('/',$collection); ! return $paths[0]; ! } ! ! function sendMsg($msg) { ! $result=$this->client->send($msg); ! if(!$result) { ! $this->error='Cannot send xmlrpc message to the server'; ! return 0; ! } ! if($result->faultCode()) { ! $this->error=$result->faultString(); ! return 0; ! } ! $ret=xmlrpc_decode($result->value()); ! return $ret; ! } ! ! ! } ! ! ?> \ No newline at end of file --- 1,129 ---- ! <?php ! // ############################################################################################################### ! // Title : exist_class.php ! // Version : 0.6 ! // Author : Andrew Jenks (aje...@ya...) ! // Last modification date : 03-30-2004 ! // Description : This class allows you to use an eXist native database from PHP using the XML-RPC API. ! // License : This code is released as is GNU General Public License (GPL) ! // $Id$ ! // ############################################################################################################### ! // History: ! // 07-08-2002 (first rev. to get the functionality that I need) ! // This class is an inspiration based on the same class written by Luis Argerich for the Xindice xml ! // native database. ! // ############################################################################################################### ! // Function Info: ! //function-->getCollectionDesc(); ! //returns a hashtable that has three fields: "name", "collections", "documents". "name" is the collection's //name,"documents" contains an array listing the names of all documents contained in this collection, //"collections"is an array listing the names of available sub-collections in this collection. ! // ! // function--> queryCollection(); ! //Execute the XPath query and return a reference to the generated result set. This method may later be used to ! //retrieve results or get a result-summary. ! // ! // function--> getSummary(); ! //Get a summary of query results for the result-set referenced by resultId. Returns a struct with the following ! //fields: "queryTime", "hits", "documents", "doctype". ! //"queryTime" and "hits" are integers, describing the time in milliseconds consumed by query execution and the ! //number of hits in the result-set. Field "documents" is an array of array (Object[][3]), representing a table ! //where every row identifies one document. The first field in each row contains the document-id as integer. The ! //second has the document's name as string. The third contains the number of hits found in this document (int). ! //The "doctype" field is an array of array (Object[][2]) in each row containing the doctype's public identifier ! //and the number of hits found for this doctype. ! // ! // function--> queryCollectionXML(); ! //Execute XPath query and return results. This method will directly return a part of the result-set, starting at ! //start, as a new XML document. The number of results returned is determined by parameter howmany. The ! //result-set will be deleted on the server, so later calls to this method will again execute the query. ! // ################################################################################################################ ! // How to use it: ! // To make a query to the database and return XML; ! // $xmlstring=$xi->queryCollectionXML("document(*)//HEADER[AUTHOR&='GEORGE']","ISO-8859-1",10,1,1); ! // ! // $xh = xslt_create(); ! // ! // $args = array ( '/_xml' => $xmlstring ); ! // $params = array ( 'somevariable' => 'somecontent' ); ! // ! // $result = xslt_process($xh, 'arg:/_xml', 'your_transform_file.xsl', NULL, $args, $params); ! // ! // echo $result; ! // ! // xslt_free($xh); ! // ################################################################################################################ ! ! include_once("/usr/local/xmlrpc-1.0.99.2/xmlrpc.inc"); ! ! class eXist { ! var $client; ! var $error; ! ! function getError() { ! return $this->error; ! } ! ! function setXmlRpcDebug($debug) { ! $this->client->setDebug($debug); ! } ! ! function eXist($server_host,$server_port) { ! $this->client=new xmlrpc_client("/",$server_host,$server_port); ! } ! ! // General collection functions ! ! function getCollectionDesc($collection) { ! $method="getCollectionDesc"; ! $msg=new xmlrpcmsg($method,array(new xmlrpcval($collection,"string"))); ! return $this->sendMsg($msg); ! } ! ! // Query functions ! ! function queryCollection($query) { ! $method="executeQuery"; ! $msg=new xmlrpcmsg($method,array(new xmlrpcval($query,"string"))); ! return $this->sendMsg($msg); ! } ! ! ! function getSummary($queryint) { ! $method="querySummary"; ! $msg=new xmlrpcmsg($method, array(new xmlrpcval($queryint,"int"))); ! return $this->sendMsg($msg); ! } ! ! function queryCollectionXML($xpath, $encoding, $howmany, $start) { //method signature changed , $prettyPrint ) { ! $method="query"; ! // a fake hash for now ! $myStruct=new xmlrpcval(array("geek" => new xmlrpcval("hacker","arashb")), "struct"); ! ! $msg=new xmlrpcmsg($method, array(new xmlrpcval($xpath,"string"),/*new xmlrpcval($encoding,"string"),*/ new xmlrpcval($howmany,"int"), new xmlrpcval($start,"int"), $myStruct)); ! return $this->sendMsg($msg); ! } ! ! ! // PRIVATE METHODS ! function getBase($collection) { ! $paths=split('/',$collection); ! return $paths[0]; ! } ! ! function sendMsg($msg) { ! $result=$this->client->send($msg); ! if(!$result) { ! $this->error='Cannot send xmlrpc message to the server'; ! return 0; ! } ! if($result->faultCode()) { ! $this->error=$result->faultString(); ! return 0; ! } ! $ret=xmlrpc_decode($result->value()); ! return $ret; ! } ! ! ! } ! ! ?> |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:27:16
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676/src/org/exist/storage/cache Modified Files: ClockCache.java GClockCache.java Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: GClockCache.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache/GClockCache.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GClockCache.java 29 Jan 2004 15:06:45 -0000 1.8 --- GClockCache.java 29 Mar 2004 14:15:12 -0000 1.9 *************** *** 48,52 **** protected int hits = 0, fails = 0; ! protected long syncPeriod = 30000; protected long lastSync = System.currentTimeMillis(); --- 48,52 ---- protected int hits = 0, fails = 0; ! protected long syncPeriod = 20000; protected long lastSync = System.currentTimeMillis(); *************** *** 55,59 **** this.items = new Cacheable[size]; this.map = new Long2ObjectHashMap(size); - //this.map = new Long2ObjectOpenHashMap(size); } --- 55,58 ---- Index: ClockCache.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache/ClockCache.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ClockCache.java 2 Feb 2004 15:30:35 -0000 1.10 --- ClockCache.java 29 Mar 2004 14:15:12 -0000 1.11 *************** *** 46,50 **** private long lastSync = System.currentTimeMillis(); ! private long syncPeriod = 15000; public ClockCache(int size) { --- 46,50 ---- private long lastSync = System.currentTimeMillis(); ! private long syncPeriod = 30000; public ClockCache(int size) { |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:27:16
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/collections In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676/src/org/exist/collections Modified Files: Collection.java Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: Collection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/collections/Collection.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Collection.java 3 Feb 2004 09:10:11 -0000 1.18 --- Collection.java 29 Mar 2004 14:15:11 -0000 1.19 *************** *** 65,69 **** import org.exist.util.VariableByteInputStream; import org.exist.util.VariableByteOutputStream; ! import org.exist.util.hashtable.Object2LongHashMap; import org.w3c.dom.Node; import org.xml.sax.EntityResolver; --- 65,69 ---- import org.exist.util.VariableByteInputStream; import org.exist.util.VariableByteOutputStream; ! import org.exist.util.hashtable.ObjectHashSet; import org.w3c.dom.Node; import org.xml.sax.EntityResolver; *************** *** 108,112 **** // stores child-collections with their storage address ! private Object2LongHashMap subcollections = new Object2LongHashMap(19); // temporary field for the storage address --- 108,112 ---- // stores child-collections with their storage address ! private ObjectHashSet subcollections = new ObjectHashSet(19); // temporary field for the storage address *************** *** 142,147 **** final int p = child.name.lastIndexOf('/') + 1; final String childName = child.name.substring(p); ! if (!subcollections.containsKey(childName)) ! subcollections.put(childName, child.address); } --- 142,147 ---- final int p = child.name.lastIndexOf('/') + 1; final String childName = child.name.substring(p); ! if (!subcollections.contains(childName)) ! subcollections.add(childName); } *************** *** 155,159 **** final String childName = child.name.substring(p); subcollections.remove(childName); ! subcollections.put(childName, child.address); } --- 155,159 ---- final String childName = child.name.substring(p); subcollections.remove(childName); ! subcollections.add(childName); } *************** *** 247,256 **** for (Iterator i = subcollections.iterator(); i.hasNext(); ) { childName = (String) i.next(); ! addr = subcollections.get(childName); ! if (addr < 0) ! child = broker.getCollection(name + '/' + childName); ! else ! child = broker.getCollection(name + '/' + childName, addr); ! if (permissions.validate(broker.getUser(), Permission.READ)) { child.getDocuments(docs); if (child.getChildCollectionCount() > 0) --- 247,254 ---- for (Iterator i = subcollections.iterator(); i.hasNext(); ) { childName = (String) i.next(); ! child = broker.getCollection(name + '/' + childName); ! if(child == null) { ! LOG.warn("child collection " + childName + " not found. Skipping ..."); ! } else if (permissions.validate(broker.getUser(), Permission.READ)) { child.getDocuments(docs); if (child.getChildCollectionCount() > 0) *************** *** 444,451 **** try { lock.acquire(Lock.READ_LOCK); ! return subcollections.containsKey(name); } catch (LockException e) { LOG.warn(e.getMessage(), e); ! return subcollections.containsKey(name); } finally { lock.release(); --- 442,449 ---- try { lock.acquire(Lock.READ_LOCK); ! return subcollections.contains(name); } catch (LockException e) { LOG.warn(e.getMessage(), e); ! return subcollections.contains(name); } finally { lock.release(); *************** *** 474,480 **** final int collLen = istream.readInt(); String sub; ! subcollections = new Object2LongHashMap(collLen); for (int i = 0; i < collLen; i++) ! subcollections.put(istream.readUTF(), istream.readLong()); final SecurityManager secman = broker.getBrokerPool() --- 472,478 ---- final int collLen = istream.readInt(); String sub; ! subcollections = new ObjectHashSet(collLen); for (int i = 0; i < collLen; i++) ! subcollections.add(istream.readUTF()); final SecurityManager secman = broker.getBrokerPool() *************** *** 1230,1234 **** childColl = (String) i.next(); ostream.writeUTF(childColl); - ostream.writeLong(subcollections.get(childColl)); } org.exist.security.SecurityManager secman = broker.getBrokerPool() --- 1228,1231 ---- *************** *** 1283,1286 **** --- 1280,1287 ---- } + public long getAddress() { + return this.address; + } + public void setCreationTime(long ms) { created = ms; |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:26:43
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676/src/org/exist/storage Modified Files: NativeBroker.java Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: NativeBroker.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeBroker.java,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** NativeBroker.java 25 Mar 2004 12:50:50 -0000 1.60 --- NativeBroker.java 29 Mar 2004 14:15:14 -0000 1.61 *************** *** 243,249 **** user = new User("admin", null, "dba"); getOrCreateCollection(ROOT_COLLECTION); ! } catch (Exception e) { ! LOG.debug(e); ! e.printStackTrace(); } } --- 243,252 ---- user = new User("admin", null, "dba"); getOrCreateCollection(ROOT_COLLECTION); ! } catch (DBException e) { ! LOG.debug("failed to initialize database: " + e.getMessage(), e); ! throw new EXistException(e); ! } catch (PermissionDeniedException e) { ! LOG.debug("failed to initialize database: " + e.getMessage(), e); ! throw new EXistException(e); } } *************** *** 1679,1687 **** } collection.setAddress(address); ! if (!name.equals(ROOT_COLLECTION)) { ! Collection parent = collection.getParent(this); ! parent.update(collection); ! saveCollection(parent); ! } ostream.close(); } catch (IOException ioe) { --- 1682,1690 ---- } collection.setAddress(address); ! // if (!name.equals(ROOT_COLLECTION)) { ! // Collection parent = collection.getParent(this); ! // parent.update(collection); ! // saveCollection(parent); ! // } ostream.close(); } catch (IOException ioe) { *************** *** 1724,1732 **** } collection.setAddress(addr); ! if (!name.equals(ROOT_COLLECTION)) { ! Collection parent = collection.getParent(this); ! parent.update(collection); ! saveCollection(parent); ! } collectionsDb.getCollectionCache().add(collection); ostream.close(); --- 1727,1735 ---- } collection.setAddress(addr); ! // if (!name.equals(ROOT_COLLECTION)) { ! // Collection parent = collection.getParent(this); ! // parent.update(collection); ! // saveCollection(parent); ! // } collectionsDb.getCollectionCache().add(collection); ostream.close(); |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:26:43
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/util/hashtable In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676/src/org/exist/util/hashtable Added Files: ObjectHashSet.java Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. --- NEW FILE: ObjectHashSet.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-03 Wolfgang M. Meier * wol...@ex... * http://exist.sourceforge.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: ObjectHashSet.java,v 1.1 2004/03/29 14:15:13 wolfgang_m Exp $ */ package org.exist.util.hashtable; import java.util.Iterator; /** * A hash set on objects. Objects are compared for equality by * calling Object.equals(). * * @author Wolfgang Meier (wol...@ex...) */ public class ObjectHashSet extends AbstractHashtable { protected Object[] keys; /** * */ public ObjectHashSet() { super(); keys = new Object[tabSize]; } /** * @param iSize */ public ObjectHashSet(int iSize) { super(iSize); keys = new Object[tabSize]; } public void add(Object key) { try { insert(key); } catch (HashtableOverflowException e) { Object[] copyKeys = keys; // enlarge the table with a prime value tabSize = (int) nextPrime(tabSize + tabSize / 2); keys = new Object[tabSize]; items = 0; for (int k = 0; k < copyKeys.length; k++) { if (copyKeys[k] != null && copyKeys[k] != REMOVED) add(copyKeys[k]); } add(key); } } protected void insert(Object key) throws HashtableOverflowException { if (key == null) throw new IllegalArgumentException("Illegal value: null"); int idx = hash(key) % tabSize; if (idx < 0) idx *= -1; int bucket = -1; // look for an empty bucket if (keys[idx] == null) { keys[idx] = key; ++items; return; } else if (keys[idx] == REMOVED) { // remember the bucket, but continue to check // for duplicate keys bucket = idx; } else if (keys[idx].equals(key)) { // duplicate value return; } int rehashVal = rehash(idx); int rehashCnt = 1; for (int i = 0; i < tabSize; i++) { idx = (idx + rehashVal) % tabSize; if (keys[idx] == REMOVED) { bucket = idx; } else if (keys[idx] == null) { if (bucket > -1) { // store key into the empty bucket first found idx = bucket; } keys[idx] = key; ++items; return; } else if (keys[idx].equals(key)) { // duplicate value return; } ++rehashCnt; } // should never happen, but just to be sure: // if the key has not been inserted yet, do it now if (bucket > -1) { keys[bucket] = key; ++items; return; } throw new HashtableOverflowException(); } public boolean contains(Object key) { int idx = hash(key) % tabSize; if (idx < 0) idx *= -1; if (keys[idx] == null) return false; // key does not exist else if (keys[idx].equals(key)) { return true; } int rehashVal = rehash(idx); for (int i = 0; i < tabSize; i++) { idx = (idx + rehashVal) % tabSize; if (keys[idx] == null) { return false; // key not found } else if (keys[idx].equals(key)) { return true; } } return false; } public Object remove(Object key) { int idx = hash(key) % tabSize; if (idx < 0) idx *= -1; if (keys[idx] == null) { return null; // key does not exist } else if (keys[idx].equals(key)) { key = keys[idx]; keys[idx] = REMOVED; --items; return key; } int rehashVal = rehash(idx); for (int i = 0; i < tabSize; i++) { idx = (idx + rehashVal) % tabSize; if (keys[idx] == null) { return null; // key not found } else if (keys[idx].equals(key)) { key = keys[idx]; keys[idx] = REMOVED; --items; return key; } } return null; } protected int rehash(int iVal) { int retVal = (iVal + iVal / 2) % tabSize; if (retVal == 0) retVal = 1; return retVal; } protected final static int hash(Object o) { return o.hashCode(); } /* (non-Javadoc) * @see org.exist.util.hashtable.AbstractHashtable#iterator() */ public Iterator iterator() { return new ObjectHashSetIterator(); } public Iterator stableIterator() { return new ObjectHashSetStableIterator(); } /* (non-Javadoc) * @see org.exist.util.hashtable.AbstractHashtable#valueIterator() */ public Iterator valueIterator() { return null; } protected class ObjectHashSetIterator implements Iterator { int idx = 0; public ObjectHashSetIterator() { } /* (non-Javadoc) * @see java.util.Iterator#hasNext() */ public boolean hasNext() { if (idx == tabSize) return false; while (keys[idx] == null || keys[idx] == REMOVED) { ++idx; if (idx == tabSize) return false; } return true; } /* (non-Javadoc) * @see java.util.Iterator#next() */ public Object next() { if (idx == tabSize) return null; while (keys[idx] == null || keys[idx] == REMOVED) { ++idx; if (idx == tabSize) return null; } return keys[idx++]; } /* (non-Javadoc) * @see java.util.Iterator#remove() */ public void remove() { } } protected class ObjectHashSetStableIterator implements Iterator { int idx = 0; Object mKeys[]; public ObjectHashSetStableIterator() { mKeys = new Object[tabSize]; System.arraycopy(keys, 0, mKeys, 0, tabSize); } /* (non-Javadoc) * @see java.util.Iterator#hasNext() */ public boolean hasNext() { if (idx == tabSize) return false; while (mKeys[idx] == null || mKeys[idx] == REMOVED) { ++idx; if (idx == tabSize) return false; } return true; } /* (non-Javadoc) * @see java.util.Iterator#next() */ public Object next() { if (idx == tabSize) return null; while (mKeys[idx] == null || mKeys[idx] == REMOVED) { ++idx; if (idx == tabSize) return null; } return mKeys[idx++]; } /* (non-Javadoc) * @see java.util.Iterator#remove() */ public void remove() { } } } |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:26:43
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676/src/org/exist/client Modified Files: QueryDialog.java Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: QueryDialog.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/client/QueryDialog.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** QueryDialog.java 3 Feb 2004 13:14:53 -0000 1.10 --- QueryDialog.java 29 Mar 2004 14:15:13 -0000 1.11 *************** *** 29,34 **** import java.awt.event.ActionEvent; import java.awt.event.ActionListener; - import java.awt.event.WindowAdapter; - import java.awt.event.WindowEvent; import java.io.BufferedReader; import java.io.File; --- 29,32 ---- |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:26:42
|
Update of /cvsroot/exist/eXist-1.0/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676/bin Modified Files: client.sh Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: client.sh =================================================================== RCS file: /cvsroot/exist/eXist-1.0/bin/client.sh,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** client.sh 17 Feb 2004 15:04:59 -0000 1.33 --- client.sh 29 Mar 2004 14:15:13 -0000 1.34 *************** *** 32,36 **** # set java options if [ -z "$JAVA_OPTIONS" ]; then ! export JAVA_OPTIONS="-Xms16m -Xmx256m -Dfile.encoding=UTF-8" fi --- 32,36 ---- # set java options if [ -z "$JAVA_OPTIONS" ]; then ! export JAVA_OPTIONS="-Xms64m -Xmx256m -Dfile.encoding=UTF-8" fi |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:26:42
|
Update of /cvsroot/exist/eXist-1.0/src/org/dbxml/core/filer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676/src/org/dbxml/core/filer Modified Files: BTree.java Paged.java Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: Paged.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/dbxml/core/filer/Paged.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Paged.java 29 Jan 2004 15:06:48 -0000 1.19 --- Paged.java 29 Mar 2004 14:15:13 -0000 1.20 *************** *** 100,103 **** --- 100,107 ---- } + public short getFileVersion() { + return 0; + } + public final static void setPageSize(int pageSize) { PAGE_SIZE = pageSize; *************** *** 191,194 **** --- 195,203 ---- public boolean close() throws DBException { + try { + raf.close(); + } catch (IOException e) { + throw new DBException("an error occurred while closing database file: " + e.getMessage()); + } return true; } *************** *** 347,360 **** } ! /** ! * Description of the Method ! * ! *@return Description of the Return Value ! *@exception DBException Description of the Exception ! */ ! public boolean open() throws DBException { try { if (exists()) { fileHeader.read(); return true; } else --- 356,367 ---- } ! public boolean open(short expectedVersion) throws DBException { try { if (exists()) { fileHeader.read(); + if(fileHeader.getVersion() != expectedVersion) + throw new DBException("Database file " + + getFile().getName() + " has a storage format incompatible with this " + + "version of eXist. Please do a backup/restore of your data first."); return true; } else *************** *** 472,484 **** writeValue(getPage(page), value); } ! /** * FileHeader * *@author Wolfgang Meier <me...@if...> - *@created 26. Mai 2002 */ public abstract class FileHeader { private boolean dirty = false; private long firstFreePage = -1; --- 479,493 ---- writeValue(getPage(page), value); } ! /** * FileHeader * *@author Wolfgang Meier <me...@if...> */ public abstract class FileHeader { + + private short versionId; + private boolean dirty = false; private long firstFreePage = -1; *************** *** 508,542 **** } - /** - * Constructor for the FileHeader object - * - *@param pageCount Description of the Parameter - *@param pageSize Description of the Parameter - */ public FileHeader(long pageCount, int pageSize) { this(pageCount, pageSize, (byte) 4); } - /** - * Constructor for the FileHeader object - * - *@param pageCount Description of the Parameter - *@param pageSize Description of the Parameter - *@param blockSize Description of the Parameter - */ public FileHeader(long pageCount, int pageSize, byte blockSize) { this.pageSize = pageSize; this.pageCount = pageCount; ! totalCount = pageCount; ! headerSize = (short) pageSize; calculateWorkSize(); } - /** - * Constructor for the FileHeader object - * - *@param read Description of the Parameter - *@exception IOException Description of the Exception - */ public FileHeader(boolean read) throws IOException { if (read) --- 517,533 ---- } public FileHeader(long pageCount, int pageSize) { this(pageCount, pageSize, (byte) 4); } public FileHeader(long pageCount, int pageSize, byte blockSize) { this.pageSize = pageSize; this.pageCount = pageCount; ! this.totalCount = pageCount; ! this.headerSize = (short) pageSize; ! this.versionId = getFileVersion(); calculateWorkSize(); } public FileHeader(boolean read) throws IOException { if (read) *************** *** 644,647 **** --- 635,642 ---- } + public final short getVersion() { + return versionId; + } + /** Increment the number of records being managed by the file */ public final synchronized void incRecordCount() { *************** *** 659,667 **** } - /** - * Description of the Method - * - *@exception IOException Description of the Exception - */ public final synchronized void read() throws IOException { raf.seek(0); --- 654,657 ---- *************** *** 671,681 **** } - /** - * Description of the Method - * - *@param raf Description of the Parameter - *@exception IOException Description of the Exception - */ public void read(RandomAccessFile raf) throws IOException { headerSize = raf.readShort(); pageSize = raf.readInt(); --- 661,666 ---- } public void read(RandomAccessFile raf) throws IOException { + versionId = raf.readShort(); headerSize = raf.readShort(); pageSize = raf.readInt(); *************** *** 790,798 **** } - /** - * Description of the Method - * - *@exception IOException Description of the Exception - */ public final synchronized void write() throws IOException { raf.seek(0); --- 775,778 ---- *************** *** 801,811 **** } - /** - * Description of the Method - * - *@param raf Description of the Parameter - *@exception IOException Description of the Exception - */ public void write(RandomAccessFile raf) throws IOException { raf.writeShort(headerSize); raf.writeInt(pageSize); --- 781,786 ---- } public void write(RandomAccessFile raf) throws IOException { + raf.writeShort(versionId); raf.writeShort(headerSize); raf.writeInt(pageSize); Index: BTree.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/dbxml/core/filer/BTree.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** BTree.java 2 Feb 2004 15:30:38 -0000 1.20 --- BTree.java 29 Mar 2004 14:15:13 -0000 1.21 *************** *** 133,138 **** } ! public boolean open() throws DBException { ! if (super.open()) { cache = new LRDCache(buffers); cache.setFileName(getFile().getName()); --- 133,138 ---- } ! public boolean open(short expectedVersion) throws DBException { ! if (super.open(expectedVersion)) { cache = new LRDCache(buffers); cache.setFileName(getFile().getName()); *************** *** 431,436 **** private int calcDataLen() { int length = ptrs == null ? 0 : ptrs.length << 3; ! final int keyLen = fileHeader.getFixedKeyLen() < 0 ? 2 : 0; ! length += keyLen * values.length; for (int i = 0; i < values.length; i++) length += values[i].getLength(); --- 431,436 ---- private int calcDataLen() { int length = ptrs == null ? 0 : ptrs.length << 3; ! if(fileHeader.getFixedKeyLen() < 0) ! length += 2 * values.length; for (int i = 0; i < values.length; i++) length += values[i].getLength(); *************** *** 667,672 **** idx = - (idx + 1); - // Check to see if we've exhausted the block - //boolean split = ph.getDataLen() + 6 + value.getLength() > fileHeader.getWorkSize(); setValues(insertArrayValue(values, value.trim(), //new Value(value.getData()), --- 667,670 ---- *************** *** 688,693 **** public void promoteValue(Value value, long rightPointer) throws IOException, BTreeException { - // Check to see if we've exhausted the block - //boolean split = ph.getDataLen() + 6 + value.getLength() > fileHeader.getWorkSize(); int idx = Arrays.binarySearch(values, value); if (idx < 0) --- 686,689 ---- *************** *** 701,705 **** if (split) split(); - //write(); } --- 697,700 ---- |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:26:41
|
Update of /cvsroot/exist/eXist-1.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676 Modified Files: build.xml Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: build.xml =================================================================== RCS file: /cvsroot/exist/eXist-1.0/build.xml,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** build.xml 2 Mar 2004 12:51:23 -0000 1.43 --- build.xml 29 Mar 2004 14:15:12 -0000 1.44 *************** *** 229,232 **** --- 229,233 ---- <exclude name="**/xupdate/test/*.java"/> <exclude name="**/xquery/test/*.java"/> + <exclude name="org/exist/test/ServerTest.java"/> </fileset> </batchtest> |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:26:41
|
Update of /cvsroot/exist/eXist-1.0/webapp/xquery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676/webapp/xquery Modified Files: sitemap.xmap Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: sitemap.xmap =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/xquery/sitemap.xmap,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** sitemap.xmap 1 Mar 2004 13:20:35 -0000 1.10 --- sitemap.xmap 29 Mar 2004 14:15:12 -0000 1.11 *************** *** 32,36 **** <map:match pattern="xquery.xq"> ! <map:generate src="xquery.xq" type="xquery"/> <map:transform type="xinclude"/> <map:transform src="context://stylesheets/doc2html-2.xsl"/> --- 32,36 ---- <map:match pattern="xquery.xq"> ! <map:generate src="xquery.xq" type="xquery"/> <map:transform type="xinclude"/> <map:transform src="context://stylesheets/doc2html-2.xsl"/> |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-29 14:26:40
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31676/src/org/exist/storage/store Modified Files: BFile.java DOMFile.java Log Message: * Fixed stability issues: collection pointers got corrupted occasionally, resulting in ArrayIndexOutOfBoundsExceptions. * Added check for file format versions: the database will throw an exception if the database files are incompatible with the current eXist version. Index: DOMFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/DOMFile.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** DOMFile.java 2 Feb 2004 15:30:37 -0000 1.19 --- DOMFile.java 29 Mar 2004 14:15:12 -0000 1.20 *************** *** 69,72 **** --- 69,74 ---- public class DOMFile extends BTree implements Lockable { + public final static short FILE_FORMAT_VERSION_ID = 1; + // page types public final static byte LOB = 21; *************** *** 118,121 **** --- 120,130 ---- /** + * @return + */ + public short getFileVersion() { + return FILE_FORMAT_VERSION_ID; + } + + /** * Append a value to the current page * *************** *** 751,755 **** */ public boolean open() throws DBException { ! if (super.open()) return true; else --- 760,764 ---- */ public boolean open() throws DBException { ! if (super.open(FILE_FORMAT_VERSION_ID)) return true; else *************** *** 1074,1081 **** page = getCurrentPage(pageNr); dataCache.add(page); - pos = 0; dlen = page.getPageHeader().getDataLength(); ! //System.out.println(pos + " < " + dlen); ! while (pos < dlen) { //System.out.println(current + " = " + tid); if (ByteConversion.byteToShort(page.data, pos) == tid) --- 1083,1088 ---- page = getCurrentPage(pageNr); dataCache.add(page); dlen = page.getPageHeader().getDataLength(); ! for (pos = 0; pos < dlen; ) { //System.out.println(current + " = " + tid); if (ByteConversion.byteToShort(page.data, pos) == tid) *************** *** 1089,1102 **** return null; } ! /*LOG.debug( ! owner.toString() ! + ": tid " ! + tid ! + " not found on " ! + page.page.getPageInfo() ! + ". Loading " ! + pageNr);*/ } - Thread.dumpStack(); LOG.debug("tid " + tid + " not found."); return null; --- 1096,1108 ---- return null; } ! // LOG.debug( ! // owner.toString() ! // + ": tid " ! // + tid ! // + " not found on " ! // + page.page.getPageInfo() ! // + ". Loading " ! // + pageNr); } LOG.debug("tid " + tid + " not found."); return null; Index: BFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/BFile.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** BFile.java 25 Mar 2004 12:50:50 -0000 1.15 --- BFile.java 29 Mar 2004 14:15:12 -0000 1.16 *************** *** 67,74 **** * *@author Wolfgang Meier <wol...@ex...> - *@created 25. Mai 2002 */ public class BFile extends BTree { // minimum free space a page should have to be // considered for reusing --- 67,75 ---- * *@author Wolfgang Meier <wol...@ex...> */ public class BFile extends BTree { + public final static short FILE_FORMAT_VERSION_ID = 2; + // minimum free space a page should have to be // considered for reusing *************** *** 123,126 **** --- 124,134 ---- /** + * @return + */ + public short getFileVersion() { + return FILE_FORMAT_VERSION_ID; + } + + /** * Returns the Lock object responsible for this BFile. * *************** *** 390,393 **** --- 398,405 ---- final short tid = (short) StorageAddress.tidFromPointer(pointer); final int offset = findValuePosition(page, tid); + if(offset < 0) { + System.out.println("no data found at tid " + tid + "; page " + page.getPageNum()); + throw new IOException("no data found at tid " + tid + "; page " + page.getPageNum()); + } final byte[] data = page.getData(); final int l = ByteConversion.byteToInt(data, offset); *************** *** 491,495 **** public boolean open() throws DBException { ! return super.open(); } --- 503,507 ---- public boolean open() throws DBException { ! return super.open(FILE_FORMAT_VERSION_ID); } *************** *** 834,837 **** --- 846,850 ---- private final class BFileHeader extends BTreeFileHeader { + private OrderedLinkedList freeList = new OrderedLinkedList(); private long freeSpacePage = -1; |
|
From: Giulio V. <gva...@us...> - 2004-03-26 11:14:58
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30151/src/org/exist/xquery/functions/xmldb Modified Files: ModuleImpl.java Added Files: XMLDBCreated.java XMLDBLastModified.java Log Message: add created and last-modified to xquery --- NEW FILE: XMLDBLastModified.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-03 Wolfgang M. Meier * wol...@ex... * http://exist.sourceforge.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ package org.exist.xquery.functions.xmldb; import org.exist.dom.NodeProxy; import org.exist.dom.QName; import org.exist.xquery.BasicFunction; import org.exist.xquery.Cardinality; import org.exist.xquery.FunctionSignature; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; import org.exist.xquery.value.NodeValue; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; import org.exist.xquery.value.Type; import org.exist.xquery.value.DateTimeValue; import org.exist.security.User; /** * @author Wolfgang Meier (wol...@ex...) * */ public class XMLDBLastModified extends BasicFunction { public final static FunctionSignature signature = new FunctionSignature( new QName("last-modified", ModuleImpl.NAMESPACE_URI, ModuleImpl.PREFIX), "Returns the modified date", new SequenceType[] { new SequenceType(Type.NODE, Cardinality.EXACTLY_ONE) }, new SequenceType(Type.DATE_TIME, Cardinality.EXACTLY_ONE)); public XMLDBLastModified(XQueryContext context) { super(context, signature); } /* (non-Javadoc) * @see org.exist.xquery.BasicFunction#eval(org.exist.xquery.value.Sequence[], org.exist.xquery.value.Sequence) */ public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException { NodeValue node = (NodeValue)args[0].itemAt(0); if(node.getImplementationType() == NodeValue.PERSISTENT_NODE) { NodeProxy proxy = (NodeProxy)node; return new DateTimeValue(proxy.doc.getLastModified(),0); } return Sequence.EMPTY_SEQUENCE; } } --- NEW FILE: XMLDBCreated.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2001-03 Wolfgang M. Meier * wol...@ex... * http://exist.sourceforge.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ package org.exist.xquery.functions.xmldb; import org.exist.dom.NodeProxy; import org.exist.dom.QName; import org.exist.xquery.BasicFunction; import org.exist.xquery.Cardinality; import org.exist.xquery.FunctionSignature; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; import org.exist.xquery.value.NodeValue; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; import org.exist.xquery.value.Type; import org.exist.xquery.value.DateTimeValue; import org.exist.security.User; /** * @author Wolfgang Meier (wol...@ex...) * */ public class XMLDBCreated extends BasicFunction { public final static FunctionSignature signature = new FunctionSignature( new QName("created", ModuleImpl.NAMESPACE_URI, ModuleImpl.PREFIX), "Returns the creation date", new SequenceType[] { new SequenceType(Type.NODE, Cardinality.EXACTLY_ONE) }, new SequenceType(Type.DATE_TIME, Cardinality.EXACTLY_ONE)); public XMLDBCreated(XQueryContext context) { super(context, signature); } /* (non-Javadoc) * @see org.exist.xquery.BasicFunction#eval(org.exist.xquery.value.Sequence[], org.exist.xquery.value.Sequence) */ public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException { NodeValue node = (NodeValue)args[0].itemAt(0); if(node.getImplementationType() == NodeValue.PERSISTENT_NODE) { NodeProxy proxy = (NodeProxy)node; return new DateTimeValue(proxy.doc.getCreated(),0); } return Sequence.EMPTY_SEQUENCE; } } Index: ModuleImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/xmldb/ModuleImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ModuleImpl.java 1 Mar 2004 13:20:35 -0000 1.4 --- ModuleImpl.java 26 Mar 2004 11:04:01 -0000 1.5 *************** *** 43,47 **** new FunctionDef(XMLDBXUpdate.signature, XMLDBXUpdate.class), new FunctionDef(XMLDBRemove.signature, XMLDBRemove.class), ! new FunctionDef(XMLDBHasLock.signature, XMLDBHasLock.class) }; --- 43,49 ---- new FunctionDef(XMLDBXUpdate.signature, XMLDBXUpdate.class), new FunctionDef(XMLDBRemove.signature, XMLDBRemove.class), ! new FunctionDef(XMLDBHasLock.signature, XMLDBHasLock.class), ! new FunctionDef(XMLDBCreated.signature, XMLDBCreated.class), ! new FunctionDef(XMLDBLastModified.signature, XMLDBLastModified.class) }; |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:36:49
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31049/src/org/exist/dom Modified Files: DocumentImpl.java Log Message: Method signature for DBBroker.findElementsByTagName had been modified. Index: DocumentImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/DocumentImpl.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** DocumentImpl.java 2 Mar 2004 20:53:59 -0000 1.34 --- DocumentImpl.java 25 Mar 2004 13:25:56 -0000 1.35 *************** *** 41,44 **** --- 41,46 ---- import org.exist.util.VariableByteInputStream; import org.exist.util.VariableByteOutputStream; + import org.exist.xquery.DescendantSelector; + import org.exist.xquery.NodeSelector; /** *************** *** 291,296 **** DocumentSet docs = new DocumentSet(); docs.add(this); ! NodeSet temp = (NodeSet) broker.findElementsByTagName(ElementValue.ELEMENT, docs, qname); ! return temp.selectAncestorDescendant(new NodeProxy(root), NodeSet.DESCENDANT); } --- 293,298 ---- DocumentSet docs = new DocumentSet(); docs.add(this); ! NodeSelector selector = new DescendantSelector(new NodeProxy(root), false); ! return (NodeSet) broker.findElementsByTagName(ElementValue.ELEMENT, docs, qname, selector); } *************** *** 374,385 **** public NodeList getElementsByTagName(String tagname) { ! DocumentSet docs = new DocumentSet(); ! docs.add(this); ! QName qname = new QName(tagname, "", null); ! return broker.findElementsByTagName(ElementValue.ELEMENT, docs, qname); } public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { ! return null; } --- 376,387 ---- public NodeList getElementsByTagName(String tagname) { ! return getElementsByTagNameNS("", tagname); } public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { ! DocumentSet docs = new DocumentSet(); ! docs.add(this); ! QName qname = new QName(localName, namespaceURI, null); ! return broker.findElementsByTagName(ElementValue.ELEMENT, docs, qname, null); } |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:36:48
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31049/src/org/exist/xmldb Modified Files: RemoteXPathQueryService.java Log Message: Method signature for DBBroker.findElementsByTagName had been modified. Index: RemoteXPathQueryService.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteXPathQueryService.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RemoteXPathQueryService.java 3 Feb 2004 08:33:51 -0000 1.13 --- RemoteXPathQueryService.java 25 Mar 2004 13:25:56 -0000 1.14 *************** *** 136,141 **** public void declareVariable(String qname, Object initialValue) throws XMLDBException { // TODO Not implemented ! throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED, ! "method not implemented"); } --- 136,141 ---- public void declareVariable(String qname, Object initialValue) throws XMLDBException { // TODO Not implemented ! //throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED, ! // "method not implemented"); } |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:28:32
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29458/src/org/exist/xquery/functions Modified Files: FunId.java Log Message: Method signature for DBBroker.findElementsByTagName had been modified. Index: FunId.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/FunId.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FunId.java 2 Feb 2004 15:30:39 -0000 1.2 --- FunId.java 25 Mar 2004 13:17:43 -0000 1.3 *************** *** 89,93 **** QName id) { NodeSet attribs = ! (NodeSet) context.getBroker().findElementsByTagName(ElementValue.ATTRIBUTE_ID, docs, id); NodeProxy n, p; for (Iterator i = attribs.iterator(); i.hasNext();) { --- 89,93 ---- QName id) { NodeSet attribs = ! (NodeSet) context.getBroker().findElementsByTagName(ElementValue.ATTRIBUTE_ID, docs, id, null); NodeProxy n, p; for (Iterator i = attribs.iterator(); i.hasNext();) { |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:39
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/soap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/soap Modified Files: QuerySoapBindingImpl.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: QuerySoapBindingImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/soap/QuerySoapBindingImpl.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** QuerySoapBindingImpl.java 25 Feb 2004 15:31:59 -0000 1.18 --- QuerySoapBindingImpl.java 25 Mar 2004 12:50:51 -0000 1.19 *************** *** 288,291 **** --- 288,292 ---- resp.setQueryTime(System.currentTimeMillis() - start); expr.reset(); + context.reset(); } catch (Exception e) { LOG.debug(e.getMessage(), e); |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/xmlrpc Modified Files: RpcConnection.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: RpcConnection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcConnection.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** RpcConnection.java 8 Mar 2004 11:21:21 -0000 1.48 --- RpcConnection.java 25 Mar 2004 12:50:51 -0000 1.49 *************** *** 212,215 **** --- 212,216 ---- LOG.info("query took " + (System.currentTimeMillis() - start) + "ms."); expr.reset(); + context.reset(); return result; } |
|
From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/storage/store Modified Files: BFile.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: BFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/BFile.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** BFile.java 2 Feb 2004 15:30:37 -0000 1.14 --- BFile.java 25 Mar 2004 12:50:50 -0000 1.15 *************** *** 1523,1527 **** } ! public final long getAddress() { return address_; } --- 1523,1527 ---- } ! public long getAddress() { return address_; } *************** *** 1530,1543 **** * @see java.io.InputStream#read() */ ! public final int read() throws IOException { ! if (pageLen_ < 0) ! return -1; if (offset_ == pageLen_) { ! final long next = nextPage_.getPageHeader().getNextInChain(); ! if (next < 1) { ! pageLen_ = -1; ! offset_ = 0; ! return -1; ! } try { lock.acquire(Lock.READ_LOCK); --- 1530,1546 ---- * @see java.io.InputStream#read() */ ! public int read() throws IOException { if (offset_ == pageLen_) { ! advance(); ! } ! return pageLen_ == -1 ? -1 : (int) (nextPage_.data[offset_++] & 0xFF); ! } ! ! private void advance() throws IOException { ! long next = nextPage_.getPageHeader().getNextInChain(); ! if (next < 1) { ! pageLen_ = -1; ! offset_ = 0; ! } else { try { lock.acquire(Lock.READ_LOCK); *************** *** 1553,1559 **** } } - return (int) (nextPage_.data[offset_++] & 0xFF); } ! /* (non-Javadoc) * @see java.io.InputStream#available() --- 1556,1561 ---- } } } ! /* (non-Javadoc) * @see java.io.InputStream#available() |