KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > xml > querying > XMLWellFormedData


1 package org.exoplatform.services.xml.querying;
2
3 import org.exoplatform.services.xml.querying.object.MarshallerCreateException;
4 import org.exoplatform.services.xml.querying.object.ObjectMappingException;
5 import org.exoplatform.services.xml.querying.object.ObjectMarshalException;
6 import org.w3c.dom.Node JavaDoc;
7 import org.xml.sax.InputSource JavaDoc;
8 import org.xml.sax.ContentHandler JavaDoc;
9 import org.xml.sax.SAXException JavaDoc;
10 import javax.xml.transform.TransformerException JavaDoc;
11 import javax.xml.transform.Source JavaDoc;
12 import javax.xml.transform.Result JavaDoc;
13
14 public interface XMLWellFormedData extends XMLData {
15     /**
16      * PublicId for output
17      */

18     void setDTDPublicId(String JavaDoc DTDPublicId);
19
20     /**
21      * SystemId for output
22      */

23     void setDTDSystemId(String JavaDoc DTDSystemId);
24
25     /**
26      * This object as ByteArray (is required by superclass)
27      */

28     byte[] getAsByteArray();
29
30     /**
31      * This object as DOM Node
32      */

33     Node JavaDoc getAsDOM();
34
35     /**
36      * Will output be indent?
37      */

38     void setIndentOutput(boolean indentOutput);
39
40     /**
41      * Will output be wit the xml declaration?
42      */

43     void setOmitXmlDeclaration(boolean omitXmlDeclaration);
44
45     /**
46      * Will this object be validated?
47      */

48     void setValidate(boolean validate);
49
50     /**
51      * Marshalls Java object using <code> mapping </code> and creates UniFormTree object
52      */

53     void init(Object JavaDoc mapping, Object JavaDoc obj) throws ObjectMarshalException, MarshallerCreateException, ObjectMappingException;
54
55     /**
56      * Marshalls Java object using obj.getClass() as mapping and creates UniFormTree object
57      * WARNING: Will be used for all objects except NodeList, InputStream, DOM Document, InputSource
58      */

59     void init(Object JavaDoc obj) throws ObjectMarshalException, MarshallerCreateException, ObjectMappingException;
60
61     /**
62      * Initializes this with the DOM's Node
63      */

64     void init(Node JavaDoc node) throws UniFormTransformationException;
65
66     /**
67      * Initializes this with the SAX's InputSource
68      */

69     void init(InputSource JavaDoc src) throws UniFormTransformationException;
70
71     /**
72      * Initializes with root node
73      * Note: it is impossible to insert without child
74      * adding " " for as a text child - Statement.append("root/text()",.....)
75      */

76     void initRoot(String JavaDoc nodeName) throws UniFormTransformationException;
77
78     /**
79      * Parse this XML using ContentHandler
80      */

81     void processAsSAX(ContentHandler JavaDoc handler) throws SAXException JavaDoc;
82
83     /**
84      * Parse this XML using ContentHandler
85      */

86     void transformWithXSL(Result JavaDoc result, Source JavaDoc xslTemplate) throws TransformerException JavaDoc;
87 }
88
Popular Tags