Xindice API
version 1.2m1

org.apache.xindice.core.indexer
Class BasicIndexerEventHandler

java.lang.Object
  extended byorg.apache.xindice.core.indexer.BasicIndexerEventHandler
All Implemented Interfaces:
IndexerEventHandler

public abstract class BasicIndexerEventHandler
extends Object
implements IndexerEventHandler

Empty implementation of IndexerEventHandler that does nothing.

Version:
$Revision: 564424 $, $Date: 2007-08-09 19:40:03 -0400 (Thu, 09 Aug 2007) $

Constructor Summary
BasicIndexerEventHandler()
           
 
Method Summary
 void onDocumentAdded(Key key)
          onDocumentAdded method is called after document is added and all its elements are processed.
 void onDocumentDeleted(Key key)
          onDocumentDeleted method is called after document is deleted and all its elements are processed.
 void onNameAdded(IndexPattern pattern, Key key, short elemID, short attrID)
          onNameAdded called for every element/attribute in the document being added that matches any of the Indexer pattern.
 void onNameDeleted(IndexPattern pattern, Key key, short elemID, short attrID)
          onNameDeleted called for every element/attribute in the document being deleted that matches any of the Indexer pattern.
 void onValueAdded(IndexPattern pattern, String value, Key key, int pos, int len, short elemID, short attrID)
          onValueAdded called for every element/attribute in the document being added that matches any of the Indexer pattern.
 void onValueDeleted(IndexPattern pattern, String value, Key key, int pos, int len, short elemID, short attrID)
          onValueDeleted called for every element/attribute in the document being deleted that matches any of the Indexer pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicIndexerEventHandler

public BasicIndexerEventHandler()
Method Detail

onDocumentAdded

public void onDocumentAdded(Key key)
                     throws DBException
Description copied from 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.

Specified by:
onDocumentAdded in interface IndexerEventHandler
Parameters:
key - Document key
Throws:
DBException

onDocumentDeleted

public void onDocumentDeleted(Key key)
                       throws DBException
Description copied from interface: IndexerEventHandler
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.

Specified by:
onDocumentDeleted in interface IndexerEventHandler
Parameters:
key - Document key
Throws:
DBException

onNameAdded

public void onNameAdded(IndexPattern pattern,
                        Key key,
                        short elemID,
                        short attrID)
                 throws DBException
Description copied from interface: IndexerEventHandler
onNameAdded called for every element/attribute in the document being added that matches any of the Indexer pattern.

Specified by:
onNameAdded in interface IndexerEventHandler
Parameters:
pattern - Indexer pattern that matches the element/attribute
key - Document key
elemID - Element ID that matches the pattern
attrID - Attribute ID that matches the pattern
Throws:
DBException

onNameDeleted

public void onNameDeleted(IndexPattern pattern,
                          Key key,
                          short elemID,
                          short attrID)
                   throws DBException
Description copied from interface: IndexerEventHandler
onNameDeleted called for every element/attribute in the document being deleted that matches any of the Indexer pattern.

Specified by:
onNameDeleted in interface IndexerEventHandler
Parameters:
pattern - Indexer pattern that matches the element/attribute
key - Document key
elemID - Element ID that matches the pattern
attrID - Attribute ID that matches the pattern
Throws:
DBException

onValueAdded

public void onValueAdded(IndexPattern pattern,
                         String value,
                         Key key,
                         int pos,
                         int len,
                         short elemID,
                         short attrID)
                  throws DBException
Description copied from interface: IndexerEventHandler
onValueAdded called for every element/attribute in the document being added that matches any of the Indexer pattern.

Specified by:
onValueAdded in interface IndexerEventHandler
Parameters:
pattern - Indexer pattern that matches the element/attribute
value - Element/attribute value to add
key - Document key
pos - The offset into the stream the Element occurs at
len - The length of the substream for the Element
elemID - Element ID that matches the pattern
attrID - Attribute ID that matches the pattern
Throws:
DBException

onValueDeleted

public void onValueDeleted(IndexPattern pattern,
                           String value,
                           Key key,
                           int pos,
                           int len,
                           short elemID,
                           short attrID)
                    throws DBException
Description copied from interface: IndexerEventHandler
onValueDeleted called for every element/attribute in the document being deleted that matches any of the Indexer pattern.

Specified by:
onValueDeleted in interface IndexerEventHandler
Parameters:
pattern - Indexer pattern that matches the element/attribute
value - Element/attribute value to delete
key - Document key
pos - The offset into the stream the Element occurs at
len - The length of the substream for the Element
elemID - Element ID that matches the pattern
attrID - Attribute ID that matches the pattern
Throws:
DBException

Xindice API
version 1.2m1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.