org.openexi.proc.grammars
Class GrammarCache

java.lang.Object
  extended by org.openexi.proc.grammars.GrammarCache
All Implemented Interfaces:
org.openexi.proc.common.IGrammarCache

public final class GrammarCache
extends java.lang.Object
implements org.openexi.proc.common.IGrammarCache

A GrammarCache object represents a set of EXI grammars used for processing EXI streams using specific grammar options. The GrammarCache is passed as an argument to the EXIReader and Transmogrifier prior to processing an EXI stream.


Field Summary
 short grammarOptions
          Short integer that encapsulates GrammarOptions for the EXI stream.
 
Constructor Summary
GrammarCache(EXISchema schema)
          Creates an instance of GrammarCache informed by a schema with default grammar options.
GrammarCache(EXISchema schema, short grammarOptions)
          Creates an instance of GrammarCache informed by a schema with the specified grammar options.
GrammarCache(short grammarOptions)
          Creates an instance of GrammarCache with the specified grammar options.
 
Method Summary
 EXISchema getEXISchema()
          Gets the compiled EXI Schema.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openexi.proc.common.IGrammarCache
getElementGrammarUse
 

Field Detail

grammarOptions

public final short grammarOptions
Short integer that encapsulates GrammarOptions for the EXI stream.

Constructor Detail

GrammarCache

public GrammarCache(EXISchema schema)
Creates an instance of GrammarCache informed by a schema with default grammar options.

Parameters:
EXISchema - compiled schema

GrammarCache

public GrammarCache(short grammarOptions)
Creates an instance of GrammarCache with the specified grammar options.

Parameters:
grammarOptions - integer value that represents a grammar option configuration

GrammarCache

public GrammarCache(EXISchema schema,
                    short grammarOptions)
Creates an instance of GrammarCache informed by a schema with the specified grammar options.

Parameters:
EXISchema - compiled schema
grammarOptions - integer value that represents a grammar option configuration
Method Detail

getEXISchema

public EXISchema getEXISchema()
Gets the compiled EXI Schema.

Specified by:
getEXISchema in interface org.openexi.proc.common.IGrammarCache
Returns:
an EXI schema.