28 import com.sun.xml.internal.txw2.annotation.XmlElement;
29 import com.sun.xml.internal.txw2.output.XmlSerializer;
30
31 import javax.xml.namespace.QName;
32
33 /**
34 * Defines common operations for all typed XML writers.
35 * Root of all typed XML writer interfaces.
36 *
37 * <p>
38 * This interface defines a series of methods to allow client applications
39 * to write arbitrary well-formed documents.
40 *
41 * @author Kohsuke Kawaguchi
42 */
43 public interface TypedXmlWriter {
44 /**
45 * Commits this element (and all its descendants) to the output.
46 *
47 * <p>
48 * Short for <tt>_commit(true)</tt>.
49 */
50 void commit();
51
52 /**
53 * Commits this element (and all its descendants) to the output.
54 *
55 * <p>
56 * Once a writer is committed, nothing can be added to it further.
57 * Committing allows TXW to output a part of the document even
58 * if the rest has not yet been written.
59 *
60 * @param includingAllPredecessors
61 * if false, this operation will _commit this writer and all its
62 * descendants writers. If true, in addition to those writers,
63 * this operation will close all the writers before this writer
64 * in the document order.
65 */
66 void commit(boolean includingAllPredecessors);
67
68 /**
|
28 import com.sun.xml.internal.txw2.annotation.XmlElement;
29 import com.sun.xml.internal.txw2.output.XmlSerializer;
30
31 import javax.xml.namespace.QName;
32
33 /**
34 * Defines common operations for all typed XML writers.
35 * Root of all typed XML writer interfaces.
36 *
37 * <p>
38 * This interface defines a series of methods to allow client applications
39 * to write arbitrary well-formed documents.
40 *
41 * @author Kohsuke Kawaguchi
42 */
43 public interface TypedXmlWriter {
44 /**
45 * Commits this element (and all its descendants) to the output.
46 *
47 * <p>
48 * Short for {@code _commit(true)}.
49 */
50 void commit();
51
52 /**
53 * Commits this element (and all its descendants) to the output.
54 *
55 * <p>
56 * Once a writer is committed, nothing can be added to it further.
57 * Committing allows TXW to output a part of the document even
58 * if the rest has not yet been written.
59 *
60 * @param includingAllPredecessors
61 * if false, this operation will _commit this writer and all its
62 * descendants writers. If true, in addition to those writers,
63 * this operation will close all the writers before this writer
64 * in the document order.
65 */
66 void commit(boolean includingAllPredecessors);
67
68 /**
|