KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > xml > dom4j > OzoneBranch


1 package org.ozoneDB.xml.dom4j;
2
3 import org.dom4j.Branch;
4 import org.dom4j.Element;
5 import org.dom4j.Node;
6 import org.ozoneDB.OzoneRemote;
7 import org.ozoneDB.xml.dom4j.o3impl.BackedList;
8
9 import java.util.List JavaDoc;
10
11 /**
12  * $Id: OzoneBranch.java,v 1.1 2003/07/07 10:30:29 per_nyfelt Exp $
13  */

14 public interface OzoneBranch extends Branch, OzoneRemote {
15
16     /** @return the text value of the given content object
17      * as text which returns the text value of CDATA, Entity or Text nodes
18      */

19     String JavaDoc getContentAsText(Object JavaDoc content);
20
21     /** @return the XPath defined string-value of the given content object
22      */

23     String JavaDoc getContentAsStringValue(Object JavaDoc content);
24
25     String JavaDoc getTextTrim();
26
27     /** @return the ID of the given <code>Element</code>
28      */

29     String JavaDoc elementID(Element element);
30
31     /** @return the internal List used to manage the content */
32     List contentList();
33
34     /** A Factory Method pattern which creates
35      * a List implementation used to store content
36      */

37     List createContentList();
38
39     /** A Factory Method pattern which creates
40      * a List implementation used to store content
41      */

42     List createContentList(int size);
43
44
45     /** A Factory Method pattern which creates
46      * a BackedList implementation used to store results of
47      * a filtered content query. */

48     BackedList createResultList();
49
50     /** A Factory Method pattern which creates
51      * a BackedList implementation which contains a single result
52      */

53     List createSingleResultList(Object JavaDoc result);
54
55     /** A Factory Method pattern which creates an empty
56      * a BackedList implementation
57      */

58     List createEmptyList();
59
60     void addNode(Node node);
61
62     void addNode(int index, Node node);
63
64     boolean removeNode(Node node);
65
66
67     /** Called when a new child node has been added to me
68      * to allow any parent relationships to be created or
69      * events to be fired.
70      */

71     void childAdded(Node node);
72
73     /** Called when a child node has been removed
74      * to allow any parent relationships to be deleted or
75      * events to be fired.
76      */

77     void childRemoved(Node node);
78
79     /** Called when the given List content has been removed so
80      * each node should have its parent and document relationships
81      * cleared
82      */

83     void contentRemoved();
84
85     /** Called when an invalid node has been added.
86      * Throws an {@link org.dom4j.IllegalAddException}.
87      */

88     void invalidNodeTypeAddException(Node node);
89 }
90
Popular Tags