Source Code Cross Referenced for XMLGrammarPool.java in  » XML » xerces-2_9_1 » org » apache » xerces » xni » grammars » 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.xni.grammars 
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:        package org.apache.xerces.xni.grammars;
018:
019:        /**
020:         * <p> This interface specifies how the parser and the application
021:         * interact with respect to Grammar objects that the application
022:         * possesses--either by having precompiled them or by having stored them
023:         * from a previous validation of an instance document.  It makes no
024:         * assumptions about the kind of Grammar involved, or about how the
025:         * application's storage mechanism works.</p>
026:         *
027:         * <p>The interaction works as follows:
028:         * <ul>
029:         * <li>When a validator considers a document, it is expected to request
030:         * grammars of the type it can handle from this object using the
031:         * <code>retrieveInitialGrammarSet</code> method. </li>
032:         * <li>If it requires a grammar
033:         * not in this set, it will request it from this Object using the
034:         * <code>retrieveGrammar</code> method.  </li>
035:         * <li> After successfully validating an
036:         * instance, the validator should make any new grammars it has compiled
037:         * available to this object using the <code>cacheGrammars</code>
038:         * method; for ease of implementation it may make other Grammars it holds references to as well (i.e., 
039:         * it may return some grammars that were retrieved from the GrammarPool in earlier operations). </li> </ul> </p>
040:         *
041:         * @author Neil Graham, IBM
042:         * @version $Id: XMLGrammarPool.java 447245 2006-09-18 05:22:10Z mrglavas $
043:         */
044:
045:        public interface XMLGrammarPool {
046:
047:            // <p>we are trying to make this XMLGrammarPool work for all kinds of
048:            // grammars, so we have a parameter "grammarType" for each of the
049:            // methods. </p>
050:
051:            /**
052:             * <p> retrieve the initial known set of grammars. this method is
053:             * called by a validator before the validation starts. the application 
054:             * can provide an initial set of grammars available to the current 
055:             * validation attempt. </p>
056:             * @param grammarType the type of the grammar, from the
057:             *  <code>org.apache.xerces.xni.grammars.Grammar</code> interface.
058:             * @return the set of grammars the validator may put in its "bucket"
059:             */
060:            public Grammar[] retrieveInitialGrammarSet(String grammarType);
061:
062:            /** 
063:             * <p>return the final set of grammars that the validator ended up
064:             * with.  
065:             * This method is called after the
066:             * validation finishes. The application may then choose to cache some
067:             * of the returned grammars. </p>
068:             * @param grammarType the type of the grammars being returned;
069:             * @param grammars an array containing the set of grammars being
070:             *  returned; order is not significant.
071:             */
072:            public void cacheGrammars(String grammarType, Grammar[] grammars);
073:
074:            /** 
075:             * <p> This method requests that the application retrieve a grammar
076:             * corresponding to the given GrammarIdentifier from its cache.
077:             * If it cannot do so it must return null; the parser will then
078:             * call the EntityResolver.  <strong>An application must not call its
079:             * EntityResolver itself from this method; this may result in infinite
080:             * recursions.</strong>
081:             * @param desc The description of the Grammar being requested.
082:             * @return the Grammar corresponding to this description or null if
083:             *  no such Grammar is known.
084:             */
085:            public Grammar retrieveGrammar(XMLGrammarDescription desc);
086:
087:            /**
088:             * Causes the XMLGrammarPool not to store any grammars when
089:             * the cacheGrammars(String, Grammar[[]) method is called.
090:             */
091:            public void lockPool();
092:
093:            /**
094:             * Allows the XMLGrammarPool to store grammars when its cacheGrammars(String, Grammar[])
095:             * method is called.  This is the default state of the object.
096:             */
097:            public void unlockPool();
098:
099:            /**
100:             * Removes all grammars from the pool.
101:             */
102:            public void clear();
103:        } // XMLGrammarPool
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.