Source Code Cross Referenced for DOMXSImplementationSourceImpl.java in  » XML » xerces-2_9_1 » org » apache » xerces » dom » 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.dom 
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.dom;
019:
020:        import org.apache.xerces.impl.xs.XSImplementationImpl;
021:        import org.w3c.dom.DOMImplementationList;
022:        import org.w3c.dom.DOMImplementation;
023:        import java.util.Vector;
024:
025:        /**
026:         * Allows to retrieve <code>XSImplementation</code>, DOM Level 3 Core and LS implementations
027:         * and PSVI implementation.
028:         * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#DOMImplementationSource'>Document Object Model (DOM) Level 3 Core Specification</a>.
029:         * 
030:         * @xerces.internal
031:         * 
032:         * @author Elena Litani, IBM
033:         * @version $Id: DOMXSImplementationSourceImpl.java 447266 2006-09-18 05:57:49Z mrglavas $
034:         */
035:        public class DOMXSImplementationSourceImpl extends
036:                DOMImplementationSourceImpl {
037:
038:            /**
039:             * A method to request a DOM implementation.
040:             * @param features A string that specifies which features are required. 
041:             *   This is a space separated list in which each feature is specified 
042:             *   by its name optionally followed by a space and a version number. 
043:             *   This is something like: "XML 1.0 Traversal Events 2.0"
044:             * @return An implementation that has the desired features, or 
045:             *   <code>null</code> if this source has none.
046:             */
047:            public DOMImplementation getDOMImplementation(String features) {
048:                DOMImplementation impl = super .getDOMImplementation(features);
049:                if (impl != null) {
050:                    return impl;
051:                }
052:                // if not try the PSVIDOMImplementation
053:                impl = PSVIDOMImplementationImpl.getDOMImplementation();
054:                if (testImpl(impl, features)) {
055:                    return impl;
056:                }
057:                // if not try the XSImplementation
058:                impl = XSImplementationImpl.getDOMImplementation();
059:                if (testImpl(impl, features)) {
060:                    return impl;
061:                }
062:
063:                return null;
064:            }
065:
066:            /**
067:             * A method to request a list of DOM implementations that support the 
068:             * specified features and versions, as specified in .
069:             * @param features A string that specifies which features and versions 
070:             *   are required. This is a space separated list in which each feature 
071:             *   is specified by its name optionally followed by a space and a 
072:             *   version number. This is something like: "XML 3.0 Traversal +Events 
073:             *   2.0"
074:             * @return A list of DOM implementations that support the desired 
075:             *   features.
076:             */
077:            public DOMImplementationList getDOMImplementationList(
078:                    String features) {
079:                final Vector implementations = new Vector();
080:
081:                // first check whether the CoreDOMImplementation would do
082:                DOMImplementationList list = super 
083:                        .getDOMImplementationList(features);
084:                //Add core DOMImplementations
085:                for (int i = 0; i < list.getLength(); i++) {
086:                    implementations.addElement(list.item(i));
087:                }
088:
089:                DOMImplementation impl = PSVIDOMImplementationImpl
090:                        .getDOMImplementation();
091:                if (testImpl(impl, features)) {
092:                    implementations.addElement(impl);
093:                }
094:
095:                impl = XSImplementationImpl.getDOMImplementation();
096:                if (testImpl(impl, features)) {
097:                    implementations.addElement(impl);
098:                }
099:                return new DOMImplementationListImpl(implementations);
100:            }
101:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.