1
2
3
4
5
6 package org.astrogrid.dataservice.out.tree;
7
8 import java.io.IOException;
9
10 /***
11 * Defines the basic methods required in order to be able to write to a heirarchical
12 * data set, eg XML documents or HDF
13 */
14
15 public interface NodeWriter
16 {
17
18 /***
19 * Called to take the given node and start writing out to it as a child of
20 * this node. If there is an existing child, it should close that child before
21 * opening this one.
22 */
23 public NodeWriter newNode(NodeWriter tag) throws IOException;
24
25 /***
26 * Returns true if this node has an unclosed child node */
27 public boolean hasOpenChild();
28
29 /***
30 * Close this node and its children
31 */
32 public void close() throws IOException;
33
34 }
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50