Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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, java.io.Serializable

Direct Known Subclasses:
  RELAXNGGrammar

public class TREXGrammar
extends ReferenceExp
implements Grammar

TREX grammar, which is expressed as <grammar> element.

The `exp` field keeps the start pattern.

Author:
  Kohsuke KAWAGUCHI
See Also:
  Serialized Form

Nested Class Summary
`static class` | `TREXGrammar.RefContainer`

Field Summary
`DataTypeVocabularyMap` | `dataTypes` data type vocabularies used and defined by this grammar.
`TREXGrammar.RefContainer` | `namedPatterns` named patterns which are defined by using <define> element.
`ExpressionPool` | `pool` ExpressionPool that is associated with this grammar

Fields inherited from class com.sun.msv.grammar.ReferenceExp
`exp, name`

Fields inherited from class com.sun.msv.grammar.Expression
`anyString, epsilon, nullSet, verifierTag`

Constructor Summary
`TREXGrammar()`
`TREXGrammar(ExpressionPool pool)`
`TREXGrammar(ExpressionPool pool, TREXGrammar parentGrammar)`

Method Summary
`TREXGrammar` | `getParentGrammar()` gets a parent TREXGrammar.
`ExpressionPool` | `getPool()` gets ExpressionPool object which was used to construct this grammar.
`Expression` | `getTopLevel()` gets the start pattern.

Methods inherited from class com.sun.msv.grammar.ReferenceExp
`equals, isDefined, visit, visit, visit, visit`

Methods inherited from class com.sun.msv.grammar.Expression
`getExpandedExp, hashCode, isEpsilonReducible, peelOccurence, visit, visit, visit, visit`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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

### 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.

Constructor Detail

### 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()

Method Detail

### getTopLevel

    public Expression getTopLevel()

  gets the start pattern. The pattern defined under <start> element. This pattern will be used to verify document element.

  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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD