com.sun.msv.grammar.trex
Class TREXGrammar
java.lang.Object
|
+--com.sun.msv.grammar.trex.TREXGrammar
- All Implemented Interfaces:
- Grammar, Serializable
- public class TREXGrammar
- extends Object
- implements Grammar
TREX grammar, which is expressed as <grammar> element.
- Author:
- Kohsuke KAWAGUCHI
- See Also:
- Serialized Form
namedPatterns
public final TREXGrammar.RefContainer namedPatterns
- named patterns which are defined by using <define> element.
this is a map from pattern name to RefPattern object
start
public Expression start
- Start pattern.
The pattern defined under <start> element.
This pattern will be used to verify document element.
pool
public final ExpressionPool pool
- ExpressionPool that is associated with this grammar
dataTypes
public final DataTypeVocabularyMap dataTypes
- data type vocabularies used and defined by this grammar.
TREXGrammar
public TREXGrammar(ExpressionPool pool,
TREXGrammar parentGrammar)
- Parameters:
parentGrammar
- this object is used to resolve <ref> element with parent
attribute.
TREXGrammar
public TREXGrammar(ExpressionPool pool)
TREXGrammar
public TREXGrammar()
getTopLevel
public Expression getTopLevel()
- Description copied from interface:
Grammar
- gets top-level expression.
This expression shall be the constraint over the document element.
Never return null.
- Specified by:
getTopLevel
in interface Grammar
getPool
public ExpressionPool getPool()
- Description copied from interface:
Grammar
- gets ExpressionPool object which was used to construct this grammar.
Never return null.
- Specified by:
getPool
in interface Grammar
getParentGrammar
public final TREXGrammar getParentGrammar()
- gets a parent TREXGrammar.
In case of nested grammar, the parent grammar will be returned.
Otherwise, it returns null.