You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by je...@locus.apache.org on 2000/10/04 13:12:51 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/impl/validation GrammarPool.java
jeffreyr 00/10/04 04:12:51
Modified: java/src/org/apache/xerces/impl/validation Tag: xerces_j_2
GrammarPool.java
Log:
Implemented GrammarPool
Revision Changes Path
No revision
No revision
1.1.2.3 +11 -16 xml-xerces/java/src/org/apache/xerces/impl/validation/Attic/GrammarPool.java
Index: GrammarPool.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/validation/Attic/GrammarPool.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- GrammarPool.java 2000/10/02 00:40:07 1.1.2.2
+++ GrammarPool.java 2000/10/04 11:12:50 1.1.2.3
@@ -61,7 +61,7 @@
/**
* @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @version $Id: GrammarPool.java,v 1.1.2.2 2000/10/02 00:40:07 lehors Exp $
+ * @version $Id: GrammarPool.java,v 1.1.2.3 2000/10/04 11:12:50 jeffreyr Exp $
*/
public class GrammarPool {
@@ -70,29 +70,21 @@
//
/** fGrammars */
- protected Hashtable fGrammars;
+ protected Hashtable fGrammars = new Hashtable();
- //
- // Constructors
- //
-
/**
- *
+ * Default Constructor
*/
public GrammarPool() {
}
- //
- // Methods
- //
-
/**
- * putGrammar
*
- * @param key
- * @param grammar
+ * @param key Key to associate with Grammar
+ * @param grammar Grammar abstraction used by validator
*/
public void putGrammar(String key, Grammar grammar) {
+ fGrammars.put( key, grammar);
} // putGrammar
/**
@@ -103,17 +95,20 @@
* @return
*/
public Grammar getGrammar(String key) {
- return null;
+ return(Grammar) fGrammars.get( key );
} // getGrammar
/**
- * removeGrammar
+ * removeGrammar - Removes association of key and Grammar from
+ * Grammar pool.
*
* @param key
*
* @return
*/
public Grammar removeGrammar(String key) {
+ if ( fGrammars.contains( key ) == true )
+ fGrammars.remove( key );
return null;
} // removeGrammar