Source Code Cross Referenced for XMLSerializer.java in  » Portal » stringbeans-3.5 » com » nabhinc » portal » config » impl » runtime » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » stringbeans 3.5 » com.nabhinc.portal.config.impl.runtime 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        //
002:        // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.4-b18-fcs 
003:        // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
004:        // Any modifications to this file will be lost upon recompilation of the source schema. 
005:        // Generated on: 2005.03.04 at 10:20:40 PST 
006:        //
007:
008:        package com.nabhinc.portal.config.impl.runtime;
009:
010:        import javax.xml.bind.ValidationEvent;
011:
012:        import org.xml.sax.SAXException;
013:
014:        import com.sun.xml.bind.JAXBObject;
015:        import com.sun.xml.bind.marshaller.IdentifiableObject;
016:        import com.sun.xml.bind.serializer.AbortSerializationException;
017:
018:        /**
019:         * Receives XML serialization event
020:         * 
021:         * <p>
022:         * This object coordinates the overall marshalling efforts across different
023:         * content-tree objects and different target formats.
024:         * 
025:         * <p>
026:         * The following CFG gives the proper sequence of method invocation.
027:         * 
028:         * <pre>
029:         * MARSHALLING  :=  ELEMENT
030:         * ELEMENT      :=  "startElement" NSDECL* "endNamespaceDecls"
031:         *                        ATTRIBUTE* "endAttributes" BODY "endElement"
032:         * 
033:         * NSDECL       :=  "declareNamespace"
034:         * 
035:         * ATTRIBUTE    :=  "startAttribute" ATTVALUES "endAttribute"
036:         * ATTVALUES    :=  "text"*
037:         * 
038:         * 
039:         * BODY         :=  ( "text" | ELEMENT )*
040:         * </pre>
041:         * 
042:         * <p>
043:         * A marshalling of one element consists of two stages. The first stage is
044:         * for marshalling attributes and collecting namespace declarations.
045:         * The second stage is for marshalling characters/child elements of that element.
046:         * 
047:         * <p>
048:         * Observe that multiple invocation of "text" is allowed.
049:         * 
050:         * <p>
051:         * Also observe that the namespace declarations are allowed only between
052:         * "startElement" and "endAttributes".
053:         * 
054:         * 
055:         * @author  Kohsuke Kawaguchi
056:         */
057:        public interface XMLSerializer {
058:            /**
059:             * Errors detected by the XMLSerializable should be either thrown
060:             * as {@link SAXException} or reported through this method.
061:             * 
062:             * The callee should report an error to the client application
063:             * and 
064:             */
065:            void reportError(ValidationEvent e)
066:                    throws AbortSerializationException;
067:
068:            /**
069:             * Starts marshalling of an element.
070:             * Calling this method will push the internal state into the
071:             * internal stack.
072:             */
073:            void startElement(String uri, String local) throws SAXException;
074:
075:            /**
076:             * Switches to the mode to marshal attribute values.
077:             * This method has to be called after the 1st pass is completed.
078:             */
079:            void endNamespaceDecls() throws SAXException;
080:
081:            /**
082:             * Switches to the mode to marshal child texts/elements.
083:             * This method has to be called after the 2nd pass is completed.
084:             */
085:            void endAttributes() throws SAXException;
086:
087:            /**
088:             * Ends marshalling of an element.
089:             * Pops the internal stack.
090:             */
091:            void endElement() throws SAXException;
092:
093:            /**
094:             * Marshalls text.
095:             * 
096:             * <p>
097:             * This method can be called (i) after the startAttribute method
098:             * and (ii) before the endAttribute method, to marshal attribute values.
099:             * If the method is called more than once, those texts are considered
100:             * as separated by whitespaces. For example,
101:             * 
102:             * <pre>
103:             * c.startAttribute();
104:             * c.text("abc");
105:             * c.text("def");
106:             * c.endAttribute("","foo");
107:             * </pre>
108:             * 
109:             * will generate foo="abc def".
110:             * 
111:             * <p>
112:             * Similarly, this method can be called after the endAttributes
113:             * method to marshal texts inside elements. The same rule about
114:             * multiple invokations apply to this case, too. For example,
115:             * 
116:             * <pre>
117:             * c.startElement("","foo");
118:             * c.endNamespaceDecls();
119:             * c.endAttributes();
120:             * c.text("abc");
121:             * c.text("def");
122:             *   c.startElement("","bar");
123:             *   c.endAttributes();
124:             *   c.endElement();
125:             * c.text("ghi");
126:             * c.endElement();
127:             * </pre>
128:             * 
129:             * will generate <code>&lt;foo>abc def&lt;bar/>ghi&lt;/foo></code>.
130:             */
131:            void text(String text, String fieldName) throws SAXException;
132:
133:            /**
134:             * Starts marshalling of an attribute.
135:             * 
136:             * The marshalling of an attribute will be done by
137:             * <ol>
138:             *  <li>call the startAttribute method
139:             *  <li>call the text method (several times if necessary)
140:             *  <li>call the endAttribute method
141:             * </ol>
142:             * 
143:             * No two attributes can be marshalled at the same time.
144:             * Note that the whole attribute marshalling must be happened
145:             * after the startElement method and before the endAttributes method.
146:             */
147:            void startAttribute(String uri, String local) throws SAXException;
148:
149:            void endAttribute() throws SAXException;
150:
151:            /**
152:             * Obtains a namespace context object, which is used to
153:             * declare/obtain namespace bindings.
154:             */
155:            NamespaceContext2 getNamespaceContext();
156:
157:            /**
158:             * Notifies the serializer that an ID value has just marshalled.
159:             * 
160:             * The serializer may or may not check the consistency of ID/IDREFs
161:             * and may throw a SAXException.
162:             * 
163:             * @param owner
164:             *      JAXB content object that posesses the ID.
165:             * @param value
166:             *      The value of the ID.
167:             * 
168:             * @return
169:             *      Return the value parameter without any modification,
170:             *      so that the invocation of this method can be done transparently
171:             *      by a transducer.
172:             */
173:            String onID(IdentifiableObject owner, String value)
174:                    throws SAXException;
175:
176:            /**
177:             * Notifies the serializer that an IDREF value has just marshalled.
178:             * 
179:             * The serializer may or may not check the consistency of ID/IDREFs
180:             * and may throw a SAXException.
181:             * 
182:             * @return
183:             *      Return the value parameter without any modification.
184:             *      so that the invocation of this method can be done transparently
185:             *      by a transducer.
186:             */
187:            String onIDREF(IdentifiableObject obj) throws SAXException;
188:
189:            // I suppose we don't want to use SAXException. -kk
190:
191:            // those method signatures are purposely made to JAXBContext, not
192:            // XMLSerializable, to avoid N^2 proxy overhead.  
193:
194:            /**
195:             * This method is called when an JAXBObject object is found
196:             * while the marshaller is in the "element" mode (i.e. marshalling
197:             * a content model of an element)
198:             * 
199:             * @param fieldName
200:             *      property name of the parent objeect from which 'o' comes.
201:             *      Used as a part of the error message in case anything goes wrong
202:             *      with 'o'. 
203:             */
204:            void childAsBody(JAXBObject o, String fieldName)
205:                    throws SAXException;
206:
207:            /**
208:             * This method is called when an JAXBObject object is found
209:             * while the marshaller is in the "attribute" mode (i.e. marshalling
210:             * attributes of an element)
211:             * 
212:             * @param fieldName
213:             *      property name of the parent objeect from which 'o' comes.
214:             *      Used as a part of the error message in case anything goes wrong
215:             *      with 'o'. 
216:             */
217:            void childAsAttributes(JAXBObject o, String fieldName)
218:                    throws SAXException;
219:
220:            /**
221:             * This method is called when an JAXBObject object is found
222:             * while the marshaller is in the "URI" mode.
223:             * 
224:             * @param fieldName
225:             *      property name of the parent objeect from which 'o' comes.
226:             *      Used as a part of the error message in case anything goes wrong
227:             *      with 'o'. 
228:             */
229:            void childAsURIs(JAXBObject o, String fieldName)
230:                    throws SAXException;
231:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.