Top Description Fields Constructors Methods
com.sun.msv.grammar.xmlschema

public Class XMLSchemaGrammar

extends Object
implements Grammar
Class Inheritance
All Implemented Interfaces
com.sun.msv.grammar.Grammar, java.io.Serializable
Imports
java.util.Iterator, .Map, com.sun.msv.grammar.Expression, .ExpressionPool, .Grammar

set of XML Schema. This set can be used to validate a document.
Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
protected final ExpressionPool
pool

pool object which was used to construct this grammar.

protected final Map<String, Object>
schemata

map from namespace URI to loaded XMLSchemaSchema object.

private static final long
public Expression

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public XMLSchemaSchema

Returns:

null if no schema is associated with that namespace.
getByNamespace
(String targetNamesapce)

gets XMLSchemaSchema object that has the given target namespace.

public final ExpressionPool
getPool()

Implements com.sun.msv.grammar.Grammar.getPool.

gets ExpressionPool object which was used to construct this grammar.
public final Expression
getTopLevel()

Implements com.sun.msv.grammar.Grammar.getTopLevel.

gets top-level expression.
public Iterator<Object>
iterateSchemas()

returns an Iterator that enumerates XMLSchemaSchema objects that are defined in this grammar.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

poolback to summary
protected final ExpressionPool pool

pool object which was used to construct this grammar.

schemataback to summary
protected final Map<String, Object> schemata

map from namespace URI to loaded XMLSchemaSchema object.

serialVersionUIDback to summary
private static final long serialVersionUID
topLevelback to summary
public Expression topLevel

Constructor Detail

XMLSchemaGrammarback to summary
public XMLSchemaGrammar()
XMLSchemaGrammarback to summary
public XMLSchemaGrammar(ExpressionPool pool)

Method Detail

getByNamespaceback to summary
public XMLSchemaSchema getByNamespace(String targetNamesapce)

gets XMLSchemaSchema object that has the given target namespace.

Returns:XMLSchemaSchema

null if no schema is associated with that namespace.

getPoolback to summary
public final ExpressionPool getPool()

Implements com.sun.msv.grammar.Grammar.getPool.

Doc from com.sun.msv.grammar.Grammar.getPool.

gets ExpressionPool object which was used to construct this grammar. Never return null.

getTopLevelback to summary
public final Expression getTopLevel()

Implements com.sun.msv.grammar.Grammar.getTopLevel.

Doc from com.sun.msv.grammar.Grammar.getTopLevel.

gets top-level expression. This expression shall be the constraint over the document element. Never return null.

iterateSchemasback to summary
public Iterator<Object> iterateSchemas()

returns an Iterator that enumerates XMLSchemaSchema objects that are defined in this grammar.