Source Code Cross Referenced for SchemaDVFactory.java in  » XML » xerces-2_9_1 » org » apache » xerces » impl » dv » 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 » XML » xerces 2_9_1 » org.apache.xerces.impl.dv 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        package org.apache.xerces.impl.dv;
019:
020:        import org.apache.xerces.util.SymbolHash;
021:        import org.apache.xerces.xs.XSObjectList;
022:
023:        /**
024:         * Defines a factory API that enables applications to <p>
025:         * 1. to get the instance of specified SchemaDVFactory implementation <p>
026:         * 2. to create/return built-in schema simple types <p>
027:         * 3. to create user defined simple types. <p>
028:         *
029:         * Implementations of this abstract class can be used to get built-in simple
030:         * types and create user-defined simle types. <p>
031:         *
032:         * The implementation should store the built-in datatypes in static data, so
033:         * that they can be shared by multiple parser instance, and multiple threads.
034:         * 
035:         * @xerces.internal 
036:         *
037:         * @author Sandy Gao, IBM
038:         *
039:         * @version $Id: SchemaDVFactory.java 558582 2007-07-23 02:05:04Z mrglavas $
040:         */
041:        public abstract class SchemaDVFactory {
042:
043:            private static final String DEFAULT_FACTORY_CLASS = "org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl";
044:
045:            /**
046:             * Get a default instance of SchemaDVFactory implementation.
047:             *
048:             * @return  an instance of SchemaDVFactory implementation
049:             * @exception DVFactoryException  cannot create an instance of the specified
050:             *                                class name or the default class name
051:             */
052:            public static final SchemaDVFactory getInstance()
053:                    throws DVFactoryException {
054:                return getInstance(DEFAULT_FACTORY_CLASS);
055:            } //getInstance():  SchemaDVFactory
056:
057:            /**
058:             * Get an instance of SchemaDVFactory implementation.
059:             *
060:             * @param factoryClass   name of the schema factory implementation to instantiate.
061:             * @return  an instance of SchemaDVFactory implementation
062:             * @exception DVFactoryException  cannot create an instance of the specified
063:             *                                class name or the default class name
064:             */
065:            public static final SchemaDVFactory getInstance(String factoryClass)
066:                    throws DVFactoryException {
067:                try {
068:                    // if the class name is not specified, use the default one
069:                    return (SchemaDVFactory) (ObjectFactory
070:                            .newInstance(factoryClass, ObjectFactory
071:                                    .findClassLoader(), true));
072:                } catch (ClassCastException e4) {
073:                    throw new DVFactoryException("Schema factory class "
074:                            + factoryClass
075:                            + " does not extend from SchemaDVFactory.");
076:                }
077:            }
078:
079:            // can't create a new object of this class
080:            protected SchemaDVFactory() {
081:            }
082:
083:            /**
084:             * Get a built-in simple type of the given name
085:             * REVISIT: its still not decided within the Schema WG how to define the
086:             *          ur-types and if all simple types should be derived from a
087:             *          complex type, so as of now we ignore the fact that anySimpleType
088:             *          is derived from anyType, and pass 'null' as the base of
089:             *          anySimpleType. It needs to be changed as per the decision taken.
090:             *
091:             * @param name  the name of the datatype
092:             * @return      the datatype validator of the given name
093:             */
094:            public abstract XSSimpleType getBuiltInType(String name);
095:
096:            /**
097:             * get all built-in simple types, which are stored in a SymbolHash keyed by
098:             * the name
099:             *
100:             * @return      a SymbolHash which contains all built-in simple types
101:             */
102:            public abstract SymbolHash getBuiltInTypes();
103:
104:            /**
105:             * Create a new simple type which is derived by restriction from another
106:             * simple type.
107:             *
108:             * @param name              name of the new type, could be null
109:             * @param targetNamespace   target namespace of the new type, could be null
110:             * @param finalSet          value of "final"
111:             * @param base              base type of the new type
112:             * @param annotations       set of annotations
113:             * @return                  the newly created simple type
114:             */
115:            public abstract XSSimpleType createTypeRestriction(String name,
116:                    String targetNamespace, short finalSet, XSSimpleType base,
117:                    XSObjectList annotations);
118:
119:            /**
120:             * Create a new simple type which is derived by list from another simple
121:             * type.
122:             *
123:             * @param name              name of the new type, could be null
124:             * @param targetNamespace   target namespace of the new type, could be null
125:             * @param finalSet          value of "final"
126:             * @param itemType          item type of the list type
127:             * @param annotations       set of annotations
128:             * @return                  the newly created simple type
129:             */
130:            public abstract XSSimpleType createTypeList(String name,
131:                    String targetNamespace, short finalSet,
132:                    XSSimpleType itemType, XSObjectList annotations);
133:
134:            /**
135:             * Create a new simple type which is derived by union from a list of other
136:             * simple types.
137:             *
138:             * @param name              name of the new type, could be null
139:             * @param targetNamespace   target namespace of the new type, could be null
140:             * @param finalSet          value of "final"
141:             * @param memberTypes       member types of the union type
142:             * @param annotations       set of annotations
143:             * @return                  the newly created simple type
144:             */
145:            public abstract XSSimpleType createTypeUnion(String name,
146:                    String targetNamespace, short finalSet,
147:                    XSSimpleType[] memberTypes, XSObjectList annotations);
148:
149:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.