Package org.apache.xerces.impl.xs
Class XSGrammarBucket
java.lang.Object
org.apache.xerces.impl.xs.XSGrammarBucket
A class used to hold the internal schema grammar set for the current instance
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: XSGrammarBucket.java 779298 2009-05-27 20:26:13Z knoaman $
- Author:
- Sandy Gao, IBM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGrammar
(String namespace) Get the schema grammar for the specified namespaceget all grammars in the registryvoid
putGrammar
(SchemaGrammar grammar) Put a schema grammar into the registry This method is for internal use only: it assumes that a grammar with the same target namespace is not already in the bucket.boolean
putGrammar
(SchemaGrammar grammar, boolean deep) put a schema grammar and any grammars imported by it (directly or inderectly) into the registry.boolean
putGrammar
(SchemaGrammar grammar, boolean deep, boolean ignoreConflict) put a schema grammar and any grammars imported by it (directly or inderectly) into the registry.void
reset()
Clear the registry.
-
Constructor Details
-
XSGrammarBucket
public XSGrammarBucket()
-
-
Method Details
-
getGrammar
Get the schema grammar for the specified namespace- Parameters:
namespace
-- Returns:
- SchemaGrammar associated with the namespace
-
putGrammar
Put a schema grammar into the registry This method is for internal use only: it assumes that a grammar with the same target namespace is not already in the bucket.- Parameters:
grammar
- the grammar to put in the registry
-
putGrammar
put a schema grammar and any grammars imported by it (directly or inderectly) into the registry. when a grammar with the same target namespace is already in the bucket, and different from the one being added, it's an error, and no grammar will be added into the bucket.- Parameters:
grammar
- the grammar to put in the registrydeep
- whether to add imported grammars- Returns:
- whether the process succeeded
-
putGrammar
put a schema grammar and any grammars imported by it (directly or inderectly) into the registry. when a grammar with the same target namespace is already in the bucket, and different from the one being added, no grammar will be added into the bucket.- Parameters:
grammar
- the grammar to put in the registrydeep
- whether to add imported grammarsignoreConflict
- whether to ignore grammars that already exist in the grammar bucket or not - including 'grammar' parameter.- Returns:
- whether the process succeeded
-
getGrammars
get all grammars in the registry- Returns:
- an array of SchemaGrammars.
-
reset
public void reset()Clear the registry. REVISIT: update to use another XSGrammarBucket
-