public class

XSGrammarBucket

extends Object
java.lang.Object
   ↳ org.apache.xerces.impl.xs.XSGrammarBucket

Class Overview

A class used to hold the internal schema grammar set for the current instance

Summary

Public Constructors
XSGrammarBucket()
Public Methods
SchemaGrammar getGrammar(String namespace)
Get the schema grammar for the specified namespace
SchemaGrammar[] getGrammars()
get all grammars in the registry
boolean putGrammar(SchemaGrammar grammar, boolean deep)
put a schema grammar and any grammars imported by it (directly or inderectly) into the registry.
void 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.
void reset()
Clear the registry.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public XSGrammarBucket ()

Public Methods

public SchemaGrammar getGrammar (String namespace)

Get the schema grammar for the specified namespace

Returns
  • SchemaGrammar associated with the namespace

public SchemaGrammar[] getGrammars ()

get all grammars in the registry

Returns
  • an array of SchemaGrammars.

public boolean putGrammar (SchemaGrammar grammar, boolean deep)

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 registry
deep whether to add imported grammars
Returns
  • whether the process succeeded

public void 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.

Parameters
grammar the grammar to put in the registry

public void reset ()

Clear the registry. REVISIT: update to use another XSGrammarBucket