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
(30) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Jean-Marc V. <jm...@us...> - 2004-08-13 15:34:23
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18035/src/org/exist/xquery/test Modified Files: XPathQueryTest.java Log Message: added XPath failure: /*/* behaves like //* Index: XPathQueryTest.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/test/XPathQueryTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XPathQueryTest.java 13 Jul 2004 14:18:43 -0000 1.4 --- XPathQueryTest.java 13 Aug 2004 15:33:44 -0000 1.5 *************** *** 88,107 **** public void testStarAxis() { try { XPathQueryService service = storeXMLStringAndGetQueryService("numbers.xml", numbers); ! ResourceSet result = service.queryResource( "numbers.xml", "/*/item" ); ! System.out.println("testElements 1: ========" ); printResult(result); assertEquals( "XPath: /*/item", 4, result.getSize() ); result = service.queryResource( ! "numbers.xml", "/*/*" ); ! System.out.println("testElements 2: ========" ); printResult(result); assertEquals( "XPath: /*/*", 4, result.getSize() ); } catch (XMLDBException e) { ! System.out.println("testElements(): XMLDBException: "+e); fail(e.getMessage()); } --- 88,116 ---- public void testStarAxis() { + ResourceSet result; try { XPathQueryService service = storeXMLStringAndGetQueryService("numbers.xml", numbers); ! result = service.queryResource( "numbers.xml", "/*/item" ); ! System.out.println("testStarAxis 1: ========" ); printResult(result); assertEquals( "XPath: /*/item", 4, result.getSize() ); result = service.queryResource( ! "numbers.xml", "/test/*" ); ! System.out.println("testStarAxis 2: ========" ); printResult(result); ! assertEquals( "XPath: /test/*", 4, result.getSize() ); ! ! result = service.queryResource( ! "numbers.xml", "/test/descendant-or-self::*" ); ! System.out.println("testStarAxis 3: ========" ); printResult(result); ! assertEquals( "XPath: /test/descendant-or-self::*", 12, result.getSize() ); ! ! System.out.println("testStarAxis 4: ========" ); printResult(result); assertEquals( "XPath: /*/*", 4, result.getSize() ); } catch (XMLDBException e) { ! System.out.println("testStarAxis(): XMLDBException: "+e); fail(e.getMessage()); } |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 19:43:10
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21551/src/org/exist/storage/store Modified Files: DOMFile.java Log Message: Class LRUCache fails the test. Switching back to the old LRDCache until the problem is fixed. Index: DOMFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/DOMFile.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** DOMFile.java 12 Aug 2004 18:54:21 -0000 1.48 --- DOMFile.java 12 Aug 2004 19:43:00 -0000 1.49 *************** *** 48,51 **** --- 48,52 ---- import org.exist.storage.cache.Cacheable; import org.exist.storage.cache.ClockCache; + import org.exist.storage.cache.LRDCache; import org.exist.storage.cache.LRUCache; import org.exist.util.ByteConversion; *************** *** 128,132 **** fileHeader.setPageCount(0); fileHeader.setTotalCount(0); ! dataCache = new LRUCache(dataBuffers); dataCache.setFileName("dom.dbx"); --- 129,133 ---- fileHeader.setPageCount(0); fileHeader.setTotalCount(0); ! dataCache = new LRDCache(dataBuffers); dataCache.setFileName("dom.dbx"); |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 18:55:00
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11331/src/org/exist/util Modified Files: XMLReaderObjectFactory.java XMLReaderPool.java Log Message: Switched back to simple LRU page replacement strategy for document data in dom.dbx. As every page is accessed at most two times during storage, the LRDCache did not work very well. Improved the LRU implementation. Index: XMLReaderObjectFactory.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/XMLReaderObjectFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XMLReaderObjectFactory.java 10 Aug 2004 20:27:14 -0000 1.1 --- XMLReaderObjectFactory.java 12 Aug 2004 18:54:20 -0000 1.2 *************** *** 56,60 **** */ public Object makeObject() throws Exception { - System.out.println("Creating new SAXReader"); Configuration config = pool.getConfiguration(); // get validation settings --- 56,59 ---- Index: XMLReaderPool.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/XMLReaderPool.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XMLReaderPool.java 10 Aug 2004 20:27:14 -0000 1.1 --- XMLReaderPool.java 12 Aug 2004 18:54:20 -0000 1.2 *************** *** 51,54 **** --- 51,57 ---- public synchronized void returnXMLReader(XMLReader reader) { + if(reader == null) { + return; + } try { returnObject(reader); |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 18:54:59
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11331/src/org/exist/storage/cache Modified Files: LRUCache.java ClockCache.java Log Message: Switched back to simple LRU page replacement strategy for document data in dom.dbx. As every page is accessed at most two times during storage, the LRDCache did not work very well. Improved the LRU implementation. Index: ClockCache.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache/ClockCache.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ClockCache.java 12 Jul 2004 17:17:41 -0000 1.18 --- ClockCache.java 12 Aug 2004 18:54:19 -0000 1.19 *************** *** 88,91 **** --- 88,92 ---- if (bucket < 0) bucket = i; + } else old.setReferenceCount(0); Index: LRUCache.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache/LRUCache.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LRUCache.java 8 Jun 2004 08:16:07 -0000 1.4 --- LRUCache.java 12 Aug 2004 18:54:19 -0000 1.5 *************** *** 27,30 **** --- 27,31 ---- import org.exist.util.hashtable.Long2ObjectHashMap; + import org.exist.util.hashtable.SequencedLongHashMap; /** *************** *** 34,39 **** private int max; ! private LinkedList stack = new LinkedList(); ! private Long2ObjectHashMap map; private int hits = 0; --- 35,39 ---- private int max; ! private SequencedLongHashMap map; private int hits = 0; *************** *** 42,46 **** public LRUCache(int size) { this.max = size; ! this.map = new Long2ObjectHashMap(size); } --- 42,46 ---- public LRUCache(int size) { this.max = size; ! this.map = new SequencedLongHashMap(size); } *************** *** 56,64 **** */ public void add(Cacheable item) { ! if(stack.size() == max) { ! removeOne(); } map.put(item.getKey(), item); - stack.addLast(item); } --- 56,63 ---- */ public void add(Cacheable item) { ! if(map.size() == max) { ! removeOne(item); } map.put(item.getKey(), item); } *************** *** 86,90 **** */ public void remove(Cacheable item) { - stack.remove(item); map.remove(item.getKey()); } --- 85,88 ---- *************** *** 95,99 **** public void flush() { Cacheable next; ! for(Iterator i = stack.iterator(); i.hasNext(); ) { next = (Cacheable)i.next(); next.sync(); --- 93,97 ---- public void flush() { Cacheable next; ! for(Iterator i = map.valueIterator(); i.hasNext(); ) { next = (Cacheable)i.next(); next.sync(); *************** *** 107,111 **** public boolean hasDirtyItems() { Cacheable next; ! for(Iterator i = stack.iterator(); i.hasNext(); ) { next = (Cacheable)i.next(); if(next.isDirty()) --- 105,109 ---- public boolean hasDirtyItems() { Cacheable next; ! for(Iterator i = map.valueIterator(); i.hasNext(); ) { next = (Cacheable)i.next(); if(next.isDirty()) *************** *** 126,130 **** */ public int getUsedBuffers() { ! return stack.size(); } --- 124,128 ---- */ public int getUsedBuffers() { ! return map.size(); } *************** *** 149,158 **** } ! private final void removeOne() { ! Cacheable first = (Cacheable)stack.removeFirst(); ! if(!stack.contains(first)) { ! map.remove(first.getKey()); ! first.sync(); ! } } } --- 147,161 ---- } ! private final void removeOne(Cacheable item) { ! boolean removed = false; ! do { ! Cacheable cached = (Cacheable)map.removeFirst(); ! if(cached.allowUnload() && cached.getKey() != item.getKey()) { ! cached.sync(); ! removed = true; ! } else { ! map.put(cached.getKey(), cached); ! } ! } while(!removed); } } |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 18:54:34
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11331/src/org/exist/storage/store Modified Files: DOMFile.java BFile.java Log Message: Switched back to simple LRU page replacement strategy for document data in dom.dbx. As every page is accessed at most two times during storage, the LRDCache did not work very well. Improved the LRU implementation. Index: DOMFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/DOMFile.java,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** DOMFile.java 11 Aug 2004 12:47:01 -0000 1.47 --- DOMFile.java 12 Aug 2004 18:54:21 -0000 1.48 *************** *** 48,51 **** --- 48,52 ---- import org.exist.storage.cache.Cacheable; import org.exist.storage.cache.ClockCache; + import org.exist.storage.cache.LRUCache; import org.exist.util.ByteConversion; import org.exist.util.Lock; *************** *** 127,131 **** fileHeader.setPageCount(0); fileHeader.setTotalCount(0); ! dataCache = new ClockCache(dataBuffers); dataCache.setFileName("dom.dbx"); --- 128,132 ---- fileHeader.setPageCount(0); fileHeader.setTotalCount(0); ! dataCache = new LRUCache(dataBuffers); dataCache.setFileName("dom.dbx"); Index: BFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/BFile.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** BFile.java 12 Aug 2004 08:07:09 -0000 1.31 --- BFile.java 12 Aug 2004 18:54:21 -0000 1.32 *************** *** 483,488 **** private DataPage getDataPage(long pos, boolean initialize) throws IOException { ! DataPage wp = null; ! wp = (DataPage) dataCache.get(pos); if (wp == null) { final Page page = getPage(pos); --- 483,487 ---- private DataPage getDataPage(long pos, boolean initialize) throws IOException { ! DataPage wp = (DataPage) dataCache.get(pos); if (wp == null) { final Page page = getPage(pos); *************** *** 685,689 **** page.setData(data); page.setDirty(true); ! dataCache.add(page); return StorageAddress.createPointer((int) page.getPageNum(), (short) 1); --- 684,688 ---- page.setData(data); page.setDirty(true); ! // dataCache.add(page); return StorageAddress.createPointer((int) page.getPageNum(), (short) 1); *************** *** 1274,1278 **** public OverflowPage(DataPage page) { ! firstPage = (SinglePage) page; } --- 1273,1277 ---- public OverflowPage(DataPage page) { ! firstPage = (SinglePage) page; } |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 18:54:34
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/util/hashtable/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11331/src/org/exist/util/hashtable/test Modified Files: HashtableTest.java Log Message: Switched back to simple LRU page replacement strategy for document data in dom.dbx. As every page is accessed at most two times during storage, the LRDCache did not work very well. Improved the LRU implementation. Index: HashtableTest.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/hashtable/test/HashtableTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HashtableTest.java 15 Dec 2003 13:15:08 -0000 1.4 --- HashtableTest.java 12 Aug 2004 18:54:21 -0000 1.5 *************** *** 29,32 **** --- 29,33 ---- import org.exist.util.hashtable.Int2ObjectHashMap; + import org.exist.util.hashtable.SequencedLongHashMap; /** *************** *** 35,41 **** public class HashtableTest extends TestCase { ! private int tabSize = 10000; ! private Int2ObjectHashMap table = new Int2ObjectHashMap(tabSize); ! private int keys[] = new int[tabSize]; private Object values[] = new Object[tabSize]; --- 36,40 ---- public class HashtableTest extends TestCase { ! private int tabSize = 100000; private Object values[] = new Object[tabSize]; *************** *** 49,52 **** --- 48,53 ---- public void testPut() { + int keys[] = new int[tabSize]; + Int2ObjectHashMap table = new Int2ObjectHashMap(tabSize); Random rand = new Random(System.currentTimeMillis()); for(int i = 0; i < tabSize; i++) { *************** *** 88,90 **** --- 89,115 ---- } + public void testSequencedMap() { + long keys[] = new long[tabSize]; + SequencedLongHashMap table = new SequencedLongHashMap(tabSize); + Random rand = new Random(System.currentTimeMillis()); + for(int i = 0; i < tabSize; i++) { + do { + keys[i] = rand.nextInt(Integer.MAX_VALUE); + } while(table.get(keys[i]) != null); + values[i] = new String("a" + keys[i]); + table.put(keys[i], values[i]); + } + for(int i = 0; i < tabSize; i++) { + Object v = table.get(keys[i]); + assertEquals( values[i], v); + } + int c = 0; + for(Iterator i = table.iterator(); i.hasNext(); c++) { + Long v = (Long)i.next(); + assertEquals(keys[c], v.longValue()); + } + System.out.println(table.size() + " = " + c); + System.out.println("maxRehash: " + table.getMaxRehash()); + assertEquals(table.size(), c); + } } |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 18:54:31
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11331/src/org/exist/storage Modified Files: NativeBroker.java Log Message: Switched back to simple LRU page replacement strategy for document data in dom.dbx. As every page is accessed at most two times during storage, the LRDCache did not work very well. Improved the LRU implementation. Index: NativeBroker.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeBroker.java,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -d -r1.97 -r1.98 *** NativeBroker.java 6 Aug 2004 15:24:48 -0000 1.97 --- NativeBroker.java 12 Aug 2004 18:54:22 -0000 1.98 *************** *** 2528,2531 **** --- 2528,2534 ---- public void sync() { + Runtime runtime = Runtime.getRuntime(); + LOG.debug("Memory: " + (runtime.totalMemory() / 1024) + "K total; " + + (runtime.freeMemory() / 1024) + "K free"); // uncomment this to get statistics on page buffer usage elementsDb.printStatistics(); |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 18:54:30
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/util/hashtable In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11331/src/org/exist/util/hashtable Modified Files: Long2ObjectHashMap.java Added Files: SequencedLongHashMap.java Log Message: Switched back to simple LRU page replacement strategy for document data in dom.dbx. As every page is accessed at most two times during storage, the LRDCache did not work very well. Improved the LRU implementation. --- NEW FILE: SequencedLongHashMap.java --- /* * eXist Open Source Native XML Database * Copyright (C) 2000-04, Wolfgang M. Meier (wol...@ex...) * * 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 later version. * * This library 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 Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: SequencedLongHashMap.java,v 1.1 2004/08/12 18:54:20 wolfgang_m Exp $ */ package org.exist.util.hashtable; /** * A hash map additionally providing access to entries in the order in which * they were added. All entries are kept in a linked list. * * If a duplicate entry is added, the old entry is removed from the list and appended to the end. The * map thus implements a "Last Recently Used" behaviour. */ import java.util.Iterator; public class SequencedLongHashMap extends Long2ObjectHashMap { private static class Entry { long key; Object value; Entry next = null; Entry prev = null; public Entry(long key, Object value) { this.key = key; this.value = value; } } private Entry first = null; private Entry last = null; public SequencedLongHashMap() { super(); } public SequencedLongHashMap(int iSize) { super(iSize); } public void put(long key, Object value) { Entry entry = new Entry(key, value); Entry duplicate = null; try { duplicate = (Entry)insert(key, entry); } catch (HashtableOverflowException e) { long[] copyKeys = keys; Object[] copyValues = values; // enlarge the table with a prime value tabSize = (int) nextPrime(tabSize + tabSize / 2); keys = new long[tabSize]; values = new Object[tabSize]; items = 0; try { for (int k = 0; k < copyValues.length; k++) { if (copyValues[k] != null && copyValues[k] != REMOVED) insert(copyKeys[k], copyValues[k]); } duplicate = (Entry)insert(key, entry); } catch (HashtableOverflowException e1) { } } if(duplicate != null) removeEntry(duplicate); if(first == null) { first = entry; last = first; } else { last.next = entry; entry.prev = last; last = entry; } } public Object get(long key) { Entry entry = (Entry) super.get(key); return entry == null ? null : entry.value; } public Object remove(long key) { Entry entry = (Entry) super.remove(key); if(entry != null) { removeEntry(entry); return entry.value; } else return null; } /** * Remove the first entry added to the map. * * @return */ public Object removeFirst() { if(first == null) return null; super.remove(first.key); Entry head = first; first = head.next; if(head != null) head.prev = null; return head.value; } private void removeEntry(Entry entry) { if(entry.prev == null) { if(entry.next == null) { first = null; last = null; } else { entry.next.prev = null; first = entry.next; } } else { entry.prev.next = entry.next; if(entry.next == null) last = entry.prev; else entry.next.prev = entry.prev; } } /** * Returns an iterator over all entries in the * order in which they were inserted. */ public Iterator iterator() { return new SequencedLongIterator(Long2ObjectIterator.KEYS); } public Iterator valueIterator() { return new SequencedLongIterator(Long2ObjectIterator.VALUES); } protected class SequencedLongIterator extends HashtableIterator { private Entry current; public SequencedLongIterator(int type) { super(type); current = first; } /* (non-Javadoc) * @see java.util.Iterator#hasNext() */ public boolean hasNext() { return current != null; } /* (non-Javadoc) * @see org.exist.util.hashtable.Long2ObjectHashMap.Long2ObjectIterator#next() */ public Object next() { if(current == null) return null; Entry next = current; current = current.next; if(returnType == VALUES) { return next.value; } else return new Long(next.key); } } } Index: Long2ObjectHashMap.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/hashtable/Long2ObjectHashMap.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Long2ObjectHashMap.java 12 Jul 2004 17:17:43 -0000 1.3 --- Long2ObjectHashMap.java 12 Aug 2004 18:54:20 -0000 1.4 *************** *** 140,144 **** } ! protected void insert(long key, Object value) throws HashtableOverflowException { if (value == null) throw new IllegalArgumentException("Illegal value: null"); --- 140,144 ---- } ! protected Object insert(long key, Object value) throws HashtableOverflowException { if (value == null) throw new IllegalArgumentException("Illegal value: null"); *************** *** 152,156 **** values[idx] = value; ++items; ! return; } else if (values[idx] == REMOVED) { // remember the bucket, but continue to check --- 152,156 ---- values[idx] = value; ++items; ! return null; } else if (values[idx] == REMOVED) { // remember the bucket, but continue to check *************** *** 159,164 **** } else if (keys[idx] == key) { // duplicate value values[idx] = value; ! return; } int rehashVal = rehash(idx); --- 159,165 ---- } else if (keys[idx] == key) { // duplicate value + Object dup = values[idx]; values[idx] = value; ! return dup; } int rehashVal = rehash(idx); *************** *** 176,184 **** values[idx] = value; ++items; ! return; } else if(keys[idx] == key) { // duplicate value values[idx] = value; ! return; } ++rehashCnt; --- 177,186 ---- values[idx] = value; ++items; ! return null; } else if(keys[idx] == key) { // duplicate value + Object dup = values[idx]; values[idx] = value; ! return dup; } ++rehashCnt; *************** *** 190,194 **** values[bucket] = value; ++items; ! return; } throw new HashtableOverflowException(); --- 192,196 ---- values[bucket] = value; ++items; ! return null; } throw new HashtableOverflowException(); |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 18:54:29
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/collections In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11331/src/org/exist/collections Modified Files: Collection.java Log Message: Switched back to simple LRU page replacement strategy for document data in dom.dbx. As every page is accessed at most two times during storage, the LRDCache did not work very well. Improved the LRU implementation. Index: Collection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/collections/Collection.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Collection.java 10 Aug 2004 20:27:15 -0000 1.49 --- Collection.java 12 Aug 2004 18:54:20 -0000 1.50 *************** *** 842,845 **** --- 842,847 ---- source = new InputSource(new StringReader(data)); XMLReader currentReader = getReader(broker); + if(currentReader == null) + throw new EXistException("No reader!"); DocumentImpl oldDoc = (DocumentImpl)documents.get(name); DocumentImpl document = new DocumentImpl(broker, name, this); |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 16:11:18
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12452/src/org/exist/xmldb Modified Files: RemoteCollection.java Removed Files: DocumentProxy.java Log Message: Removed class DocumentProxy which is no longer required. --- DocumentProxy.java DELETED --- Index: RemoteCollection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteCollection.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** RemoteCollection.java 12 Aug 2004 16:08:49 -0000 1.16 --- RemoteCollection.java 12 Aug 2004 16:11:08 -0000 1.17 *************** *** 28,37 **** import java.io.FileNotFoundException; import java.io.IOException; - import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; - import java.util.List; import java.util.Map; import java.util.Properties; --- 28,35 ---- |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 16:08:58
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11926/src/org/exist/xmldb Modified Files: RemoteCollection.java LocalBinaryResource.java Log Message: Added getContentLength() method to XMLDB resource implementations. Index: LocalBinaryResource.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/LocalBinaryResource.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LocalBinaryResource.java 3 Aug 2004 15:25:58 -0000 1.4 --- LocalBinaryResource.java 12 Aug 2004 16:08:49 -0000 1.5 *************** *** 193,196 **** --- 193,216 ---- } + /* (non-Javadoc) + * @see org.exist.xmldb.EXistResource#getContentLength() + */ + public int getContentLength() throws XMLDBException { + DBBroker broker = null; + try { + broker = pool.get(user); + DocumentImpl document = getDocument(broker, false); + if (!document.getPermissions().validate(user, Permission.READ)) + throw new XMLDBException(ErrorCodes.PERMISSION_DENIED, + "permission denied to read resource"); + return document.getContentLength(); + } catch (EXistException e) { + throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage(), + e); + } finally { + pool.release(broker); + } + } + protected DocumentImpl getDocument(DBBroker broker, boolean lock) throws XMLDBException { DocumentImpl document = null; Index: RemoteCollection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteCollection.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** RemoteCollection.java 7 Aug 2004 14:55:59 -0000 1.15 --- RemoteCollection.java 12 Aug 2004 16:08:49 -0000 1.16 *************** *** 290,354 **** 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 { - collection = (Hashtable) rpcClient.execute("getCollectionDesc", 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 documents = (Vector) collection.get("documents"); - String docName; - String childName; - Hashtable hash; - DocumentProxy proxy; - Permission perm; - int p, dsize = documents.size(); - for (int i = 0; i < dsize; i++) { - hash = (Hashtable) documents.elementAt(i); - docName = (String) hash.get("name"); - if ((p = docName.lastIndexOf('/')) > -1) - docName = docName.substring(p + 1); - 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")); - resources.add(proxy); - } - return resources; - } - private void readCollection() throws XMLDBException { childCollections = new HashMap(); --- 290,317 ---- throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, "an io error occurred", ioe); } String docName = (String) hash.get("name"); int p; if ((p = docName.lastIndexOf('/')) > -1) docName = docName.substring(p + 1); ! Permission perm = new Permission( (String) hash.get("owner"), (String) hash.get("group"), ((Integer) hash.get("permissions")).intValue()); ! String type = (String)hash.get("type"); ! int contentLen = ((Integer)hash.get("content-length")).intValue(); ! if(type == null || type.equals("XMLResource")) { ! RemoteXMLResource r = new RemoteXMLResource(this, -1, -1, docName, null); ! r.setPermissions(perm); ! r.setContentLength(contentLen); return r; } else { ! RemoteBinaryResource r = new RemoteBinaryResource(this, docName); ! r.setContentLength(contentLen); ! r.setPermissions(perm); return r; } } private void readCollection() throws XMLDBException { childCollections = new HashMap(); |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 16:07:57
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11583/src/org/exist/xmlrpc Modified Files: RpcConnection.java Log Message: Added getContentLength() method to XMLDB resource implementations. Index: RpcConnection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcConnection.java,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** RpcConnection.java 3 Aug 2004 16:47:38 -0000 1.66 --- RpcConnection.java 12 Aug 2004 16:07:18 -0000 1.67 *************** *** 381,384 **** --- 381,385 ---- ? "BinaryResource" : "XMLResource"); + hash.put("content-length", new Integer(doc.getContentLength())); return hash; } finally { |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 16:07:57
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11583/src/org/exist/xmldb Modified Files: LocalXMLResource.java RemoteBinaryResource.java EXistResource.java RemoteXMLResource.java Log Message: Added getContentLength() method to XMLDB resource implementations. Index: EXistResource.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/EXistResource.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EXistResource.java 3 Aug 2004 15:25:58 -0000 1.3 --- EXistResource.java 12 Aug 2004 16:07:17 -0000 1.4 *************** *** 42,45 **** --- 42,47 ---- Permission getPermissions() throws XMLDBException; + + int getContentLength() throws XMLDBException; } Index: LocalXMLResource.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/LocalXMLResource.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** LocalXMLResource.java 10 Aug 2004 20:06:03 -0000 1.39 --- LocalXMLResource.java 12 Aug 2004 16:07:17 -0000 1.40 *************** *** 312,315 **** --- 312,335 ---- } } + + /* (non-Javadoc) + * @see org.exist.xmldb.EXistResource#getContentLength() + */ + public int getContentLength() throws XMLDBException { + DBBroker broker = null; + try { + broker = pool.get(user); + DocumentImpl document = getDocument(broker, false); + if (!document.getPermissions().validate(user, Permission.READ)) + throw new XMLDBException(ErrorCodes.PERMISSION_DENIED, + "permission denied to read resource"); + return document.getContentLength(); + } catch (EXistException e) { + throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage(), + e); + } finally { + pool.release(broker); + } + } /** Index: RemoteBinaryResource.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteBinaryResource.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RemoteBinaryResource.java 21 Jun 2004 15:27:36 -0000 1.2 --- RemoteBinaryResource.java 12 Aug 2004 16:07:17 -0000 1.3 *************** *** 49,53 **** --- 49,55 ---- private RemoteCollection parent; private byte[] data = null; + private Permission permissions = null; + private int contentLen = 0; public RemoteBinaryResource(RemoteCollection parent, String documentName) throws XMLDBException { *************** *** 176,178 **** --- 178,188 ---- return permissions; } + + public void setContentLength(int len) { + this.contentLen = len; + } + + public int getContentLength() throws XMLDBException { + return contentLen; + } } Index: RemoteXMLResource.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteXMLResource.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** RemoteXMLResource.java 21 Jun 2004 15:27:36 -0000 1.14 --- RemoteXMLResource.java 12 Aug 2004 16:07:17 -0000 1.15 *************** *** 58,62 **** --- 58,65 ---- protected String content = null; protected File file = null; + protected Permission permissions = null; + protected int contentLen = 0; + protected Properties outputProperties = null; *************** *** 348,351 **** --- 351,362 ---- } + public void setContentLength(int len) { + this.contentLen = len; + } + + public int getContentLength() throws XMLDBException { + return contentLen; + } + public void setPermissions(Permission perms) { permissions = perms; |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 16:07:42
|
Update of /cvsroot/exist/eXist-1.0/samples/org/exist/examples/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11583/samples/org/exist/examples/xmldb Modified Files: Retrieve.java Log Message: Added getContentLength() method to XMLDB resource implementations. Index: Retrieve.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/samples/org/exist/examples/xmldb/Retrieve.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Retrieve.java 9 Feb 2004 08:40:11 -0000 1.8 --- Retrieve.java 12 Aug 2004 16:07:18 -0000 1.9 *************** *** 4,7 **** --- 4,8 ---- import org.exist.storage.serializers.EXistOutputKeys; + import org.exist.xmldb.EXistResource; import org.xmldb.api.DatabaseManager; import org.xmldb.api.base.Collection; *************** *** 49,54 **** if(res == null) System.out.println("document not found!"); ! else System.out.println(res.getContent()); } } --- 50,57 ---- if(res == null) System.out.println("document not found!"); ! else { System.out.println(res.getContent()); + System.out.println("Size: " + ((EXistResource)res).getContentLength()); + } } } |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 15:48:51
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/util/serializer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7372/src/org/exist/util/serializer Modified Files: XMLWriter.java Log Message: Wrong array initialization leads to ArrayIndexOutOfBounds exception. Index: XMLWriter.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/serializer/XMLWriter.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** XMLWriter.java 3 May 2004 13:08:45 -0000 1.8 --- XMLWriter.java 12 Aug 2004 15:48:42 -0000 1.9 *************** *** 60,64 **** static { ! textSpecialChars = new boolean[127]; Arrays.fill(textSpecialChars, false); textSpecialChars['<'] = true; --- 60,64 ---- static { ! textSpecialChars = new boolean[128]; Arrays.fill(textSpecialChars, false); textSpecialChars['<'] = true; *************** *** 67,71 **** textSpecialChars['&'] = true; ! attrSpecialChars = new boolean[127]; Arrays.fill(attrSpecialChars, false); attrSpecialChars['<'] = true; --- 67,71 ---- textSpecialChars['&'] = true; ! attrSpecialChars = new boolean[128]; Arrays.fill(attrSpecialChars, false); attrSpecialChars['<'] = true; |
From: Wolfgang M. M. <wol...@us...> - 2004-08-12 08:07:18
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19879/src/org/exist/storage/store Modified Files: BFile.java Log Message: Fixed initialization error with page offset table in BFile.SinglePage. Index: BFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/BFile.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** BFile.java 11 Aug 2004 12:47:01 -0000 1.30 --- BFile.java 12 Aug 2004 08:07:09 -0000 1.31 *************** *** 1794,1798 **** ph.setDirty(true); ph.setDataLength(0); - ph.setTID((short) -1); //ph.setNextChunk( -1 ); fileHeader.setLastDataPage(page.getPageNum()); --- 1794,1797 ---- *************** *** 1833,1836 **** --- 1832,1836 ---- private void readOffsets() throws IOException { + Arrays.fill(offsets, (short)-1); final int dlen = ph.getDataLength(); for(short pos = 0; pos < dlen; ) { *************** *** 1843,1858 **** public short getNextTID() { for(short i = 0; i < offsets.length; i++) { ! if(offsets[i] == -1) return i; } short tid = (short)offsets.length; ! ph.nextTID = (short)(ph.nextTID * 2); ! short[] t = new short[ph.nextTID]; Arrays.fill(t, (short)-1); System.arraycopy(offsets, 0, t, 0, offsets.length); offsets = t; return tid; } public void setOffset(short tid, int offset) { offsets[tid] = (short)offset; --- 1843,1871 ---- public short getNextTID() { for(short i = 0; i < offsets.length; i++) { ! if(offsets[i] == -1) { return i; + } } short tid = (short)offsets.length; ! short next = (short)(ph.nextTID * 2); ! if(next < 0 || next < ph.nextTID) { ! return -1; ! } ! short[] t = new short[next]; Arrays.fill(t, (short)-1); System.arraycopy(offsets, 0, t, 0, offsets.length); offsets = t; + ph.nextTID = next; return tid; } + private String printContents() { + StringBuffer buf = new StringBuffer(); + for(short i = 0; i < offsets.length; i++) { + buf.append('[').append(i).append(", ").append(offsets[i]).append(']'); + } + return buf.toString(); + } + public void setOffset(short tid, int offset) { offsets[tid] = (short)offset; |
From: Wolfgang M. M. <wol...@us...> - 2004-08-11 12:55:06
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19520/src/org/exist/dom Modified Files: NodeImpl.java Log Message: Some more smaller refactorings in the storage backend. Index: NodeImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/NodeImpl.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** NodeImpl.java 11 Aug 2004 12:47:03 -0000 1.27 --- NodeImpl.java 11 Aug 2004 12:54:57 -0000 1.28 *************** *** 30,34 **** import org.exist.storage.NodePath; import org.exist.storage.Signatures; - import org.exist.storage.store.StorageAddress; import org.w3c.dom.DOMException; import org.w3c.dom.Document; --- 30,33 ---- *************** *** 51,55 **** protected long gid; protected long internalAddress = -1; - protected StorageAddress absoluteAddress = null; protected short nodeType = 0; protected DocumentImpl ownerDocument = null; --- 50,53 ---- *************** *** 216,223 **** return internalAddress; } - - public StorageAddress getAbsoluteAddress() { - return absoluteAddress; - } /** --- 214,217 ---- *************** *** 482,490 **** internalAddress = address; } - - public void setAbsoluteAddress(StorageAddress absoluteAddress) { - this.internalAddress = absoluteAddress.getPointer(); - this.absoluteAddress = absoluteAddress; - } /** --- 476,479 ---- |
From: Wolfgang M. M. <wol...@us...> - 2004-08-11 12:47:40
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18056/src/org/exist/util Modified Files: LongLinkedList.java OrderedLinkedList.java Log Message: Some more smaller refactorings in the storage backend. Index: LongLinkedList.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/LongLinkedList.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** LongLinkedList.java 4 Aug 2004 21:19:32 -0000 1.8 --- LongLinkedList.java 11 Aug 2004 12:47:00 -0000 1.9 *************** *** 12,15 **** --- 12,18 ---- public ListItem prev = null; + public ListItem() { + } + public ListItem( long l ) { this.l = l; Index: OrderedLinkedList.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/util/OrderedLinkedList.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** OrderedLinkedList.java 21 Jul 2004 08:53:55 -0000 1.5 --- OrderedLinkedList.java 11 Aug 2004 12:47:00 -0000 1.6 *************** *** 64,69 **** } ! private Node header = null; ! private Node last = null; private int size = 0; --- 64,69 ---- } ! protected Node header = null; ! protected Node last = null; private int size = 0; |
From: Wolfgang M. M. <wol...@us...> - 2004-08-11 12:47:12
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18056/src/org/exist/storage Modified Files: NativeTextEngine.java Log Message: Some more smaller refactorings in the storage backend. Index: NativeTextEngine.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeTextEngine.java,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** NativeTextEngine.java 10 Aug 2004 20:27:14 -0000 1.67 --- NativeTextEngine.java 11 Aug 2004 12:47:02 -0000 1.68 *************** *** 75,81 **** import org.exist.util.Lock; import org.exist.util.LockException; - import org.exist.util.LongLinkedList; import org.exist.util.Occurrences; - import org.exist.util.OrderedLongLinkedList; import org.exist.util.ProgressIndicator; import org.exist.util.ReadOnlyException; --- 75,79 ---- *************** *** 775,845 **** } - private static class TermFrequencyList extends LongLinkedList { - - protected static class TermFreq extends LongLinkedList.ListItem { - - int count = 1; - - public TermFreq(long l) { - super(l); - } - - public void increment() { - ++count; - } - } - - /* (non-Javadoc) - * @see org.exist.util.LongLinkedList#createListItem(long) - */ - protected ListItem createListItem(long l) { - return new TermFreq(l); - } - - public void incLastTerm() { - if(last != null) - ((TermFreq)last).increment(); - } - - public void setLastTermFreq(int freq) { - if(last != null) - ((TermFreq)last).count = freq; - } - - public TermFreq[] toArray() { - TermFreq[] data = new TermFreq[count]; - ListItem next = first; - int i = 0; - while( next != null ) { - data[i++] = (TermFreq)next; - next = next.next; - } - return data; - } - } - - private final static class WordRef extends Value { - - public WordRef(short collectionId) { - data = new byte[2]; - ByteConversion.shortToByte(collectionId, data, 0); - len = 2; - } - - public WordRef(short collectionId, String word) { - len = UTF8.encoded(word) + 2; - data = new byte[len]; - ByteConversion.shortToByte(collectionId, data, 0); - UTF8.encode(word, data, 2); - } - - /** - * @see java.lang.Object#toString() - */ - public String toString() { - return ByteConversion.byteToShort(data, pos) - + new String(data, pos, len); - } - } /** * This inner class is responsible for actually storing the list of --- 773,776 ---- *************** *** 1139,1143 **** ids = idList.toArray(); Arrays.sort(ids); ! for (int m = 0; m < ids.length; m++) { delta = ids[m].l - prevId; if (delta < 0) { --- 1070,1074 ---- ids = idList.toArray(); Arrays.sort(ids); ! for (int m = 0; m < len; m++) { delta = ids[m].l - prevId; if (delta < 0) { *************** *** 1351,1354 **** --- 1282,1391 ---- } + private static class TermFrequencyList { + + protected static class TermFreq implements Comparable { + + long l; + int count = 1; + TermFreq next = null; + + public TermFreq(long l) { + this.l = l; + } + + public void increment() { + ++count; + } + + public int compareTo(Object o) { + final TermFreq other = (TermFreq)o; + if(l == other.l) + return 0; + else + return l > other.l ? 1 : -1; + } + } + + private TermFreq first = null; + private TermFreq last = null; + private int count = 0; + + public void add( long l ) { + if(first == null) { + first = new TermFreq( l ); + last = first; + } else { + TermFreq next = new TermFreq( l ); + last.next = next; + last = next; + } + ++count; + } + + public void incLastTerm() { + if(last != null) + ((TermFreq)last).increment(); + } + + public void setLastTermFreq(int freq) { + if(last != null) + ((TermFreq)last).count = freq; + } + + public long getLast() { + if(last != null) + return last.l; + else + return -1; + } + + public boolean contains(long l) { + TermFreq next = first; + while( next != null ) { + if(next.l == l) + return true; + next = next.next; + } + return false; + } + + public int getSize() { + return count; + } + + public TermFreq[] toArray() { + TermFreq[] data = new TermFreq[count]; + TermFreq next = first; + int i = 0; + while( next != null ) { + data[i++] = (TermFreq)next; + next = next.next; + } + return data; + } + } + + private final static class WordRef extends Value { + + public WordRef(short collectionId) { + data = new byte[2]; + ByteConversion.shortToByte(collectionId, data, 0); + len = 2; + } + + public WordRef(short collectionId, String word) { + len = UTF8.encoded(word) + 2; + data = new byte[len]; + ByteConversion.shortToByte(collectionId, data, 0); + UTF8.encode(word, data, 2); + } + /** + * @see java.lang.Object#toString() + */ + public String toString() { + return ByteConversion.byteToShort(data, pos) + + new String(data, pos, len); + } + } } |
From: Wolfgang M. M. <wol...@us...> - 2004-08-11 12:47:12
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18056/src/org/exist/dom Modified Files: NodeImpl.java Log Message: Some more smaller refactorings in the storage backend. Index: NodeImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/NodeImpl.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** NodeImpl.java 27 Jun 2004 21:10:07 -0000 1.26 --- NodeImpl.java 11 Aug 2004 12:47:03 -0000 1.27 *************** *** 30,33 **** --- 30,34 ---- import org.exist.storage.NodePath; import org.exist.storage.Signatures; + import org.exist.storage.store.StorageAddress; import org.w3c.dom.DOMException; import org.w3c.dom.Document; *************** *** 50,53 **** --- 51,55 ---- protected long gid; protected long internalAddress = -1; + protected StorageAddress absoluteAddress = null; protected short nodeType = 0; protected DocumentImpl ownerDocument = null; *************** *** 215,218 **** --- 217,224 ---- } + public StorageAddress getAbsoluteAddress() { + return absoluteAddress; + } + /** * @see org.w3c.dom.Node#getLastChild() *************** *** 477,480 **** --- 483,491 ---- } + public void setAbsoluteAddress(StorageAddress absoluteAddress) { + this.internalAddress = absoluteAddress.getPointer(); + this.absoluteAddress = absoluteAddress; + } + /** * Set the node name. |
From: Wolfgang M. M. <wol...@us...> - 2004-08-11 12:47:11
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18056/src/org/exist/storage/store Modified Files: ItemId.java StorageAddress.java DOMFile.java BFile.java Log Message: Some more smaller refactorings in the storage backend. Index: DOMFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/DOMFile.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** DOMFile.java 3 Aug 2004 16:45:46 -0000 1.46 --- DOMFile.java 11 Aug 2004 12:47:01 -0000 1.47 *************** *** 1310,1320 **** if (value.length < l) { // value is smaller than before ! System.out.println(value.length + " < " + l + ": " + new String(value)); ! System.out.println(rec.page.page.getPageInfo() + "; offset = " ! + rec.offset + "; data-len = " ! + rec.page.getPageHeader().getDataLength() ! + "; previous-page = " ! + rec.page.getPageHeader().getPrevDataPage()); ! throw new RuntimeException("shrinked"); } else if (value.length > l) { throw new IllegalStateException("value too long: expected: " --- 1310,1314 ---- if (value.length < l) { // value is smaller than before ! throw new IllegalStateException("shrinked"); } else if (value.length > l) { throw new IllegalStateException("value too long: expected: " *************** *** 1451,1496 **** int pos; short currentId, vlen; ! int dlen; ! outerLoop: while (pageNr > -1) { page = getCurrentPage(pageNr); dataCache.add(page); ! dlen = page.getPageHeader().getDataLength(); ! for (pos = 0; pos < dlen;) { ! currentId = ByteConversion.byteToShort(page.data, pos); ! if (ItemId.isLink(currentId)) { ! if (ItemId.getId(currentId) == targetId) { ! if(!skipLinks) ! return new RecordPos(pos + 2, page, currentId); ! long forwardLink = ByteConversion.byteToLong(page.data, ! pos + 2); ! // load the link page ! pageNr = StorageAddress.pageFromPointer(forwardLink); ! targetId = StorageAddress.tidFromPointer(forwardLink); ! // LOG.debug("following link on " + StorageAddress.pageFromPointer(forwardLink) + ! // " to page " ! // + pageNr ! // + "; tid=" ! // + targetId); ! continue outerLoop; ! } else { ! pos += 10; ! } ! } else if (ItemId.getId(currentId) == targetId) ! return new RecordPos(pos + 2, page, currentId); ! else { ! vlen = ByteConversion.byteToShort(page.data, pos + 2); ! if (ItemId.isRelocated(currentId)) { ! pos += vlen == OVERFLOW ? 20 : vlen + 12; ! } else ! pos += vlen == OVERFLOW ? 12 : vlen + 4; ! } ! } ! pageNr = page.getPageHeader().getNextDataPage(); ! if (pageNr == page.getPageNum()) { ! LOG.debug("circular link to next page on " + pageNr); ! return null; ! } ! LOG.debug( owner.toString() + ": tid " --- 1445,1460 ---- int pos; short currentId, vlen; ! RecordPos rec; while (pageNr > -1) { page = getCurrentPage(pageNr); dataCache.add(page); ! rec = page.findRecord(targetId); ! if(rec == null) { ! pageNr = page.getPageHeader().getNextDataPage(); ! if (pageNr == page.getPageNum()) { ! LOG.debug("circular link to next page on " + pageNr); ! return null; ! } ! LOG.debug( owner.toString() + ": tid " *************** *** 1500,1503 **** --- 1464,1483 ---- + ". Loading " + pageNr + "; contents: " + debugPageContents(page)); + } else if(rec.isLink) { + if(!skipLinks) + return rec; + long forwardLink = ByteConversion.byteToLong(page.data, + rec.offset); + // load the link page + pageNr = StorageAddress.pageFromPointer(forwardLink); + targetId = StorageAddress.tidFromPointer(forwardLink); + LOG.debug("following link on " + StorageAddress.pageFromPointer(forwardLink) + + " to page " + + pageNr + + "; tid=" + + targetId); + } else { + return rec; + } } return null; *************** *** 1661,1680 **** protected final class DOMPage implements Cacheable { byte[] data; ! int len = 0; ! Page page; ! int refCount = 0; - int timestamp = 0; ! boolean saved = true; ! boolean invalidated = false; public DOMPage() { page = createNewPage(); // LOG.debug("Created new page: " + page.getPageNum()); data = new byte[fileHeader.getWorkSize()]; --- 1641,1667 ---- protected final class DOMPage implements Cacheable { + // the raw working data (without page header) of this page byte[] data; ! ! // the current size of the used data int len = 0; ! ! // the low-level page Page page; ! DOMFilePageHeader ph; ! ! // fields required by Cacheable int refCount = 0; int timestamp = 0; ! ! // has the page been saved or is it dirty? boolean saved = true; ! ! // set to true if the page has been removed from the cache boolean invalidated = false; public DOMPage() { page = createNewPage(); + ph = (DOMFilePageHeader)page.getPageHeader(); // LOG.debug("Created new page: " + page.getPageNum()); data = new byte[fileHeader.getWorkSize()]; *************** *** 1697,1700 **** --- 1684,1716 ---- } + public RecordPos findRecord(short targetId) { + final int dlen = ph.getDataLength(); + short currentId; + short vlen; + RecordPos rec = null; + for (int pos = 0; pos < dlen;) { + currentId = ByteConversion.byteToShort(data, pos); + if (ItemId.isLink(currentId)) { + if (ItemId.matches(currentId, targetId)) { + rec = new RecordPos(pos + 2, this, currentId); + rec.isLink = true; + break; + } else { + pos += 10; + } + } else if (ItemId.matches(currentId, targetId)) { + rec = new RecordPos(pos + 2, this, currentId); + break; + } else { + vlen = ByteConversion.byteToShort(data, pos + 2); + if (ItemId.isRelocated(currentId)) { + pos += vlen == OVERFLOW ? 20 : vlen + 12; + } else + pos += vlen == OVERFLOW ? 12 : vlen + 4; + } + } + return rec; + } + /* * (non-Javadoc) *************** *** 1752,1756 **** public DOMFilePageHeader getPageHeader() { ! return (DOMFilePageHeader) page.getPageHeader(); } --- 1768,1772 ---- public DOMFilePageHeader getPageHeader() { ! return ph; } *************** *** 1771,1775 **** try { data = page.read(); ! DOMFilePageHeader ph = (DOMFilePageHeader) page.getPageHeader(); len = ph.getDataLength(); if (data.length == 0) { --- 1787,1791 ---- try { data = page.read(); ! ph = (DOMFilePageHeader) page.getPageHeader(); len = ph.getDataLength(); if (data.length == 0) { *************** *** 1785,1793 **** saved = true; } ! public void write() { if (page == null) return; try { - DOMFilePageHeader ph = (DOMFilePageHeader) page.getPageHeader(); if (!ph.isDirty()) return; ph.setDataLength(len); --- 1801,1808 ---- saved = true; } ! public void write() { if (page == null) return; try { if (!ph.isDirty()) return; ph.setDataLength(len); *************** *** 1995,2003 **** protected final static class RecordPos { int offset = -1; - - DOMPage page = null; - short tid = 0; public RecordPos(int offset, DOMPage page, short tid) { --- 2010,2017 ---- protected final static class RecordPos { + DOMPage page = null; int offset = -1; short tid = 0; + boolean isLink = false; public RecordPos(int offset, DOMPage page, short tid) { Index: StorageAddress.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/StorageAddress.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StorageAddress.java 3 May 2004 13:08:45 -0000 1.4 --- StorageAddress.java 11 Aug 2004 12:47:01 -0000 1.5 *************** *** 12,16 **** */ public class StorageAddress { ! /** * Create virtual address from page number and offset (tid) --- 12,16 ---- */ public class StorageAddress { ! /** * Create virtual address from page number and offset (tid) Index: BFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/BFile.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** BFile.java 10 Aug 2004 20:27:17 -0000 1.29 --- BFile.java 11 Aug 2004 12:47:01 -0000 1.30 *************** *** 1772,1778 **** --- 1772,1785 ---- private final class SinglePage extends DataPage { + // the raw working data of this page (without page header) byte[] data = null; + + // the low-level page Page page; + + // the page header BFilePageHeader ph; + + // table mapping record ids (tids) to offsets short[] offsets = null; *************** *** 1826,1830 **** private void readOffsets() throws IOException { - // Arrays.fill(offsets, -1); final int dlen = ph.getDataLength(); for(short pos = 0; pos < dlen; ) { --- 1833,1836 ---- Index: ItemId.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/ItemId.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ItemId.java 10 Aug 2004 20:27:17 -0000 1.3 --- ItemId.java 11 Aug 2004 12:47:01 -0000 1.4 *************** *** 27,30 **** --- 27,31 ---- * in the dom.dbx persistent DOM store. * + * @see org.exist.storage.store.DOMFile * @author wolf */ *************** *** 40,43 **** --- 41,48 ---- } + public final static boolean matches(short id, short targetId) { + return ((short)(id & ID_MASK)) == targetId; + } + public final static short setIsRelocated(short id) { return (short)(id | RELOCATED_MASK); |
From: Wolfgang M. M. <wol...@us...> - 2004-08-10 20:34:26
|
Update of /cvsroot/exist/eXist-1.0/webapp/mods In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26376/webapp/mods Modified Files: overview.xq config.xqm Log Message: MODS metadata demo application (to be continued). Index: config.xqm =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/mods/config.xqm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.xqm 22 Jul 2004 19:00:48 -0000 1.2 --- config.xqm 10 Aug 2004 20:34:14 -0000 1.3 *************** *** 2,5 **** --- 2,6 ---- declare namespace mods="http://www.loc.gov/mods/v3"; + declare namespace util="http://exist-db.org/xquery/util"; (: the base URI for the chiba servlet :) *************** *** 10,14 **** declare variable $c:detailsXsl { "styles/mods-detailed.xsl" }; ! declare variable $c:css { "styles/default-style.css" }; (: called to select elements from a record for display :) --- 11,15 ---- declare variable $c:detailsXsl { "styles/mods-detailed.xsl" }; ! declare variable $c:css { "styles/display.css" }; (: called to select elements from a record for display :) *************** *** 23,26 **** --- 24,53 ---- }; + declare function c:orderByName($m as element()) as xs:string? + { + let $name := $m/mods:name[1], + $order := + if($name/mods:namePart[@type='family']) then + concat($name/mods:namePart[@type='family'], ", ", $name/mods:namePart[@type='given']) + else if($name/mods:namePart) then + xs:string($name/mods:namePart) + else + "" + return + (util:log("debug", $order), + $order) + }; + + (: Map order parameter to xpath for order by clause :) + declare function c:orderExpr($field as xs:string) as xs:string + { + if ($field = "creator") then + "c:orderByName($m)" + else if ($field = "title") then + "$m/m:titleInfo[1]/m:title[1]" + else + "$m/m:originInfo/m:dateCreated[1] descending" + }; + declare function c:sidebar($url as xs:string) { Index: overview.xq =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/mods/overview.xq,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** overview.xq 22 Jul 2004 19:00:48 -0000 1.2 --- overview.xq 10 Aug 2004 20:34:14 -0000 1.3 *************** *** 23,27 **** else ( <p>Removing document {$doc} from collection {$path}.</p>, ! let $collection := xmldb:collection(concat("xmldb:exist://", $path), $user, $pass) --- 23,27 ---- else ( <p>Removing document {$doc} from collection {$path}.</p>, ! let $collection := xmldb:collection(concat("xmldb:exist://", $path), $user, $pass) *************** *** 48,62 **** }; - (: Map order parameter to xpath for order by clause :) - declare function b:orderExpr($field as xs:string) as xs:string - { - if ($field = "creator") then - "$m/m:name[1]/m:namePart[@type='family'],$m/m:name[1]/m:namePart[@type='given']" - else if ($field = "title") then - "$m/m:titleInfo[1]/m:title" - else - "$m/m:originInfo/m:dateIssued[1] descending" - }; - (: Create an XPath expression for the current field and search terms :) declare function b:createXPath($user as xs:string, $terms as xs:string) --- 48,51 ---- *************** *** 121,127 **** declare function b:buildQuery($xpath as xs:string, $order as xs:string) as xs:string { ! let $orderExpr := b:orderExpr($order) return ! concat("for $m in ", $xpath, " order by ", $orderExpr, " return $m") }; --- 110,119 ---- declare function b:buildQuery($xpath as xs:string, $order as xs:string) as xs:string { ! let $orderExpr := c:orderExpr($order) return ! concat( ! "import module namespace c='http://exist-db.org/modules/mods-config' ! at 'config.xqm'; ! for $m in ", $xpath, " order by ", $orderExpr, " return $m") }; |
From: Wolfgang M. M. <wol...@us...> - 2004-08-10 20:34:23
|
Update of /cvsroot/exist/eXist-1.0/webapp/mods/styles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26376/webapp/mods/styles Modified Files: default-style.css overview.xsl Added Files: display.css Log Message: MODS metadata demo application (to be continued). Index: overview.xsl =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/mods/styles/overview.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** overview.xsl 22 Jul 2004 19:00:49 -0000 1.2 --- overview.xsl 10 Aug 2004 20:34:14 -0000 1.3 *************** *** 14,17 **** --- 14,56 ---- <xsl:template match="items"> <div id="content"> + <div id="navigation"> + <form action="overview.xq" method="GET"> + <table> + <tr> + <th align="left">Display:</th> + <th align="right">Order by:</th> + </tr> + <tr> + <td align="left"> + <select name="howmany" onChange="form.submit()"> + <option>10</option> + <option selected="true">50</option> + <option>100</option> + </select> + </td> + <td align="right"> + <select name="order" onChange="form.submit()"> + <option>Date</option> + <option value="title">Title</option> + <option value="creator">Creator</option> + </select> + </td> + <input type="hidden" name="start" value="{@start}"/> + </tr> + <tr> + <td align="left"> + <xsl:if test="@start > 1"> + <a href="?start={@start - @max}&howmany={@max}"><< previous</a> + </xsl:if> + </td> + <td align="right"> + <xsl:if test="@next <= @hits"> + <a href="?start={@next}&howmany={@max}">more >></a> + </xsl:if> + </td> + </tr> + </table> + </form> + </div> <xsl:apply-templates select="item"/> </div> *************** *** 20,26 **** <xsl:template match="item"> <div class="record"> - <a href="{@chiba}&instance=/chiba/exist{../@collection}/{@doc}&submitsave=store.xq?document={@doc}"> - <img src="images/edit.gif"/> - </a> <a href="?action=remove&doc={java:java.net.URLEncoder.encode(@doc)}&collection={java:java.net.URLEncoder.encode(../@collection)}"><img src="images/delete.gif"/></a> <p class="citation"> --- 59,62 ---- *************** *** 32,39 **** <xsl:apply-templates select="m:name"/> </p> ! <p class="keywords"> ! <span class="heading">Topics: </span> ! <xsl:apply-templates select="m:subject/m:topic|m:subject/m:geographic"/> ! </p> <xsl:apply-templates select="m:abstract"/> </div> --- 68,77 ---- <xsl:apply-templates select="m:name"/> </p> ! <xsl:if test="m:subject"> ! <p class="keywords"> ! <span class="heading">Topics: </span> ! <xsl:apply-templates select="m:subject/m:topic|m:subject/m:geographic"/> ! </p> ! </xsl:if> <xsl:apply-templates select="m:abstract"/> </div> Index: default-style.css =================================================================== RCS file: /cvsroot/exist/eXist-1.0/webapp/mods/styles/default-style.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** default-style.css 22 Jul 2004 19:00:49 -0000 1.1 --- default-style.css 10 Aug 2004 20:34:14 -0000 1.2 *************** *** 20,28 **** } - #content { - margin-left: 190px; - background-color: white; - } - #notes { border-top: solid 1px #DEDEDE; --- 20,23 ---- *************** *** 30,42 **** #top { ! margin: 0; } #top #menubar { width: 100%; ! padding-top: 3px; ! padding-bottom: 3px; margin-top: 5px; - margin-bottom: 15px; border-top: solid 1px #DEDEDE; border-bottom: solid 1px #DEDEDE; --- 25,36 ---- #top { ! margin-bottom: 5px; } #top #menubar { width: 100%; ! padding-top: 4px; ! padding-bottom: 4px; margin-top: 5px; border-top: solid 1px #DEDEDE; border-bottom: solid 1px #DEDEDE; *************** *** 62,69 **** #sidebar { ! float: left; ! width: 180px; display: block; ! padding-top: 10px; } --- 56,93 ---- #sidebar { ! position: absolute; ! margin-top: 15px; ! width: 16%; display: block; ! overflow: hidden; ! } ! ! #content2col { ! position: absolute; ! left: 18%; ! width: 81%; ! margin-top: 15px; ! display: block; ! background-color: white; ! overflow: hidden; ! } ! ! #content { ! position: absolute; ! left: 18%; ! width: 62%; ! margin-top: 15px; ! display: block; ! background-color: white; ! overflow: hidden; ! } ! ! #news { ! position: absolute; ! width: 18%; ! left: 82%; ! margin-top: 15px; ! display: block; ! overflow: hidden; } *************** *** 83,91 **** font-size: 160%; font-weight: normal; ! color: #fff; ! background-color: #b0b0b0; border: 1px solid #999; margin-left: 0px; margin-bottom: 15px; padding-left: 5px; padding-right: 5px; --- 107,116 ---- font-size: 160%; font-weight: normal; ! color: white; ! background-color: #0990EE; border: 1px solid #999; margin-left: 0px; margin-bottom: 15px; + margin-top: 0px; padding-left: 5px; padding-right: 5px; *************** *** 196,200 **** .block { ! margin:6px 6px 12px 6px; padding: 4px; background: #fff; --- 221,225 ---- .block { ! margin:0px 6px 12px 6px; padding: 4px; background: #fff; *************** *** 203,208 **** .block h3 { ! background: #bbb; ! color: #fff; margin: -4px -4px 4px -4px; padding: 4px; --- 228,233 ---- .block h3 { ! background: #ddd; ! color: #000; margin: -4px -4px 4px -4px; padding: 4px; *************** *** 212,217 **** .block ul { ! margin-left: 0; ! padding-left: 0; list-style-type: none; } --- 237,242 ---- .block ul { ! margin: 0; ! padding: 0; list-style-type: none; } *************** *** 220,227 **** } .block a { display: block; padding: 3px; ! font-size: 11px; color: #666666; font-weight: normal; --- 245,263 ---- } + .block .date { + text-align: right; + font-size: 9.5pt; + font-style: italic; + border-bottom: 1px solid #999; + } + + .block .headline { + margin-bottom: 10px; + } + .block a { display: block; padding: 3px; ! font-size: small; color: #666666; font-weight: normal; *************** *** 251,267 **** .xmlsrc { ! margin-top: 20px; ! margin-bottom: 20px; ! padding-right: 10px; ! text-align: right; } .filename { ! font-family: Courier, monospace; ! font-size: 120%; } .option { ! font-family: Courier, monospace; } --- 287,303 ---- .xmlsrc { ! margin-top: 20px; ! margin-bottom: 20px; ! padding-right: 10px; ! text-align: right; } .filename { ! font-family: Courier, monospace; ! font-size: 120%; } .option { ! font-family: Courier, monospace; } *************** *** 275,279 **** .command { ! font-weight: bold; } --- 311,315 ---- .command { ! font-weight: bold; } *************** *** 283,287 **** div.screen { ! font-family: Courier, monospace; } --- 319,323 ---- div.screen { ! font-family: Courier, monospace; } *************** *** 291,295 **** font-family: Courier, monospace; text-align: left; ! background: #AABBCC; } --- 327,331 ---- font-family: Courier, monospace; text-align: left; ! background: #ddd; } *************** *** 333,337 **** padding-bottom: 10px; text-align: left; ! background: #eee; border: 1px solid #999; } --- 369,373 ---- padding-bottom: 10px; text-align: left; ! background: #fafafa; border: 1px solid #999; } --- NEW FILE: display.css --- @import url(default-style.css); #navigation { background: #ddd; margin: 10px; padding: 10px; width: 457px; } #navigation table { width: 100%; font-size: 8pt; } |
From: Wolfgang M. M. <wol...@us...> - 2004-08-10 20:34:22
|
Update of /cvsroot/exist/eXist-1.0/webapp/mods/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26376/webapp/mods/images Added Files: delete.gif Log Message: MODS metadata demo application (to be continued). --- NEW FILE: delete.gif --- (This appears to be a binary file; contents omitted.) |
From: Wolfgang M. M. <wol...@us...> - 2004-08-10 20:28:02
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24902/src/org/exist/storage Modified Files: NativeTextEngine.java BrokerPool.java Log Message: Refactored some methods to improve performance during storage and indexing. Index: NativeTextEngine.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeTextEngine.java,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** NativeTextEngine.java 4 Aug 2004 21:19:32 -0000 1.66 --- NativeTextEngine.java 10 Aug 2004 20:27:14 -0000 1.67 *************** *** 1164,1167 **** --- 1164,1168 ---- words[k].clear(); } + // dbWords.debugFreeList(); } Index: BrokerPool.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/BrokerPool.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** BrokerPool.java 4 Aug 2004 14:48:06 -0000 1.27 --- BrokerPool.java 10 Aug 2004 20:27:14 -0000 1.28 *************** *** 38,45 **** import org.exist.util.Lock; import org.exist.util.ReentrantReadWriteLock; import org.exist.xmldb.ShutdownListener; /** ! * This class controls all available instances of the database. * Use it to configure, start and stop database instances. You may * have multiple instances defined, each using its own configuration, --- 38,47 ---- import org.exist.util.Lock; import org.exist.util.ReentrantReadWriteLock; + import org.exist.util.XMLReaderObjectFactory; + import org.exist.util.XMLReaderPool; import org.exist.xmldb.ShutdownListener; /** ! * This class controls all available instances of the database. * Use it to configure, start and stop database instances. You may * have multiple instances defined, each using its own configuration, *************** *** 175,183 **** --- 177,210 ---- private boolean initializing = true; + /** + * The security manager for this database instance. + */ private org.exist.security.SecurityManager secManager = null; + + /** + * SyncDaemon is a daemon thread which periodically triggers a cache sync. + */ private SyncDaemon syncDaemon; + + /** + * ShutdownListener will be notified when the database instance shuts down. + */ private ShutdownListener shutdownListener = null; + + /** + * The global pool for compiled XQuery expressions. + */ private XQueryPool xqueryCache; + + /** + * The global collection cache. + */ protected CollectionCache collectionsCache; + + /** + * Global pool for SAX XMLReader instances. + */ + protected XMLReaderPool xmlReaderPool; + private Lock globalXUpdateLock = new ReentrantReadWriteLock("xupdate"); *************** *** 209,212 **** --- 236,240 ---- xqueryCache = new XQueryPool(); collectionsCache = new CollectionCache(COLLECTION_BUFFER_SIZE); + xmlReaderPool = new XMLReaderPool(new XMLReaderObjectFactory(this), 5, 0); initialize(); } *************** *** 236,243 **** --- 264,281 ---- } + /** + * Returns the global collections cache. Collection objects + * are shared within one database instance. + * + * @return + */ public CollectionCache getCollectionsCache() { return collectionsCache; } + public XMLReaderPool getParserPool() { + return xmlReaderPool; + } + protected DBBroker createBroker() throws EXistException { DBBroker broker = BrokerFactory.getInstance(this, conf); *************** *** 389,395 **** public synchronized void shutdown(boolean killed) { syncDaemon.shutDown(); ! while (pool.size() < brokers) try { ! this.wait(); } catch (InterruptedException e) { } --- 427,433 ---- public synchronized void shutdown(boolean killed) { syncDaemon.shutDown(); ! while (threads.size() > 0) try { ! this.wait(2000); } catch (InterruptedException e) { } |