From xindicehmason@example.net Tue Aug 07 13:45:18 2007 Return-Path: <xindicehmason@example.net> Delivered-To: hmason@example.net Received: (qmail 46156 invoked from network); 7 Aug 2007 13:45:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Aug 2007 13:45:18 -0000 Received: (qmail 97293 invoked by uid 500); 7 Aug 2007 13:45:17 -0000 Delivered-To: hmason@example.net Received: (qmail 97265 invoked by uid 500); 7 Aug 2007 13:45:17 -0000 Mailing-List: contact hmason@example.net; run by ezmlm Precedence: bulk list-help: <mailto:hmason@example.net> list-unsubscribe: <mailto:hmason@example.net> List-Post: <mailto:hmason@example.net> Reply-To: hmason@example.net List-Id: <xindice-dev.xml.apache.org> Delivered-To: mailing list hmason@example.net Received: (qmail 97253 invoked by uid 500); 7 Aug 2007 13:45:16 -0000 Delivered-To: hmason@example.net Received: (qmail 97250 invoked by uid 99); 7 Aug 2007 13:45:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 06:45:16 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 13:45:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 17D981A981A; Tue, 7 Aug 2007 06:44:57 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r563499 - /xml/xindice/trunk/java/tests/src/org/apache/xindice/core/CollectionTest.java Date: Tue, 07 Aug 2007 13:44:56 -0000 To: hmason@example.net From: hmason@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <hmason@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: vgritsenko Date: Tue Aug 7 06:44:56 2007 New Revision: 563499 URL: http://svn.apache.org/viewvc?view=rev&rev=563499 Log: start all threads at once Modified: xml/xindice/trunk/java/tests/src/org/apache/xindice/core/CollectionTest.java Modified: xml/xindice/trunk/java/tests/src/org/apache/xindice/core/CollectionTest.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/tests/src/org/apache/xindice/core/CollectionTest.java?view=diff&rev=563499&r1=563498&r2=563499 ============================================================================== --- xml/xindice/trunk/java/tests/src/org/apache/xindice/core/CollectionTest.java (original) +++ xml/xindice/trunk/java/tests/src/org/apache/xindice/core/CollectionTest.java Tue Aug 7 06:44:56 2007 @@ -153,53 +153,61 @@ } public void testConcurrentCreateCollection() throws Exception { + final int THREADS = 10; final String name = "create"; - try { - final int THREADS = 10; - Thread[] threads = new Thread[THREADS]; - final Counter count = new Counter(); - - for (int i = 0; i < THREADS; i++) { + final Object go = new Object(); + final Counter count = new Counter(); - threads[i] = new Thread() { - public void run() { + Thread[] threads = new Thread[THREADS]; + for (int i = 0; i < THREADS; i++) { + threads[i] = new Thread() { + public void run() { + synchronized (go) { try { - db.createCollection(name, new Configuration( - DOMParser.toDocument( - "<collection compressed='true' name='" + name + "' inline-metadata='true'>" + - " <filer class='org.apache.xindice.core.filer.BTreeFiler' />" + - "</collection>"), false - )); - } catch (DBException e) { - if (e.faultCode == FaultCodes.COL_DUPLICATE_COLLECTION) { - count.incCount(); - } else { - throw new RuntimeException("Failure: " + e); - } - } catch (XindiceException e) { - // ignore + go.wait(); + } catch (InterruptedException e) { /* ignored */ } + } + + try { + db.createCollection(name, new Configuration( + DOMParser.toDocument( + "<collection compressed='true' name='" + name + "' inline-metadata='true'>" + + " <filer class='org.apache.xindice.core.filer.BTreeFiler' />" + + "</collection>"), false + )); + } catch (DBException e) { + if (e.faultCode == FaultCodes.COL_DUPLICATE_COLLECTION) { + count.incCount(); + } else { + throw new RuntimeException("Failure: " + e); } + } catch (XindiceException e) { + // ignore } - }; - } + } + }; + threads[i].setName("CollectionTest" + i); + threads[i].start(); + } - for (int i = 0; i < THREADS; i++) { - threads[i].start(); + try { + // Start all the threads at once + Thread.sleep(250); + synchronized (go) { + go.notifyAll(); } - for (int i = 0; i < THREADS; i++) { threads[i].join(); } - - assertEquals(THREADS - 1, count.getCount()); - } finally { Collection col = db.getCollection(name); - if (col != null) { - db.dropCollection(col); - } + if (col != null) { + db.dropCollection(col); + } } + + assertEquals(THREADS - 1, count.getCount()); } private class Counter { From xindicehmason@example.net Wed Aug 08 23:12:24 2007 Return-Path: <xindicehmason@example.net> Delivered-To: hmason@example.net Received: (qmail 45549 invoked from network); 8 Aug 2007 23:12:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Aug 2007 23:12:24 -0000 Received: (qmail 13933 invoked by uid 500); 8 Aug 2007 23:12:23 -0000 Delivered-To: hmason@example.net Received: (qmail 13914 invoked by uid 500); 8 Aug 2007 23:12:23 -0000 Mailing-List: contact hmason@example.net; run by ezmlm Precedence: bulk list-help: <mailto:hmason@example.net> list-unsubscribe: <mailto:hmason@example.net> List-Post: <mailto:hmason@example.net> Reply-To: hmason@example.net List-Id: <xindice-dev.xml.apache.org> Delivered-To: mailing list hmason@example.net Received: (qmail 13903 invoked by uid 500); 8 Aug 2007 23:12:23 -0000 Delivered-To: hmason@example.net Received: (qmail 13900 invoked by uid 99); 8 Aug 2007 23:12:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Aug 2007 16:12:23 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Aug 2007 23:12:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1AAF91A981A; Wed, 8 Aug 2007 16:12:01 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r564043 - in /xml/xindice/trunk: ./ java/src/org/apache/xindice/webadmin/viewer/components/ legal/ lib/ Date: Wed, 08 Aug 2007 23:12:00 -0000 To: hmason@example.net From: hmason@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <hmason@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: vgritsenko Date: Wed Aug 8 16:11:58 2007 New Revision: 564043 URL: http://svn.apache.org/viewvc?view=rev&rev=564043 Log: <action dev="VG" type="update"> Update commons-fileupload to version 1.2. Added (required by upload) commons-io 1.3.2. </action> Added: xml/xindice/trunk/legal/commons-fileupload.LICENSE - copied unchanged from r564034, xml/xindice/trunk/legal/commons-logging.LICENSE xml/xindice/trunk/legal/commons-io.LICENSE - copied unchanged from r564034, xml/xindice/trunk/legal/commons-logging.LICENSE xml/xindice/trunk/lib/commons-fileupload-1.2.jar (with props) xml/xindice/trunk/lib/commons-io-1.3.2.jar (with props) Removed: xml/xindice/trunk/lib/commons-fileupload.jar Modified: xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/MetadataCollectionViewer.java xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/MetadataResourceViewer.java xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/UploadCollectionViewer.java xml/xindice/trunk/status.xml Modified: xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/MetadataCollectionViewer.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/MetadataCollectionViewer.java?view=diff&rev=564043&r1=564042&r2=564043 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/MetadataCollectionViewer.java (original) +++ xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/MetadataCollectionViewer.java Wed Aug 8 16:11:58 2007 @@ -19,20 +19,10 @@ package org.apache.xindice.webadmin.viewer.components; -import java.io.File; -import java.io.IOException; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.List; - -import javax.servlet.ServletException; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.fileupload.DiskFileUpload; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.xindice.core.Collection; @@ -45,9 +35,19 @@ import org.apache.xindice.xml.Xml2HtmlWriter; import org.apache.xindice.xml.dom.DOMParser; import org.apache.xindice.xml.dom.DocumentImpl; + import org.w3c.dom.Document; import org.w3c.dom.Element; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import java.io.IOException; +import java.util.Enumeration; +import java.util.Iterator; + /** * Xindice Html Viewer for Collection Metadata. * @@ -136,36 +136,26 @@ byte[] content = new byte[0]; try { // Create a new file upload handler - DiskFileUpload upload = new DiskFileUpload(); + ServletFileUpload upload = new ServletFileUpload(); // Set upload parameters upload.setSizeMax(-1); + upload.setFileItemFactory(new DiskFileItemFactory()); - try { - File tmpdir = new File(System.getProperty("java.io.tmpdir")); - upload.setRepositoryPath(tmpdir.getCanonicalPath()); - } catch (IOException e1) { - log.error(e1); - } - List items = upload.parseRequest(req); // Process the uploaded fields - Iterator iter = items.iterator(); - while (iter.hasNext()) { - FileItem item = (FileItem) iter.next(); + Iterator i = upload.parseRequest(req).iterator(); + while (i.hasNext()) { + FileItem item = (FileItem) i.next(); if (!item.isFormField()) { - FileItem uploadFile = null; - if (item.getFieldName().equals("customfile") && uploadFile == null) { - uploadFile = item; - content = uploadFile.get(); - } else { - item.delete(); + if (item.getFieldName().equals("customfile")) { + content = item.get(); } - } else { - item.delete(); } + item.delete(); } } catch (FileUploadException e) { log.error(e); } + if (content.length > 0) { Document customDoc; try { Modified: xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/MetadataResourceViewer.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/MetadataResourceViewer.java?view=diff&rev=564043&r1=564042&r2=564043 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/MetadataResourceViewer.java (original) +++ xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/MetadataResourceViewer.java Wed Aug 8 16:11:58 2007 @@ -19,34 +19,34 @@ package org.apache.xindice.webadmin.viewer.components; -import java.io.File; -import java.io.IOException; -import java.util.Iterator; -import java.util.List; - -import javax.servlet.ServletException; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.fileupload.DiskFileUpload; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.xindice.core.Collection; import org.apache.xindice.core.DBException; import org.apache.xindice.core.meta.MetaData; import org.apache.xindice.util.XindiceException; -import org.apache.xindice.webadmin.viewer.HtmlViewerComponent; import org.apache.xindice.webadmin.viewer.HtmlResourceViewer; +import org.apache.xindice.webadmin.viewer.HtmlViewerComponent; import org.apache.xindice.xml.TextWriter; import org.apache.xindice.xml.Xml2HtmlWriter; import org.apache.xindice.xml.dom.DOMParser; import org.apache.xindice.xml.dom.DocumentImpl; + import org.w3c.dom.Document; import org.w3c.dom.Element; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import java.io.IOException; +import java.util.Iterator; + /** * Xindice Html Viewer for Resource Metadata. * @@ -95,36 +95,26 @@ byte[] content = new byte[0]; try { // Create a new file upload handler - DiskFileUpload upload = new DiskFileUpload(); + ServletFileUpload upload = new ServletFileUpload(); // Set upload parameters upload.setSizeMax(-1); + upload.setFileItemFactory(new DiskFileItemFactory()); - try { - File tmpdir = new File(System.getProperty("java.io.tmpdir")); - upload.setRepositoryPath(tmpdir.getCanonicalPath()); - } catch (IOException e1) { - log.error(e1); - } - List items = upload.parseRequest(req); // Process the uploaded fields - Iterator iter = items.iterator(); - while (iter.hasNext()) { - FileItem item = (FileItem) iter.next(); + Iterator i = upload.parseRequest(req).iterator(); + while (i.hasNext()) { + FileItem item = (FileItem) i.next(); if (!item.isFormField()) { - FileItem uploadFile = null; - if (item.getFieldName().equals("customfile") && uploadFile == null) { - uploadFile = item; - content = uploadFile.get(); - } else { - item.delete(); + if (item.getFieldName().equals("customfile")) { + content = item.get(); } - } else { - item.delete(); } + item.delete(); } } catch (FileUploadException e) { log.error(e); } + if (content.length > 0) { Document customDoc; try { Modified: xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/UploadCollectionViewer.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/UploadCollectionViewer.java?view=diff&rev=564043&r1=564042&r2=564043 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/UploadCollectionViewer.java (original) +++ xml/xindice/trunk/java/src/org/apache/xindice/webadmin/viewer/components/UploadCollectionViewer.java Wed Aug 8 16:11:58 2007 @@ -19,19 +19,10 @@ package org.apache.xindice.webadmin.viewer.components; -import java.io.File; -import java.io.IOException; -import java.util.Iterator; -import java.util.List; - -import javax.servlet.ServletException; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.fileupload.DiskFileUpload; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.xindice.core.Collection; @@ -41,8 +32,17 @@ import org.apache.xindice.webadmin.viewer.HtmlCollectionViewer; import org.apache.xindice.webadmin.viewer.HtmlViewerComponent; import org.apache.xindice.xml.dom.DOMParser; + import org.w3c.dom.Document; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import java.io.IOException; +import java.util.Iterator; + /** * Xindice Html Viewer for uploading documents to this collection. * @@ -68,16 +68,11 @@ if (!method.equalsIgnoreCase("POST")) { output.print(UPLOAD_FORM); } else { - // Create a new file upload handler - DiskFileUpload upload = new DiskFileUpload(); + // Create a new file upload handler + ServletFileUpload upload = new ServletFileUpload(); // Set upload parameters upload.setSizeMax(-1); - try { - File tmpdir = new File(System.getProperty("java.io.tmpdir")); - upload.setRepositoryPath(tmpdir.getCanonicalPath()); - } catch (IOException e) { - log.error(e); - } + upload.setFileItemFactory(new DiskFileItemFactory()); Form form; try { @@ -103,21 +98,16 @@ finishViewer(output); } - private Form parseUpload(HttpServletRequest req, DiskFileUpload upload) throws FileUploadException { - List items = upload.parseRequest(req); + private Form parseUpload(HttpServletRequest req, ServletFileUpload upload) throws FileUploadException { Form form = new Form(); // Process the uploaded fields - Iterator iter = items.iterator(); - while (iter.hasNext()) { - FileItem item = (FileItem) iter.next(); - + Iterator i = upload.parseRequest(req).iterator(); + while (i.hasNext()) { + FileItem item = (FileItem) i.next(); if (!item.isFormField()) { if (item.getFieldName().equals("file")) { form.content = item.get(); - item.delete(); - } else { - item.delete(); } } else { if (item.getFieldName().equals("overwrite")) { @@ -126,10 +116,9 @@ form.type = item.getString().charAt(0); } else if (item.getFieldName().equals("name")) { form.name = item.getString(); - } else { - item.delete(); } } + item.delete(); } return form; Added: xml/xindice/trunk/lib/commons-fileupload-1.2.jar URL: http://svn.apache.org/viewvc/xml/xindice/trunk/lib/commons-fileupload-1.2.jar?view=auto&rev=564043 ============================================================================== Binary file - no diff available. Propchange: xml/xindice/trunk/lib/commons-fileupload-1.2.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: xml/xindice/trunk/lib/commons-io-1.3.2.jar URL: http://svn.apache.org/viewvc/xml/xindice/trunk/lib/commons-io-1.3.2.jar?view=auto&rev=564043 ============================================================================== Binary file - no diff available. Propchange: xml/xindice/trunk/lib/commons-io-1.3.2.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: xml/xindice/trunk/status.xml URL: http://svn.apache.org/viewvc/xml/xindice/trunk/status.xml?view=diff&rev=564043&r1=564042&r2=564043 ============================================================================== --- xml/xindice/trunk/status.xml (original) +++ xml/xindice/trunk/status.xml Wed Aug 8 16:11:58 2007 @@ -113,6 +113,10 @@ <changes> <release version="1.2" date="unreleased"> + <action dev="VG" type="update"> + Update commons-fileupload to version 1.2. Added (required by upload) + commons-io 1.3.2. + </action> <action dev="VG" type="remove"> Remove 'Ugly Browser', replaced by WebAdmin. </action> From xindicehmason@example.net Thu Aug 09 01:05:59 2007 Return-Path: <xindicehmason@example.net> Delivered-To: hmason@example.net Received: (qmail 95059 invoked from network); 9 Aug 2007 01:05:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Aug 2007 01:05:59 -0000 Received: (qmail 14745 invoked by uid 500); 9 Aug 2007 01:05:58 -0000 Delivered-To: hmason@example.net Received: (qmail 14565 invoked by uid 500); 9 Aug 2007 01:05:57 -0000 Mailing-List: contact hmason@example.net; run by ezmlm Precedence: bulk list-help: <mailto:hmason@example.net> list-unsubscribe: <mailto:hmason@example.net> List-Post: <mailto:hmason@example.net> Reply-To: hmason@example.net List-Id: <xindice-dev.xml.apache.org> Delivered-To: mailing list hmason@example.net Received: (qmail 14554 invoked by uid 500); 9 Aug 2007 01:05:57 -0000 Delivered-To: hmason@example.net Received: (qmail 14551 invoked by uid 99); 9 Aug 2007 01:05:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Aug 2007 18:05:57 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 01:05:53 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DDE721A981A; Wed, 8 Aug 2007 18:05:32 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r564064 - in /xml/xindice/trunk/src/documentation/content/xdocs/dev: book.xml site-updating.xml todo.xml Date: Thu, 09 Aug 2007 01:05:32 -0000 To: hmason@example.net From: hmason@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <hmason@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: vgritsenko Date: Wed Aug 8 18:05:29 2007 New Revision: 564064 URL: http://svn.apache.org/viewvc?view=rev&rev=564064 Log: add site update instructions Added: xml/xindice/trunk/src/documentation/content/xdocs/dev/site-updating.xml (with props) Modified: xml/xindice/trunk/src/documentation/content/xdocs/dev/book.xml xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml Modified: xml/xindice/trunk/src/documentation/content/xdocs/dev/book.xml URL: http://svn.apache.org/viewvc/xml/xindice/trunk/src/documentation/content/xdocs/dev/book.xml?view=diff&rev=564064&r1=564063&r2=564064 ============================================================================== --- xml/xindice/trunk/src/documentation/content/xdocs/dev/book.xml (original) +++ xml/xindice/trunk/src/documentation/content/xdocs/dev/book.xml Wed Aug 8 18:05:29 2007 @@ -43,8 +43,9 @@ </menu> <menu label="Documentation"> - <menu-item label="How To Contribute" href="doc-contributing.html"/> <menu-item label="Xindice Internals" href="guide-internals.html"/> - <menu-item label="Wiki" href="http://wiki.apache.org/xindice"/> + <menu-item label="Xindice Wiki" href="http://wiki.apache.org/xindice"/> + <menu-item label="Contributing Documentation" href="doc-contributing.html"/> + <menu-item label="Updating Website" href="site-updating.html"/> </menu> </book> Added: xml/xindice/trunk/src/documentation/content/xdocs/dev/site-updating.xml URL: http://svn.apache.org/viewvc/xml/xindice/trunk/src/documentation/content/xdocs/dev/site-updating.xml?view=auto&rev=564064 ============================================================================== --- xml/xindice/trunk/src/documentation/content/xdocs/dev/site-updating.xml (added) +++ xml/xindice/trunk/src/documentation/content/xdocs/dev/site-updating.xml Wed Aug 8 18:05:29 2007 @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + - + - $Id$ + --> + +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "document-v13.dtd"> + +<!-- + - Version: $Revision$ $Date$ + - Author: Vadim Gritsenko (hmason@example.net) + --> +<document> + <header> + <title>How to update Xindice Website</title> + <version>$Revision$</version> + <authors> + <person name="Vadim Gritsenko" email="hmason@example.net"/> + </authors> + </header> + + <body> + <section> + <title>Overview</title> + <p> + This document is intended to familiarize Xindice committers with website + update procedure. + </p> + <p> + Xindice website documentation is written in XML documents and published + to the web by <link href="http://forrest.apache.org/">Apache Forrest</link>. + To update website, follow these simple steps: + </p> + <ul> + <li>Get Forrest.</li> + <li>Get <code>xml-site</code>.</li> + <li>Build website.</li> + <li>Commit to <link href="http://svn.apache.org/repos/asf/xml/site/targets/xindice/">xml-site</link>.</li> + <li>Sync people.apache.org.</li> + <li>Done!</li> + </ul> + <p> + These steps are covered in more details below. We assume that you already have xml-xindice + checkout at <code>~/projects/xml-xindice</code>. + </p> + </section> + + <section> + <title>Getting Forrest</title> + <p> + In the <code>~/projects</code> directory, execute: + </p> + <source> + $ svn co http://svn.apache.org/repos/asf/forrest/branches/forrest_08_branch/ forrest-0.8.x + $ cd forrest-0.8.x/main + $ build.sh</source> + <p> + After process is completed, you should see <code>BUILD SUCCESSFUL</code> message. + </p> + </section> + + <section> + <title>Getting <code>xml-site</code></title> + <p> + In the <code>~/projects</code> directory, execute: + </p> + <source> + $ svn co http://svn.apache.org/repos/asf/xml/site/ xml-site</source> + <p> + You can find html version of current Xindice website in <code>/targets/xindice</code> + directory. + </p> + </section> + + <section> + <title>Building Website</title> + <p> + In the xml-xindice directory, execute: + </p> + <source> + $ ~/projects/forrest-0.8.x/bin/forrest</source> + <p> + This will create html website at <code>build/site/</code>. Check results with the browser + before proceeding. + </p> + </section> + + <section> + <title>Committing Website</title> + <p> + In the xml-xindice directory, execute: + </p> + <source> + $ cp -r build/site/* ../xml-site/targets/xindice/ + $ # Review results: + $ svn st ../xml-site/targets/xindice/ + $ # svn add, if necessary + $ # svn diff, to verify changes + $ svn ci ../xml-site/targets/xindice/</source> + </section> + + <section> + <title>Syncing Website</title> + <p> + Once website is checked in, it needs to be updated on people.apache.org machine: + </p> + <source> + $ ssh &lt;yourname&gt;@people.apache.org + $ cd /www/xml.apache.org/xindice/ + $ svn up</source> + </section> + + <section> + <title>Done!</title> + <p> + Approximately in 4 hours (or less), your updates will appear at + <link href="http://xml.apache.org/xindice"><code>http://xml.apache.org/xindice</code></link>. + </p> + </section> + + </body> +</document> Propchange: xml/xindice/trunk/src/documentation/content/xdocs/dev/site-updating.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: xml/xindice/trunk/src/documentation/content/xdocs/dev/site-updating.xml ------------------------------------------------------------------------------ svn:keywords = Id Revision Author Date Modified: xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml URL: http://svn.apache.org/viewvc/xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml?view=diff&rev=564064&r1=564063&r2=564064 ============================================================================== --- xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml (original) +++ xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml Wed Aug 8 18:05:29 2007 @@ -19,7 +19,7 @@ - $Id$ --> -<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd"> +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v13.dtd"> <!-- - Version: $Revision$ $Date$ @@ -59,7 +59,7 @@ <li> <strong>Database Lock</strong> Place a lock on database files using Java 1.4 APIs to prevent separate processes from working on the same - database. [VG] + database. </li> <li> <strong>WebAdmin</strong> Integrate new WebDAV capable WebAdmin into From xindicehmason@example.net Thu Aug 09 14:21:08 2007 Return-Path: <xindicehmason@example.net> Delivered-To: hmason@example.net Received: (qmail 67235 invoked from network); 9 Aug 2007 14:21:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Aug 2007 14:21:08 -0000 Received: (qmail 92507 invoked by uid 500); 9 Aug 2007 14:21:06 -0000 Delivered-To: hmason@example.net Received: (qmail 92485 invoked by uid 500); 9 Aug 2007 14:21:06 -0000 Mailing-List: contact hmason@example.net; run by ezmlm Precedence: bulk list-help: <mailto:hmason@example.net> list-unsubscribe: <mailto:hmason@example.net> List-Post: <mailto:hmason@example.net> Reply-To: hmason@example.net List-Id: <xindice-dev.xml.apache.org> Delivered-To: mailing list hmason@example.net Received: (qmail 92474 invoked by uid 500); 9 Aug 2007 14:21:06 -0000 Delivered-To: hmason@example.net Received: (qmail 92463 invoked by uid 99); 9 Aug 2007 14:21:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 07:21:06 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 14:21:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 94BAE1A981A; Thu, 9 Aug 2007 07:20:46 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r564212 - /xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml Date: Thu, 09 Aug 2007 14:20:46 -0000 To: hmason@example.net From: hmason@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <hmason@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: vgritsenko Date: Thu Aug 9 07:20:45 2007 New Revision: 564212 URL: http://svn.apache.org/viewvc?view=rev&rev=564212 Log: mark completed items Modified: xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml Modified: xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml URL: http://svn.apache.org/viewvc/xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml?view=diff&rev=564212&r1=564211&r2=564212 ============================================================================== --- xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml (original) +++ xml/xindice/trunk/src/documentation/content/xdocs/dev/todo.xml Thu Aug 9 07:20:45 2007 @@ -54,16 +54,16 @@ <title>Xindice 1.2 Release Plan</title> <ul> <li> - <strong>Java</strong> Revisit minimum JDK requirement. [VG] + <strong>Java</strong> Revisit minimum JDK requirement. [VG] (Done) </li> <li> <strong>Database Lock</strong> Place a lock on database files using Java 1.4 APIs to prevent separate processes from working on the same - database. + database. (Done) </li> <li> <strong>WebAdmin</strong> Integrate new WebDAV capable WebAdmin into - the main codebase, instead of ugly debug tool. + the main codebase, instead of ugly debug tool. (Done) </li> <li> <strong>XML-RPC</strong> Update to XML-RPC release 3.0 or newer. From xindicehmason@example.net Thu Aug 09 14:23:39 2007 Return-Path: <xindicehmason@example.net> Delivered-To: hmason@example.net Received: (qmail 68459 invoked from network); 9 Aug 2007 14:23:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Aug 2007 14:23:33 -0000 Received: (qmail 1078 invoked by uid 500); 9 Aug 2007 14:23:29 -0000 Delivered-To: hmason@example.net Received: (qmail 1062 invoked by uid 500); 9 Aug 2007 14:23:29 -0000 Mailing-List: contact hmason@example.net; run by ezmlm Precedence: bulk list-help: <mailto:hmason@example.net> list-unsubscribe: <mailto:hmason@example.net> List-Post: <mailto:hmason@example.net> Reply-To: hmason@example.net List-Id: <xindice-dev.xml.apache.org> Delivered-To: mailing list hmason@example.net Received: (qmail 1049 invoked by uid 500); 9 Aug 2007 14:23:29 -0000 Delivered-To: hmason@example.net Received: (qmail 1044 invoked by uid 99); 9 Aug 2007 14:23:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 07:23:29 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 14:23:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C7CC31A981A; Thu, 9 Aug 2007 07:23:07 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r564214 - /xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/CommonConfigurable.java Date: Thu, 09 Aug 2007 14:23:07 -0000 To: hmason@example.net From: hmason@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <hmason@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: vgritsenko Date: Thu Aug 9 07:23:06 2007 New Revision: 564214 URL: http://svn.apache.org/viewvc?view=rev&rev=564214 Log: hashtable -> hashmap Modified: xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/CommonConfigurable.java Modified: xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/CommonConfigurable.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/CommonConfigurable.java?view=diff&rev=564214&r1=564213&r2=564214 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/CommonConfigurable.java (original) +++ xml/xindice/trunk/java/src/org/apache/xindice/client/xmldb/CommonConfigurable.java Thu Aug 9 07:23:06 2007 @@ -22,31 +22,32 @@ import org.xmldb.api.base.Configurable; import org.xmldb.api.base.XMLDBException; -import java.util.Hashtable; +import java.util.HashMap; /** - * Base class to handle property managment within the API implementation. + * Base class to handle property management within the API implementation. * * @version $Revision$, $Date$ */ public abstract class CommonConfigurable implements Configurable { - protected Hashtable config = null; + private HashMap config; /** * Constructor for the CommonConfigurable object */ public CommonConfigurable() { - config = new Hashtable(); + config = new HashMap(); } /** * Constructor for the CommonConfigurable object + * * @param commonConfigurable from which the initial properties for this * object are copied. */ public CommonConfigurable(CommonConfigurable commonConfigurable) { - config = new Hashtable(commonConfigurable.config); + config = new HashMap(commonConfigurable.config); } /** @@ -55,18 +56,18 @@ * * @param name The Property name * @param value The new Property value - * @exception XMLDBException + * @throws XMLDBException never */ public void setProperty(String name, String value) throws XMLDBException { config.put(name, value); } /** - * Gets the Property associated with name + * Gets the property value associated with name * * @param name The name of the property to retrieve. * @return The Property value - * @exception XMLDBException + * @throws XMLDBException never */ public String getProperty(String name) throws XMLDBException { return (String) config.get(name); From xindicehmason@example.net Thu Aug 09 23:40:34 2007 Return-Path: <xindicehmason@example.net> Delivered-To: hmason@example.net Received: (qmail 25433 invoked from network); 9 Aug 2007 23:40:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Aug 2007 23:40:33 -0000 Received: (qmail 33184 invoked by uid 500); 9 Aug 2007 23:40:32 -0000 Delivered-To: hmason@example.net Received: (qmail 33006 invoked by uid 500); 9 Aug 2007 23:40:32 -0000 Mailing-List: contact hmason@example.net; run by ezmlm Precedence: bulk list-help: <mailto:hmason@example.net> list-unsubscribe: <mailto:hmason@example.net> List-Post: <mailto:hmason@example.net> Reply-To: hmason@example.net List-Id: <xindice-dev.xml.apache.org> Delivered-To: mailing list hmason@example.net Received: (qmail 32995 invoked by uid 500); 9 Aug 2007 23:40:32 -0000 Delivered-To: hmason@example.net Received: (qmail 32992 invoked by uid 99); 9 Aug 2007 23:40:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 16:40:31 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 23:40:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 26E7D1A981A; Thu, 9 Aug 2007 16:40:06 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r564424 - /xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/ Date: Thu, 09 Aug 2007 23:40:05 -0000 To: hmason@example.net From: hmason@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <hmason@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: natalia Date: Thu Aug 9 16:40:03 2007 New Revision: 564424 URL: http://svn.apache.org/viewvc?view=rev&rev=564424 Log: Additional events can be received by indexers, an indexer may have more than one pattern. This is for full text indexer. Added: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/BasicIndexerEventHandler.java (with props) xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/DocumentHandler.java (with props) xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexerEventHandler.java (with props) Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexMatch.java xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexQuery.java xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/Indexer.java xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/MemValueIndexer.java xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/NameIndexer.java xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/ValueIndexer.java Added: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/BasicIndexerEventHandler.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/BasicIndexerEventHandler.java?view=auto&rev=564424 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/BasicIndexerEventHandler.java (added) +++ xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/BasicIndexerEventHandler.java Thu Aug 9 16:40:03 2007 @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * $Id$ + */ + +package org.apache.xindice.core.indexer; + +import org.apache.xindice.core.data.Key; +import org.apache.xindice.core.DBException; + +/** + * Empty implementation of IndexerEventHandler that does nothing. + * + * @version $Revision$, $Date$ + */ +public abstract class BasicIndexerEventHandler implements IndexerEventHandler { + + public void onDocumentAdded(Key key) throws DBException { + } + + public void onDocumentDeleted(Key key) throws DBException { + } + + public void onNameAdded(IndexPattern pattern, Key key, short elemID, short attrID) throws DBException { + } + + public void onNameDeleted(IndexPattern pattern, Key key, short elemID, short attrID) throws DBException { + } + + public void onValueAdded(IndexPattern pattern, String value, Key key, int pos, int len, short elemID, short attrID) throws DBException { + } + + public void onValueDeleted(IndexPattern pattern, String value, Key key, int pos, int len, short elemID, short attrID) throws DBException { + } +} Propchange: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/BasicIndexerEventHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/BasicIndexerEventHandler.java ------------------------------------------------------------------------------ svn:keywords = Id Revision Author Date Added: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/DocumentHandler.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/DocumentHandler.java?view=auto&rev=564424 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/DocumentHandler.java (added) +++ xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/DocumentHandler.java Thu Aug 9 16:40:03 2007 @@ -0,0 +1,237 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * $Id$ + */ + +package org.apache.xindice.core.indexer; + +import org.xml.sax.ContentHandler; +import org.xml.sax.Locator; +import org.xml.sax.Attributes; +import org.apache.xindice.xml.sax.CompressionHandler; +import org.apache.xindice.xml.sax.SAXEventGenerator; +import org.apache.xindice.xml.SymbolTable; +import org.apache.xindice.util.ObjectStack; +import org.apache.xindice.core.data.Key; +import org.apache.xindice.core.DBException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Document; + +/** + * DocumentHandler actually performs the work of adding and removing Indexer + * entries by calling appropiate methods of IndexerEventHandler. + * + * @version $Revision$, $Date$ + */ +class DocumentHandler implements ContentHandler, CompressionHandler { + static final int ACTION_CREATE = 0; + static final int ACTION_DELETE = 1; + + private ObjectStack stack = new ObjectStack(); + private Indexer[] indexers; + private IndexerEventHandler[] handlers; + + public Key key; + public Document doc; + public int action; + private SymbolTable symbols; + + public StackInfo info; // Current State + + private static final Log log = LogFactory.getLog(DocumentHandler.class); + + public DocumentHandler(SymbolTable symbols, Key key, Document doc, int action, Indexer[] list) { + this.symbols = symbols; + this.key = key; + this.doc = doc; + this.action = action; + this.indexers = list; + + handlers = new IndexerEventHandler[list.length]; + for (int i = 0; i < list.length; i++) { + handlers[i] = list[i].getIndexerEventHandler(); + } + + try { + SAXEventGenerator events = new SAXEventGenerator(symbols, doc); + events.setContentHandler(this); + events.setProperty(HANDLER, this); + events.start(); + } catch (Exception e) { + if (log.isWarnEnabled()) { + log.warn("ignored exception", e); + } + } + } + + // These are all NO-OPs + public void setDocumentLocator(Locator locator) { + } + + public void startPrefixMapping(String prefix, String uri) { + } + + public void endPrefixMapping(String prefix) { + } + + public void ignorableWhitespace(char ch[], int start, int length) { + } + + public void processingInstruction(String target, String data) { + } + + public void skippedEntity(String name) { + } + + public void symbols(SymbolTable symbols) { + } + + public void dataBytes(byte[] data) { + } + + public void startDocument() { + } + + public void endDocument() { + for (int i = 0; i < handlers.length; i++ ) { + try { + switch (action) { + case ACTION_CREATE: + handlers[i].onDocumentAdded(key); + break; + case ACTION_DELETE: + handlers[i].onDocumentDeleted(key); + break; + default: + if (log.isWarnEnabled()) { + log.warn("invalid action : " + action); + } + } + } catch (Exception e) { + if (log.isWarnEnabled()) { + log.warn("ignored exception", e); + } + } + } + } + + public void processEntry(IndexPattern pattern, String value, int pos, int len) { + for (int i = 0; i < handlers.length; i++ ) { + try { + switch (action) { + case ACTION_CREATE: + add(i, pattern, value, key, pos, len); + break; + case ACTION_DELETE: + delete(i, pattern, value, key, pos, len); + break; + default: + if (log.isWarnEnabled()) { + log.warn("invalid action : " + action); + } + } + } catch (Exception e) { + if (log.isWarnEnabled()) { + log.warn("ignored exception", e); + } + } + } + } + + public void add(int n, IndexPattern ptrn, String value, Key key, int pos, int len) throws DBException { + IndexPattern[] patterns = indexers[n].getPatterns(); + for (int i = 0; i < patterns.length; i++) { + if (ptrn.getMatchLevel(patterns[i]) > 0) { + handlers[n].onNameAdded(patterns[i], key, ptrn.getElementID(), ptrn.getAttributeID()); + handlers[n].onValueAdded(patterns[i], value, key, pos, len, ptrn.getElementID(), ptrn.getAttributeID()); + } + } + } + + public void delete(int n, IndexPattern ptrn, String value, Key key, int pos, int len) throws DBException { + IndexPattern[] patterns = indexers[n].getPatterns(); + for (int i = 0; i < patterns.length; i++) { + if (ptrn.getMatchLevel(patterns[i]) > 0) { + handlers[n].onNameDeleted(patterns[i], key, ptrn.getElementID(), ptrn.getAttributeID()); + handlers[n].onValueDeleted(patterns[i], value, key, pos, len, ptrn.getElementID(), ptrn.getAttributeID()); + } + } + } + + public void startElement(String namespaceURI, String localName, String qName, Attributes atts) { + // Modify the stack info to normalize the symbolID + if (namespaceURI != null && namespaceURI.length() > 0) { + String elemNSID = SymbolTable.getNormalizedLocalName(localName, namespaceURI); + info.symbolID = symbols.getSymbol(elemNSID, namespaceURI, true); + } + + int size = atts.getLength(); + for (int i = 0; i < size; i++) { + String nsURI = atts.getURI(i); + short id; + if (nsURI != null && nsURI.length() > 0) { + String attrNSID = "ns" + Integer.toString(nsURI.hashCode()) + ":" + atts.getLocalName(i); + id = symbols.getSymbol(attrNSID, nsURI, true); + } else { + id = symbols.getSymbol(atts.getQName(i)); + } + + processEntry(new IndexPattern(symbols, info.symbolID, id), atts.getValue(i), info.pos, info.len); + } + } + + public void endElement(String namespaceURI, String localName, String qName) { + StringBuffer sb = info.sb; + processEntry(new IndexPattern(symbols, info.symbolID), sb.toString(), info.pos, info.len); + info = (StackInfo) stack.pop(); + if (info != null) { + info.sb.append(sb); + } + } + + public void characters(char ch[], int start, int length) { + info.sb.append(ch, start, length); + } + + public void symbolID(short symbolID) { + if (info != null) { + stack.push(info); + } + info = new StackInfo(symbolID); + } + + public void dataLocation(int pos, int len) { + info.pos = pos; + info.len = len; + } + + /** + * StackInfo + */ + private class StackInfo { + public short symbolID; + public StringBuffer sb = new StringBuffer(); + public int pos = -1; + public int len = -1; + + public StackInfo(short symbolID) { + this.symbolID = symbolID; + } + } +} + Propchange: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/DocumentHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/DocumentHandler.java ------------------------------------------------------------------------------ svn:keywords = Id Revision Author Date Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java?view=diff&rev=564424&r1=564423&r2=564424 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java (original) +++ xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java Thu Aug 9 16:40:03 2007 @@ -29,17 +29,11 @@ import org.apache.xindice.core.data.RecordSet; import org.apache.xindice.util.Configuration; import org.apache.xindice.util.ConfigurationCallback; -import org.apache.xindice.util.ObjectStack; import org.apache.xindice.util.SimpleConfigurable; import org.apache.xindice.util.XindiceException; import org.apache.xindice.xml.SymbolTable; -import org.apache.xindice.xml.sax.CompressionHandler; -import org.apache.xindice.xml.sax.SAXEventGenerator; import org.w3c.dom.Document; -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.Locator; import java.util.ArrayList; import java.util.HashMap; @@ -61,29 +55,23 @@ private static final Log log = LogFactory.getLog(IndexManager.class); private static final String[] EMPTY_STRINGS = new String[0]; - private static final IndexerInfo[] EMPTY_INDEXERS = new IndexerInfo[0]; + private static final Indexer[] EMPTY_INDEXERS = new Indexer[0]; private static final String INDEX = "index"; private static final String NAME = "name"; private static final String CLASS = "class"; - private static final int STATUS_READY = 0; - private static final int STATUS_BUSY = 1; + private static final Integer STATUS_READY = new Integer(0); + private static final Integer STATUS_BUSY = new Integer(1); - private static final int ACTION_CREATE = 0; - private static final int ACTION_UPDATE = 1; - private static final int ACTION_DELETE = 2; - - private Map patternMap = new HashMap(); // IndexPattern to IndexerInfo - private Map indexes = new HashMap(); // String to IndexerInfo + private Map indexes = new HashMap(); // Name to Indexer + private Map status = new HashMap(); // Name to Status private Map bestIndexers = new HashMap(); // String to Map of IndexPattern to Indexer - private IndexerInfo[] idxList = EMPTY_INDEXERS; - private Collection collection; private Timer timer; private SymbolTable symbols; - private final List newIndexers = new ArrayList(); // of IndexerInfo + private final List newIndexers = new ArrayList(); // of Indexers private int taskCount; // counter of scheduled tasks private final Object lock = new Object(); // lock object for manipulating taskCounter @@ -175,12 +163,9 @@ * Drop all indexers */ public synchronized void drop() { - // Get a copy of idxList - IndexerInfo[] idx = idxList; - // Drop indexes - for (int i = 0; i < idx.length; i++) { - drop(idx[i].name); + for (Iterator i = indexes.keySet().iterator(); i.hasNext(); ) { + drop((String) i.next()); } } @@ -229,12 +214,13 @@ } } // close all indexers - for (int i = 0; i < idxList.length; i++) { + for (Iterator i = indexes.values().iterator(); i.hasNext(); ) { + Indexer idx = (Indexer) i.next(); try { - idxList[i].indexer.close(); + idx.close(); } catch (DBException e) { if (log.isWarnEnabled()) { - log.warn("Failed to close indexer " + idxList[i].name + " on collection " + collection.getCanonicalName(), e); + log.warn("Failed to close indexer " + idx.getName() + " on collection " + collection.getCanonicalName(), e); } } } @@ -251,17 +237,13 @@ throw new CannotCreateException("No name specified"); } - IndexPattern pattern = new IndexPattern(symbols, idx.getPattern(), null); - String style = idx.getIndexStyle(); - IndexerInfo info = new IndexerInfo(name, style, pattern, idx); - if (!idx.exists()) { idx.create(); idx.open(); - info.status = STATUS_BUSY; + status.put(name, STATUS_BUSY); synchronized (newIndexers) { - newIndexers.add(info); + newIndexers.add(idx); } synchronized (lock) { @@ -284,18 +266,15 @@ } } } else { - info.status = STATUS_READY; + status.put(name, STATUS_BUSY); idx.open(); } + indexes.put(name, idx); - indexes.put(name, info); - patternMap.put(pattern, info); - - Map tbl = (Map) bestIndexers.get(style); + Map tbl = (Map) bestIndexers.get(idx.getIndexStyle()); if (tbl != null) { tbl.clear(); } - idxList = (IndexerInfo[]) indexes.values().toArray(EMPTY_INDEXERS); return idx; } catch (DBException e) { @@ -306,16 +285,14 @@ } public synchronized void unregister(String name) { - IndexerInfo idx = (IndexerInfo) indexes.remove(name); - String style = idx.style; - patternMap.remove(idx.pattern); + Indexer idx = (Indexer) indexes.remove(name); + status.remove(name); + String style = idx.getIndexStyle(); Map tbl = (Map) bestIndexers.get(style); if (tbl != null) { tbl.clear(); } - - idxList = (IndexerInfo[]) indexes.values().toArray(EMPTY_INDEXERS); } private void initialize(Indexer idx, Configuration cfg) throws XindiceException { @@ -324,16 +301,16 @@ } private void populateNewIndexers() throws DBException { - IndexerInfo[] list; + Indexer[] list; synchronized (newIndexers) { - list = (IndexerInfo[]) newIndexers.toArray(EMPTY_INDEXERS); + list = (Indexer[]) newIndexers.toArray(EMPTY_INDEXERS); newIndexers.clear(); } if (list.length > 0) { if (log.isTraceEnabled()) { for (int i = 0; i < list.length; i++) { - log.trace("Index Creation: " + list[i].indexer.getName()); + log.trace("Index Creation: " + list[i].getName()); } } @@ -345,7 +322,7 @@ Entry entry = collection.getEntry(key); if (entry.getEntryType() == Entry.DOCUMENT) { try { - new SAXHandler(key, (Document) entry.getValue(), ACTION_CREATE, list); + new DocumentHandler(symbols, key, (Document) entry.getValue(), DocumentHandler.ACTION_CREATE, list); } catch (Exception e) { if (log.isWarnEnabled()) { log.warn("Failed to index document " + key, e); @@ -356,19 +333,19 @@ for (int i = 0; i < list.length; i++) { try { - list[i].indexer.flush(); + list[i].flush(); } catch (Exception e) { if (log.isWarnEnabled()) { log.warn("ignored exception", e); } } - list[i].status = STATUS_READY; + status.put(list[i].getName(), STATUS_READY); } sw.stop(); if (log.isDebugEnabled()) { for (int i = 0; i < list.length; i++) { - log.debug("Index Complete: " + list[i].indexer.getName()); + log.debug("Index Complete: " + list[i].getName()); } log.debug(sw.toString()); } @@ -382,8 +359,7 @@ * @return The Indexer */ public synchronized Indexer get(String name) { - IndexerInfo info = (IndexerInfo) indexes.get(name); - return info != null ? info.indexer : null; + return (Indexer) indexes.get(name); } /** @@ -406,15 +382,26 @@ int highScore = 0; Iterator i = indexes.values().iterator(); while (i.hasNext()) { - IndexerInfo info = (IndexerInfo) i.next(); - if (info.status != STATUS_READY || !info.indexer.getIndexStyle().equals(style)) { + Indexer index = (Indexer) i.next(); + if (!status.get(index.getName()).equals(STATUS_READY) || !index.getIndexStyle().equals(style)) { continue; } - int score = pattern.getMatchLevel(info.pattern); - if (score > highScore) { - idx = info.indexer; - highScore = score; + + // TODO: should it check patterns? + // there can be only one full text index for a collection + if (style.equals(Indexer.STYLE_FULLTEXT) && index.getIndexStyle().equals(style)) { + return index; } + + for (int j = 0; j < index.getPatterns().length; j++) { + int score = pattern.getMatchLevel(index.getPatterns()[j]); + + if (score > highScore) { + idx = index; + highScore = score; + } + } + } tbl.put(pattern, idx); } @@ -422,11 +409,12 @@ } public void addDocument(Key key, Document doc) { - if (idxList.length > 0) { - new SAXHandler(key, doc, ACTION_CREATE); + if (indexes.size() > 0) { + Indexer[] idxList = (Indexer[]) indexes.values().toArray(EMPTY_INDEXERS); + new DocumentHandler(symbols, key, doc, DocumentHandler.ACTION_CREATE, idxList); for (int i = 0; i < idxList.length; i++) { try { - idxList[i].indexer.flush(); + idxList[i].flush(); } catch (Exception e) { if (log.isWarnEnabled()) { log.warn("ignored exception", e); @@ -437,194 +425,18 @@ } public void removeDocument(Key key, Document doc) { - if (idxList.length > 0) { - new SAXHandler(key, doc, ACTION_DELETE); + if (indexes.size() > 0) { + Indexer[] idxList = (Indexer[]) indexes.values().toArray(EMPTY_INDEXERS); + new DocumentHandler(symbols, key, doc, DocumentHandler.ACTION_DELETE, idxList); for (int i = 0; i < idxList.length; i++) { try { - idxList[i].indexer.flush(); + idxList[i].flush(); } catch (Exception e) { if (log.isWarnEnabled()) { log.warn("ignored exception", e); } } } - } - } - - /** - * IndexerInfo - */ - private class IndexerInfo { - public String name; - public String style; - public IndexPattern pattern; - public Indexer indexer; - public int status; - - public IndexerInfo(String name, String style, IndexPattern pattern, Indexer indexer) { - this.name = name; - this.style = style; - this.pattern = pattern; - this.indexer = indexer; - } - } - - /** - * SAXHandler actually performs the work of adding and removing Indexer - * entries. - */ - private class SAXHandler implements ContentHandler, CompressionHandler { - private ObjectStack stack = new ObjectStack(); - private IndexerInfo[] list; - - public Key key; - public Document doc; - public int action; - - public StackInfo info; // Current State - - public SAXHandler(Key key, Document doc, int action, IndexerInfo[] list) { - this.list = list; - this.key = key; - this.doc = doc; - this.action = action; - - try { - SAXEventGenerator events = new SAXEventGenerator(symbols, doc); - events.setContentHandler(this); - events.setProperty(HANDLER, this); - events.start(); - - if (action == ACTION_CREATE || action == ACTION_UPDATE) { - collection.flushSymbolTable(); - } - } catch (Exception e) { - if (log.isWarnEnabled()) { - log.warn("ignored exception", e); - } - } - } - - public SAXHandler(Key key, Document doc, int action) { - this(key, doc, action, idxList); - } - - // These are all NO-OPs - public void setDocumentLocator(Locator locator) { - } - - public void startDocument() { - } - - public void endDocument() { - } - - public void startPrefixMapping(String prefix, String uri) { - } - - public void endPrefixMapping(String prefix) { - } - - public void ignorableWhitespace(char ch[], int start, int length) { - } - - public void processingInstruction(String target, String data) { - } - - public void skippedEntity(String name) { - } - - public void symbols(SymbolTable symbols) { - } - - public void dataBytes(byte[] data) { - } - - public void processEntry(IndexPattern pattern, String value, int pos, int len) { - for (int i = 0; i < list.length; i++) { - if (pattern.getMatchLevel(list[i].pattern) > 0) { - try { - switch (action) { - case ACTION_CREATE: - case ACTION_UPDATE: - list[i].indexer.add(value, key, pos, len, pattern.getElementID(), pattern.getAttributeID()); - break; - case ACTION_DELETE: - list[i].indexer.remove(value, key, pos, len, pattern.getElementID(), pattern.getAttributeID()); - break; - default: - if (log.isWarnEnabled()) { - log.warn("invalid action : " + action); - } - } - } catch (Exception e) { - if (log.isWarnEnabled()) { - log.warn("ignored exception", e); - } - } - } - } - } - - public void startElement(String namespaceURI, String localName, String qName, Attributes atts) { - // Modify the stack info to normalize the symbolID - if (namespaceURI != null && namespaceURI.length() > 0) { - String elemNSID = SymbolTable.getNormalizedLocalName(localName, namespaceURI); - info.symbolID = symbols.getSymbol(elemNSID, namespaceURI, true); - } - - int size = atts.getLength(); - for (int i = 0; i < size; i++) { - String nsURI = atts.getURI(i); - if (nsURI != null && nsURI.length() > 0) { - String attrNSID = "ns" + Integer.toString(nsURI.hashCode()) + ":" + atts.getLocalName(i); - short id = symbols.getSymbol(attrNSID, nsURI, true); - processEntry(new IndexPattern(symbols, info.symbolID, id), atts.getValue(i), info.pos, info.len); - } else { - short id = symbols.getSymbol(atts.getQName(i)); - processEntry(new IndexPattern(symbols, info.symbolID, id), atts.getValue(i), info.pos, info.len); - } - } - } - - public void endElement(String namespaceURI, String localName, String qName) { - StringBuffer sb = info.sb; - processEntry(new IndexPattern(symbols, info.symbolID), sb.toString(), info.pos, info.len); - - info = (StackInfo) stack.pop(); - if (info != null) { - info.sb.append(sb); - } - } - - public void characters(char ch[], int start, int length) { - info.sb.append(ch, start, length); - } - - public void symbolID(short symbolID) { - if (info != null) { - stack.push(info); - } - info = new StackInfo(symbolID); - } - - public void dataLocation(int pos, int len) { - info.pos = pos; - info.len = len; - } - } - - /** - * StackInfo - */ - private class StackInfo { - public short symbolID; - public StringBuffer sb = new StringBuffer(); - public int pos = -1; - public int len = -1; - - public StackInfo(short symbolID) { - this.symbolID = symbolID; } } Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexMatch.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexMatch.java?view=diff&rev=564424&r1=564423&r2=564424 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexMatch.java (original) +++ xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexMatch.java Thu Aug 9 16:40:03 2007 @@ -69,6 +69,14 @@ attr = pattern.getAttributeID(); } + public IndexMatch(Key key, short elem, short attr) { + this.key = key; + pos = -1; + len = -1; + this.elem = elem; + this.attr = attr; + } + /** * getKey returns the Document Key for the IndexMatch. * Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexQuery.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexQuery.java?view=diff&rev=564424&r1=564423&r2=564424 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexQuery.java (original) +++ xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexQuery.java Thu Aug 9 16:40:03 2007 @@ -64,6 +64,8 @@ public static final int SW = 7; // Starts-with public static final int NSW = -7; // Not Starts-with + public static final int TQ = 8; // Text query + protected final IndexPattern pattern; protected final int op; Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/Indexer.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/Indexer.java?view=diff&rev=564424&r1=564423&r2=564424 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/Indexer.java (original) +++ xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/Indexer.java Thu Aug 9 16:40:03 2007 @@ -22,7 +22,6 @@ import org.apache.xindice.core.Collection; import org.apache.xindice.core.DBException; import org.apache.xindice.core.DBObject; -import org.apache.xindice.core.data.Key; import org.apache.xindice.util.Configurable; import org.apache.xindice.util.Named; @@ -61,7 +60,7 @@ String getIndexStyle(); /** - * getPattern returns the pattern recognized by this Indexer. Patterns + * getPatterns returns the patterns recognized by this Indexer. Patterns * must be in the form of (elem|*)[@(attr|*)] to tell the IndexManager * which element types to send to it, so for example: * <pre> @@ -73,43 +72,19 @@ * *@* Indexes all attributes of all elements * </pre> * These patterns are used by the IndexManager when handling SAX events. - * All events that match the specified pattern will result in an add or - * remove call to the Indexer. + * All events that match the any of specified patterns will result in an + * call to the Indexer's event handler. * - * @return The Pattern used + * @return The Patterns used */ - String getPattern(); - - /** - * remove removes all references to the specified Key from the Indexer. - * - * @param value The value to remove - * @param key The Object ID - * @param pos The offset into the stream the Element occurs at - * @param len The length of the substream for the Element - * @param elemID The Element ID of the value - * @param attrID The Attribute ID of the value (if any, else -1) - */ - void remove(String value, Key key, int pos, int len, short elemID, short attrID) throws DBException; - - /** - * add adds a Document to the Indexer. - * - * @param value The value to remove - * @param key The Object ID - * @param pos The offset into the stream the Element occurs at - * @param len The length of the substream for the Element - * @param elemID The Element ID of the value - * @param attrID The Attribute ID of the value (if any, else -1) - */ - void add(String value, Key key, int pos, int len, short elemID, short attrID) throws DBException; + IndexPattern[] getPatterns(); /** * queryMatches retrieves a set of IndexMatch instances that match - * the supplied query. The matches are then used by the QueryEngine - * in co-sequential processing. If this indexer doesn't support the - * passed value, it should return 'null'. If no matches are found, - * it should return an empty set. queryMatches will typically be + * the supplied query. The matches are then used by the QueryEngine + * in co-sequential processing. If this indexer doesn't support the + * passed value, it should return 'null'. If no matches are found, + * it should return an empty set. queryMatches will typically be * used in XPath processing. * * @param query The IndexQuery to use @@ -121,4 +96,15 @@ * flush forcefully flushes any unwritten buffers to disk. */ void flush() throws DBException; + + /** + * getIndexerEventHandler returns an instance of IndexerEventHandler that + * handles Indexer-specific events. This method is called once per + * document, and all events for one document will be processed by the same + * handler. + * + * @return IndexerEventHandler that will handle document processing + * @see IndexerEventHandler + */ + public IndexerEventHandler getIndexerEventHandler(); } Added: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexerEventHandler.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexerEventHandler.java?view=auto&rev=564424 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexerEventHandler.java (added) +++ xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexerEventHandler.java Thu Aug 9 16:40:03 2007 @@ -0,0 +1,108 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * $Id$ + */ + +package org.apache.xindice.core.indexer; + +import org.apache.xindice.core.data.Key; +import org.apache.xindice.core.DBException; + +/** + * IndexerEventHandler represents an event handler for Indexer-specific events. + * It is used by Indexers to manage adding and removing data. + * + * @see Indexer + * @version $Revision$, $Date$ + */ +public interface IndexerEventHandler { + /** + * onDocumentAdded method is called after document is added and all its + * elements are processed. This method will be called regardless of + * Indexer patterns, even if no elements/attributes in that document + * matches any of Indexer patterns. + * + * @param key Document key + * @throws DBException + */ + void onDocumentAdded(Key key) throws DBException; + + /** + * onDocumentDeleted method is called after document is deleted and all its + * elements are processed. This method will be called regardless of Indexer + * patterns, even if no elements/attributes in that document matches any of + * Indexer patterns. + * + * @param key Document key + * @throws DBException + */ + void onDocumentDeleted(Key key) throws DBException; + + /** + * onNameAdded called for every element/attribute in the document being added + * that matches any of the Indexer pattern. + * + * @param pattern Indexer pattern that matches the element/attribute + * @param key Document key + * @param elemID Element ID that matches the pattern + * @param attrID Attribute ID that matches the pattern + * @throws DBException + */ + void onNameAdded(IndexPattern pattern, Key key, short elemID, short attrID) throws DBException; + + /** + * onNameDeleted called for every element/attribute in the document being deleted + * that matches any of the Indexer pattern. + * + * @param pattern Indexer pattern that matches the element/attribute + * @param key Document key + * @param elemID Element ID that matches the pattern + * @param attrID Attribute ID that matches the pattern + * @throws DBException + */ + void onNameDeleted(IndexPattern pattern, Key key, short elemID, short attrID) throws DBException; + + /** + * onValueAdded called for every element/attribute in the document being added + *
{'source': 'Apache Software Foundation Public Mail Archives'}