Source Code Cross Referenced for DefaultJAXBContextImpl.java in  » Forum » mvnforum-1.1 » com » mvnforum » jaxb » db » 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 » Forum » mvnforum 1.1 » com.mvnforum.jaxb.db.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.5-b16-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.12.17 at 09:43:27 AM GMT+07:00 
006:        //
007:
008:        package com.mvnforum.jaxb.db.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.3 $
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:             * <p>
077:             * getGrammar is normally very expensive, so it's worth
078:             * synchronizing to avoid unnecessary invocation.
079:             */
080:            public synchronized com.sun.msv.grammar.Grammar getGrammar()
081:                    throws JAXBException {
082:                if (grammar == null)
083:                    grammar = gi.getGrammar();
084:                return grammar;
085:            }
086:
087:            /**
088:             * Create a <CODE>Marshaller</CODE> object that can be used to convert a
089:             * java content-tree into XML data.
090:             *
091:             * @return a <CODE>Marshaller</CODE> object
092:             * @throws JAXBException if an error was encountered while creating the
093:             *                      <code>Marshaller</code> object
094:             */
095:            public Marshaller createMarshaller() throws JAXBException {
096:                return new MarshallerImpl(this );
097:            }
098:
099:            /**
100:             * Create an <CODE>Unmarshaller</CODE> object that can be used to convert XML
101:             * data into a java content-tree.
102:             *
103:             * @return an <CODE>Unmarshaller</CODE> object
104:             * @throws JAXBException if an error was encountered while creating the
105:             *                      <code>Unmarshaller</code> object
106:             */
107:            public Unmarshaller createUnmarshaller() throws JAXBException {
108:                return new UnmarshallerImpl(this , gi);
109:            }
110:
111:            /**
112:             * Create a <CODE>Validator</CODE> object that can be used to validate a
113:             * java content-tree.
114:             *
115:             * @return an <CODE>Unmarshaller</CODE> object
116:             * @throws JAXBException if an error was encountered while creating the
117:             *                      <code>Validator</code> object
118:             */
119:            public Validator createValidator() throws JAXBException {
120:                return new ValidatorImpl(this );
121:            }
122:
123:            /**
124:             * Create an instance of the specified Java content interface.  
125:             *
126:             * @param javaContentInterface the Class object 
127:             * @return an instance of the Java content interface
128:             * @exception JAXBException
129:             */
130:            public Object newInstance(Class javaContentInterface)
131:                    throws JAXBException {
132:
133:                if (javaContentInterface == null) {
134:                    throw new JAXBException(Messages
135:                            .format(Messages.CI_NOT_NULL));
136:                }
137:
138:                try {
139:                    Class c = gi.getDefaultImplementation(javaContentInterface);
140:                    if (c == null)
141:                        throw new JAXBException(Messages.format(
142:                                Messages.MISSING_INTERFACE,
143:                                javaContentInterface));
144:
145:                    return c.newInstance();
146:                } catch (Exception e) {
147:                    throw new JAXBException(e);
148:                }
149:            }
150:
151:            /**
152:             * There are no required properties, so simply throw an exception.  Other
153:             * providers may have support for properties on Validator, but the RI doesn't
154:             */
155:            public void setProperty(String name, Object value)
156:                    throws PropertyException {
157:
158:                throw new PropertyException(name, value);
159:            }
160:
161:            /**
162:             * There are no required properties, so simply throw an exception.  Other
163:             * providers may have support for properties on Validator, but the RI doesn't
164:             */
165:            public Object getProperty(String name) throws PropertyException {
166:
167:                throw new PropertyException(name);
168:            }
169:
170:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.