1 16 17 package org.apache.xerces.jaxp.validation; 18 19 import org.apache.xerces.xni.grammars.Grammar; 20 import org.apache.xerces.xni.grammars.XMLGrammarDescription; 21 import org.apache.xerces.xni.grammars.XMLGrammarPool; 22 23 30 final class EmptyXMLSchema extends AbstractXMLSchema implements XMLGrammarPool { 31 32 private static EmptyXMLSchema EMPTY_XML_SCHEMA_INSTANCE = new EmptyXMLSchema(); 33 34 35 private static final Grammar [] ZERO_LENGTH_GRAMMAR_ARRAY = new Grammar [0]; 36 37 38 public static EmptyXMLSchema getInstance() { 39 return EMPTY_XML_SCHEMA_INSTANCE; 40 } 41 42 private EmptyXMLSchema() {} 43 44 47 48 public Grammar[] retrieveInitialGrammarSet(String grammarType) { 49 return ZERO_LENGTH_GRAMMAR_ARRAY; 50 } 51 52 public void cacheGrammars(String grammarType, Grammar[] grammars) {} 53 54 public Grammar retrieveGrammar(XMLGrammarDescription desc) { 55 return null; 56 } 57 58 public void lockPool() {} 59 60 public void unlockPool() {} 61 62 public void clear() {} 63 64 67 68 public XMLGrammarPool getGrammarPool() { 69 return this; 70 } 71 72 public boolean isFullyComposed() { 73 return true; 74 } 75 76 } | Popular Tags |