Source Code Cross Referenced for SAXParserFactory.java in  » Web-Server » Rimfaxe-Web-Server » javax » xml » parsers » 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 » Web Server » Rimfaxe Web Server » javax.xml.parsers 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Id: SAXParserFactory.java,v 1.6 2001/12/05 22:49:25 db Exp $
003:         * Copyright (C) 2001 Andrew Selkirk
004:         * Copyright (C) 2001 David Brownell
005:         * 
006:         * This file is part of GNU JAXP, a library.
007:         *
008:         * GNU JAXP is free software; you can redistribute it and/or modify
009:         * it under the terms of the GNU General Public License as published by
010:         * the Free Software Foundation; either version 2 of the License, or
011:         * (at your option) any later version.
012:         * 
013:         * GNU JAXP is distributed in the hope that it will be useful,
014:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
015:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
016:         * GNU General Public License for more details.
017:         * 
018:         * You should have received a copy of the GNU General Public License
019:         * along with this program; if not, write to the Free Software
020:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
021:         *
022:         * As a special exception, if you link this library with other files to
023:         * produce an executable, this library does not by itself cause the
024:         * resulting executable to be covered by the GNU General Public License.
025:         * This exception does not however invalidate any other reasons why the
026:         * executable file might be covered by the GNU General Public License. 
027:         */
028:
029:        package javax.xml.parsers;
030:
031:        // Imports
032:        import java.io.IOException;
033:        import java.io.InputStream;
034:        import java.io.File;
035:        import java.io.BufferedReader;
036:        import java.io.InputStreamReader;
037:        import java.util.Properties;
038:        import org.w3c.dom.*;
039:        import org.xml.sax.*;
040:
041:        /**
042:         * SAXParserFactory is used to bootstrap JAXP wrappers for
043:         * SAX parsers.
044:         *
045:         * <para> Note that the JAXP 1.1 spec does not specify how
046:         * the <em>isValidating()</em> or <em>isNamespaceAware()</em>
047:         * flags relate to the SAX2 feature flags controlling those
048:         * same features.
049:         *
050:         * @author	Andrew Selkirk, David Brownell
051:         * @version	1.0
052:         */
053:
054:        public abstract class SAXParserFactory {
055:
056:            //-------------------------------------------------------------
057:            // Variables --------------------------------------------------
058:            //-------------------------------------------------------------
059:
060:            private static final String defaultPropName = "javax.xml.parsers.SAXParserFactory";
061:
062:            private boolean validating = false;
063:            private boolean namespaceAware = false;
064:
065:            //-------------------------------------------------------------
066:            // Initialization ---------------------------------------------
067:            //-------------------------------------------------------------
068:
069:            protected SAXParserFactory() {
070:            } // SAXParserFactory()
071:
072:            //-------------------------------------------------------------
073:            // Methods ----------------------------------------------------
074:            //-------------------------------------------------------------
075:
076:            public static SAXParserFactory newInstance() {
077:                try {
078:                    return (SAXParserFactory) ClassStuff.createFactory(
079:                            defaultPropName, "gnu.xml.aelfred2.JAXPFactory");
080:                } catch (ClassCastException e) {
081:                    throw new FactoryConfigurationError(e,
082:                            "Factory class is the wrong type");
083:                }
084:            }
085:
086:            /**
087:             * Returns a new instance of a SAXParser using the platform
088:             * default implementation and the currently specified factory
089:             * feature flag settings.
090:             *
091:             * @exception ParserConfigurationException
092:             *	when the parameter combination is not supported
093:             * @exception SAXNotRecognizedException
094:             *	if one of the specified SAX2 feature flags is not recognized
095:             * @exception SAXNotSupportedException
096:             *	if one of the specified SAX2 feature flags values can
097:             *	not be set, perhaps because of sequencing requirements
098:             *	(which could be met by using SAX2 directly)
099:             */
100:            public abstract SAXParser newSAXParser()
101:                    throws ParserConfigurationException, SAXException;
102:
103:            public void setNamespaceAware(boolean value) {
104:                namespaceAware = value;
105:            } // setNamespaceAware()
106:
107:            public void setValidating(boolean value) {
108:                validating = value;
109:            } // setValidating()
110:
111:            public boolean isNamespaceAware() {
112:                return namespaceAware;
113:            } // isNamespaceAware()
114:
115:            public boolean isValidating() {
116:                return validating;
117:            } // isValidating()
118:
119:            /**
120:             * Establishes a factory parameter corresponding to the
121:             * specified feature flag.
122:             *
123:             * @param name identifies the feature flag
124:             * @param value specifies the desired flag value
125:             *
126:             * @exception SAXNotRecognizedException
127:             *	if the specified SAX2 feature flag is not recognized
128:             * @exception SAXNotSupportedException
129:             *	if the specified SAX2 feature flag values can not be set,
130:             *	perhaps because of sequencing requirements (which could
131:             *	be met by using SAX2 directly)
132:             */
133:            public abstract void setFeature(String name, boolean value)
134:                    throws ParserConfigurationException,
135:                    SAXNotRecognizedException, SAXNotSupportedException;
136:
137:            /**
138:             * Retrieves a current factory feature flag setting.
139:             *
140:             * @param name identifies the feature flag
141:             *
142:             * @exception SAXNotRecognizedException
143:             *	if the specified SAX2 feature flag is not recognized
144:             * @exception SAXNotSupportedException
145:             *	if the specified SAX2 feature flag values can not be
146:             *	accessed before parsing begins.
147:             */
148:            public abstract boolean getFeature(String name)
149:                    throws ParserConfigurationException,
150:                    SAXNotRecognizedException, SAXNotSupportedException;
151:
152:        } // SAXParserFactory
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.