Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl.xs

public Class XSGrammarBucket

extends Object
Class Inheritance
Imports
java.util.ArrayList, .HashMap, .List, .Map

A class used to hold the internal schema grammar set for the current instance
Author
Sandy Gao, IBM

Field Summary

Modifier and TypeField and Description
pack-priv Map<String, SchemaGrammar>
fGrammarRegistry

Map that maps between Namespace and a Grammar

pack-priv SchemaGrammar

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public SchemaGrammar

Returns:

SchemaGrammar associated with the namespace
getGrammar
(String namespace)

Get the schema grammar for the specified namespace

public SchemaGrammar[]

Returns:

an array of SchemaGrammars.
getGrammars
()

get all grammars in the registry

public void
putGrammar(SchemaGrammar
the grammar to put in the registry
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.

public boolean

Returns:

whether the process succeeded
putGrammar
(SchemaGrammar
the grammar to put in the registry
grammar
,
boolean
whether to add imported grammars
deep
)

put a schema grammar and any grammars imported by it (directly or inderectly) into the registry.

public boolean

Returns:

whether the process succeeded
putGrammar
(SchemaGrammar
the grammar to put in the registry
grammar
,
boolean
whether to add imported grammars
deep
,
boolean
whether to ignore grammars that already exist in the grammar bucket or not - including 'grammar' parameter.
ignoreConflict
)

put a schema grammar and any grammars imported by it (directly or inderectly) into the registry.

public void
reset()

Clear the registry.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fGrammarRegistryback to summary
pack-priv Map<String, SchemaGrammar> fGrammarRegistry

Map that maps between Namespace and a Grammar

fNoNSGrammarback to summary
pack-priv SchemaGrammar fNoNSGrammar

Constructor Detail

XSGrammarBucketback to summary
public XSGrammarBucket()

Method Detail

getGrammarback to summary
public SchemaGrammar getGrammar(String namespace)

Get the schema grammar for the specified namespace

Returns:SchemaGrammar

SchemaGrammar associated with the namespace

getGrammarsback to summary
public SchemaGrammar[] getGrammars()

get all grammars in the registry

Returns:SchemaGrammar[]

an array of SchemaGrammars.

putGrammarback to summary
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:SchemaGrammar

the grammar to put in the registry

putGrammarback to summary
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:SchemaGrammar

the grammar to put in the registry

deep:boolean

whether to add imported grammars

Returns:boolean

whether the process succeeded

putGrammarback to summary
public boolean putGrammar(SchemaGrammar grammar, boolean deep, boolean ignoreConflict)

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:SchemaGrammar

the grammar to put in the registry

deep:boolean

whether to add imported grammars

ignoreConflict:boolean

whether to ignore grammars that already exist in the grammar bucket or not - including 'grammar' parameter.

Returns:boolean

whether the process succeeded

resetback to summary
public void reset()

Clear the registry.

Revisit

update to use another XSGrammarBucket