Source Code Cross Referenced for PanelsRootConfigParser.java in  » Web-Framework » calyxo » de » odysseus » calyxo » panels » conf » impl » 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 Framework » calyxo » de.odysseus.calyxo.panels.conf.impl 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2004, 2005, 2006 Odysseus Software GmbH
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *     http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package de.odysseus.calyxo.panels.conf.impl;
017:
018:        import java.net.URL;
019:
020:        import org.apache.commons.digester.Digester;
021:        import org.apache.commons.logging.Log;
022:        import org.apache.commons.logging.LogFactory;
023:
024:        import de.odysseus.calyxo.base.ModuleContext;
025:        import de.odysseus.calyxo.base.conf.ConfigException;
026:        import de.odysseus.calyxo.base.conf.impl.RootConfigImpl;
027:        import de.odysseus.calyxo.base.conf.impl.RootConfigImplParser;
028:        import de.odysseus.calyxo.panels.conf.PanelsRootConfig;
029:
030:        /**
031:         * Panels configuration parser.
032:         * 
033:         * @author Christoph Beck
034:         */
035:        public class PanelsRootConfigParser extends RootConfigImplParser {
036:            private static final Log log = LogFactory
037:                    .getLog(PanelsRootConfigParser.class);
038:
039:            private static final SchemaResolver SCHEMA_RESOLVER = new SchemaResolver(
040:                    "/de/odysseus/calyxo/panels/conf/impl/calyxo-panels-config.xsd");
041:
042:            private static final DTDResolver DTD_RESOLVER = new DTDResolver(
043:                    "-//Odysseus Software GmbH//DTD Calyxo Panels 0.9//EN",
044:                    "/de/odysseus/calyxo/panels/conf/impl/calyxo-panels-config.dtd");
045:
046:            /**
047:             * Constructor.
048:             */
049:            public PanelsRootConfigParser(ModuleContext context) {
050:                super (context);
051:            }
052:
053:            /*
054:             * (non-Javadoc)
055:             * @see de.odysseus.calyxo.base.conf.impl.RootConfigImplParser#createRoot()
056:             */
057:            protected RootConfigImpl createRoot() {
058:                return new PanelsRootConfigImpl();
059:            }
060:
061:            /* (non-Javadoc)
062:             * @see org.apache.commons.digester.RuleSet#addRuleInstances(org.apache.commons.digester.Digester)
063:             */
064:            public void addRuleInstances(Digester digester) {
065:                digester
066:                        .setRuleNamespaceURI("http://calyxo.odysseus.de/xml/ns/panels");
067:
068:                // Handle panels element
069:                digester.addObjectCreate("*/panels", PanelsConfigImpl.class
070:                        .getName());
071:                digester.addSetProperties("*/panels");
072:                digester.addSetNext("*/panels", "add", PanelsConfigImpl.class
073:                        .getName());
074:
075:                // Handle panel element
076:                digester.addObjectCreate("*/panel", PanelConfigImpl.class
077:                        .getName());
078:                digester.addSetProperties("*/panel");
079:                digester.addSetNext("*/panel", "add", PanelConfigImpl.class
080:                        .getName());
081:
082:                // Handle param elements
083:                digester.addObjectCreate("*/param", ParamConfigImpl.class
084:                        .getName());
085:                digester.addSetProperties("*/param");
086:                digester.addSetNext("*/param", "add", ParamConfigImpl.class
087:                        .getName());
088:
089:                // Handle list elements
090:                digester.addObjectCreate("*/list", ListConfigImpl.class
091:                        .getName());
092:                digester.addSetProperties("*/list");
093:                digester.addSetNext("*/list", "add", ListConfigImpl.class
094:                        .getName());
095:
096:                // Handle item elements
097:                digester.addObjectCreate("*/item", ItemConfigImpl.class
098:                        .getName());
099:                digester.addSetProperties("*/item");
100:                digester.addSetNext("*/item", "add", ItemConfigImpl.class
101:                        .getName());
102:
103:            }
104:
105:            /**
106:             * Parse panels configuration files..
107:             * @param urls pointing to xml configuration files
108:             * @return Panels configuration
109:             * @throws ConfigException on error during parse or initialization
110:             */
111:            public PanelsRootConfig parse(URL[] urls) throws ConfigException {
112:                return (PanelsRootConfigImpl) parseAll(urls);
113:            }
114:
115:            /* (non-Javadoc)
116:             * @see de.odysseus.calyxo.base.conf.impl.RootConfigImplParser#getDtdResolver()
117:             */
118:            protected DTDResolver getDtdResolver() {
119:                return DTD_RESOLVER;
120:            }
121:
122:            /* (non-Javadoc)
123:             * @see de.odysseus.calyxo.base.conf.impl.RootConfigImplParser#getSchemaResolver()
124:             */
125:            protected SchemaResolver getSchemaResolver() {
126:                return SCHEMA_RESOLVER;
127:            }
128:
129:            /*
130:             * (non-Javadoc)
131:             * @see de.odysseus.calyxo.base.conf.impl.RootConfigImplParser#getLog()
132:             */
133:            protected Log getLog() {
134:                return log;
135:            }
136:
137:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.