Source Code Cross Referenced for DefaultJAXBContextImpl.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.DatatypeConverter;
011:        import javax.xml.bind.JAXBContext;
012:        import javax.xml.bind.JAXBException;
013:        import javax.xml.bind.Marshaller;
014:        import javax.xml.bind.PropertyException;
015:        import javax.xml.bind.Unmarshaller;
016:        import javax.xml.bind.Validator;
017:
018:        import com.sun.xml.bind.Messages;
019:        import com.sun.xml.bind.DatatypeConverterImpl;
020:
021:        /**
022:         * This class provides the default implementation of JAXBContext.  It
023:         * also creates the GrammarInfoFacade that unifies all of the grammar
024:         * info from packages on the contextPath.
025:         *
026:         * @version $Revision: 1.1 $
027:         */
028:        public class DefaultJAXBContextImpl extends JAXBContext {
029:
030:            /**
031:             * This object keeps information about the grammar.
032:             * 
033:             * When more than one package are specified,
034:             * GrammarInfoFacade is used.
035:             */
036:            private GrammarInfo gi = null;
037:
038:            /**
039:             * This is the constructor used by javax.xml.bind.FactoryFinder which
040:             * bootstraps the RI.  It causes the construction of a JAXBContext that
041:             * contains a GrammarInfoFacade which is the union of all the generated
042:             * JAXBContextImpl objects on the contextPath.
043:             */
044:            public DefaultJAXBContextImpl(String contextPath,
045:                    ClassLoader classLoader) throws JAXBException {
046:
047:                this (GrammarInfoFacade.createGrammarInfoFacade(contextPath,
048:                        classLoader));
049:
050:                // initialize datatype converter with ours
051:                DatatypeConverter
052:                        .setDatatypeConverter(DatatypeConverterImpl.theInstance);
053:            }
054:
055:            /**
056:             * This constructor is used by the default no-arg constructor in the
057:             * generated JAXBContextImpl objects.  It is also used by the 
058:             * bootstrapping constructor in this class.
059:             */
060:            public DefaultJAXBContextImpl(GrammarInfo gi) {
061:                this .gi = gi;
062:            }
063:
064:            public GrammarInfo getGrammarInfo() {
065:                return gi;
066:            }
067:
068:            /**
069:             * Once we load a grammar, we will cache the value here.
070:             */
071:            private com.sun.msv.grammar.Grammar grammar = null;
072:
073:            /**
074:             * Loads a grammar object for the unmarshal-time validation.
075:             */
076:            public com.sun.msv.grammar.Grammar getGrammar()
077:                    throws JAXBException {
078:                if (grammar == null)
079:                    // since JAXBContext needs to be thread-safe,
080:                    // this check might allow more than one thread to
081:                    // load a grammar, but that's fine; it's just a loss of
082:                    // time, but by itself it doesn't cause any problem.
083:                    // by not synchronizing method, we can avoid its overhead.
084:                    grammar = gi.getGrammar();
085:                return grammar;
086:            }
087:
088:            /**
089:             * Create a <CODE>Marshaller</CODE> object that can be used to convert a
090:             * java content-tree into XML data.
091:             *
092:             * @return a <CODE>Marshaller</CODE> object
093:             * @throws JAXBException if an error was encountered while creating the
094:             *                      <code>Marshaller</code> object
095:             */
096:            public Marshaller createMarshaller() throws JAXBException {
097:                return new MarshallerImpl(this );
098:            }
099:
100:            /**
101:             * Create an <CODE>Unmarshaller</CODE> object that can be used to convert XML
102:             * data into a java content-tree.
103:             *
104:             * @return an <CODE>Unmarshaller</CODE> object
105:             * @throws JAXBException if an error was encountered while creating the
106:             *                      <code>Unmarshaller</code> object
107:             */
108:            public Unmarshaller createUnmarshaller() throws JAXBException {
109:                return new UnmarshallerImpl(this , gi);
110:            }
111:
112:            /**
113:             * Create a <CODE>Validator</CODE> object that can be used to validate a
114:             * java content-tree.
115:             *
116:             * @return an <CODE>Unmarshaller</CODE> object
117:             * @throws JAXBException if an error was encountered while creating the
118:             *                      <code>Validator</code> object
119:             */
120:            public Validator createValidator() throws JAXBException {
121:                return new ValidatorImpl(this );
122:            }
123:
124:            /**
125:             * Create an instance of the specified Java content interface.  
126:             *
127:             * @param javaContentInterface the Class object 
128:             * @return an instance of the Java content interface
129:             * @exception JAXBException
130:             */
131:            public Object newInstance(Class javaContentInterface)
132:                    throws JAXBException {
133:
134:                if (javaContentInterface == null) {
135:                    throw new JAXBException(Messages
136:                            .format(Messages.CI_NOT_NULL));
137:                }
138:
139:                try {
140:                    Class c = gi.getDefaultImplementation(javaContentInterface);
141:                    if (c == null)
142:                        throw new JAXBException(Messages.format(
143:                                Messages.MISSING_INTERFACE,
144:                                javaContentInterface));
145:
146:                    return c.newInstance();
147:                } catch (Exception e) {
148:                    throw new JAXBException(e);
149:                }
150:            }
151:
152:            /**
153:             * There are no required properties, so simply throw an exception.  Other
154:             * providers may have support for properties on Validator, but the RI doesn't
155:             */
156:            public void setProperty(String name, Object value)
157:                    throws PropertyException {
158:
159:                throw new PropertyException(name, value);
160:            }
161:
162:            /**
163:             * There are no required properties, so simply throw an exception.  Other
164:             * providers may have support for properties on Validator, but the RI doesn't
165:             */
166:            public Object getProperty(String name) throws PropertyException {
167:
168:                throw new PropertyException(name);
169:            }
170:
171:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.