KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > xml > dom > iterator > NodeIteratorListener


1 /**
2  * The contents of this file are subject to the OpenXML Public
3  * License Version 1.0; you may not use this file except in
4  * compliance with the License. You may obtain a copy of the
5  * License at http://www.openxml.org/license/
6  *
7  * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED ON AN "AS IS" BASIS
8  * WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED,
9  * INCLUDING AND WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE
10  * AND DOCUMENTATION IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A
11  * PARTICULAR PURPOSE OR NON-INFRINGING. SEE THE LICENSE FOR THE
12  * SPECIFIC LANGUAGE GOVERNING RIGHTS AND LIMITATIONS UNDER THE
13  * LICENSE.
14  *
15  * The Initial Developer of this code under the License is
16  * OpenXML.org. Portions created by OpenXML.org and/or Assaf Arkin
17  * are Copyright (C) 1998, 1999 OpenXML.org. All Rights Reserved.
18  */

19
20 package org.ozoneDB.xml.dom.iterator;
21
22 import org.w3c.dom.*;
23
24
25 /**
26  * Listener interface allows node to notify iterator when a child is removed,
27  * so iterator may adjust accordingly. When an iterator is created on a node
28  * tree, the iterator is registered as a listener on that tree. When a node
29  * is removed from that tree, the iterator is notified by the tree top node,
30  * and if pointing to that node will adjust itself to point to a different node
31  * that still belongs to the tree,
32  *
33  * @version $Revision: 1.2 $ $Date: 2003/11/20 23:18:42 $
34  * @author <a HREF="mailto:arkin@trendline.co.il">Assaf Arkin</a>
35  */

36 public interface NodeIteratorListener {
37
38
39     /**
40      * Called to notify this iterator that a particular node has been removed.
41      * If the iterator is pointing at that node, or one of its childern, it must
42      * adjust accordingly.
43      * <P>
44      * This method only affects the iterator if it is pointing at the removed node
45      * or a child of the removed node. It does not affect the iterator if it is
46      * pointing to a parent of the removed node, or the removed node is on some
47      * other branch of the document tree.
48      *
49      * @param node The node being removed
50      */

51     public void removeNode( Node node );
52
53 }
54
Popular Tags