public Grammar retrieveGrammar(XMLGrammarDescription gDesc) { synchronized (fGrammarPool) { return fGrammarPool.retrieveGrammar(gDesc); } } // retrieveGrammar(XMLGrammarDesc): Grammar
public Grammar retrieveGrammar(XMLGrammarDescription desc) { return core.retrieveGrammar(desc); }
public Grammar retrieveGrammar(XMLGrammarDescription desc) { return fGrammarPool.retrieveGrammar(desc); }
/** * Retrieve a particular grammar. * REVISIT: does this need to be synchronized since it's just reading? * * @param gDesc Description of the grammar to be retrieved * @return Grammar corresponding to gDesc, or null if none exists. */ public Grammar retrieveGrammar(XMLGrammarDescription gDesc) { Grammar g = super.retrieveGrammar(gDesc); if(g != null) return g; return fGrammarPool.retrieveGrammar(gDesc); } // retrieveGrammar(XMLGrammarDesc): Grammar
/** * First try to find a grammar in the bucket, if failed, consult the * grammar pool. If a grammar is found in the pool, then add it (and all * imported ones) into the bucket. */ protected SchemaGrammar findGrammar(XSDDescription desc, boolean ignoreConflict) { SchemaGrammar sg = fGrammarBucket.getGrammar(desc.getTargetNamespace()); if (sg == null) { if (fGrammarPool != null) { sg = (SchemaGrammar)fGrammarPool.retrieveGrammar(desc); if (sg != null) { // put this grammar into the bucket, along with grammars // imported by it (directly or indirectly) if (!fGrammarBucket.putGrammar(sg, true, ignoreConflict)) { // REVISIT: a conflict between new grammar(s) and grammars // in the bucket. What to do? A warning? An exception? reportSchemaWarning("GrammarConflict", null, null); sg = null; } } } } return sg; }
fDTDGrammar = (DTDGrammar)fGrammarPool.retrieveGrammar(grammarDesc);
fXSDDescription.setNamespace(namespace); if (fGrammarPool != null) { grammar = (SchemaGrammar) fGrammarPool.retrieveGrammar(fXSDDescription); if (grammar != null) {