Package com.sun.msv.grammar.trex
Class TREXGrammar
java.lang.Object
com.sun.msv.grammar.Expression
com.sun.msv.grammar.ReferenceExp
com.sun.msv.grammar.trex.TREXGrammar
- All Implemented Interfaces:
Grammar,Serializable
- Direct Known Subclasses:
RELAXNGGrammar
TREX grammar, which is expressed as <grammar> element.
The exp field keeps the start pattern.
- Author:
- Kohsuke KAWAGUCHI
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal DataTypeVocabularyMapdata type vocabularies used and defined by this grammar.final TREXGrammar.RefContainernamed patterns which are defined by using <define> element.protected final TREXGrammarin case of nested grammar, this variable points to the parent grammar.final ExpressionPoolExpressionPool that is associated with this grammarFields inherited from class com.sun.msv.grammar.ReferenceExp
exp, nameFields inherited from class com.sun.msv.grammar.Expression
anyString, epsilon, nullSet, verifierTag -
Constructor Summary
ConstructorsConstructorDescriptionTREXGrammar(ExpressionPool pool) TREXGrammar(ExpressionPool pool, TREXGrammar parentGrammar) -
Method Summary
Modifier and TypeMethodDescriptionfinal TREXGrammargets a parent TREXGrammar.getPool()gets ExpressionPool object which was used to construct this grammar.gets the start pattern.Methods inherited from class com.sun.msv.grammar.ReferenceExp
calcEpsilonReducibility, calcHashCode, equals, isDefined, visit, visit, visit, visitMethods inherited from class com.sun.msv.grammar.Expression
getExpandedExp, hashCode, hashCode, hashCode, isEpsilonReducible, peelOccurence, readResolve, visit, visit, visit, visit
-
Field Details
-
namedPatterns
named patterns which are defined by using <define> element. this is a map from pattern name to RefPattern object -
pool
ExpressionPool that is associated with this grammar -
parentGrammar
in case of nested grammar, this variable points to the parent grammar. Otherwise null. -
dataTypes
data type vocabularies used and defined by this grammar.
-
-
Constructor Details
-
TREXGrammar
- Parameters:
parentGrammar- this object is used to resolve <ref> element with parent attribute.
-
TREXGrammar
-
TREXGrammar
public TREXGrammar()
-
-
Method Details
-
getTopLevel
gets the start pattern. The pattern defined under <start> element. This pattern will be used to verify document element.- Specified by:
getTopLevelin interfaceGrammar
-
getPool
Description copied from interface:Grammargets ExpressionPool object which was used to construct this grammar. Never return null. -
getParentGrammar
gets a parent TREXGrammar. In case of nested grammar, the parent grammar will be returned. Otherwise, it returns null.
-