notio
Interface Generator


public abstract interface Generator

The Generator interface. All generators should implement this interface to facilitate pluggability. While a generator must implement the entire interface, it can opt to throw an UnimplementedFeature exception if it does not support generating of a particular nonterminal. Minimally, a generator should support the Unit nonterminal.


Method Summary
 void Concept(Concept concept)
          Generates the specified concept.
 java.lang.Class getUnitClass()
          Returns a Class object that indicates what class the Unit generate method requires.
 void Graph(Graph graph)
          Generates the specified graph.
 void initializeGenerator(java.io.Writer writer, KnowledgeBase kBase, TranslationContext tContext)
          Initializes the generator to generate into the specified writer.
 void Relation(Relation relation)
          Generates the specified relation.
 void Unit(java.lang.Object unit)
          Generates the specified unit object.
 

Method Detail

initializeGenerator

public void initializeGenerator(java.io.Writer writer,
                                KnowledgeBase kBase,
                                TranslationContext tContext)
                         throws GeneratorException
Initializes the generator to generate into the specified writer.
Parameters:
writer - the writer to be generated into.
kBase - the knowledge base to be used while parsing.
tContext - the translation context to be used while parsing.
Throws:
GeneratorException - if an error occurs while initializing the generator.

getUnitClass

public java.lang.Class getUnitClass()
Returns a Class object that indicates what class the Unit generate method requires.
Returns:
a Class object that indicates what class the Unit generate method requires.
See Also:
Unit(java.lang.Object)

Unit

public void Unit(java.lang.Object unit)
          throws GeneratorException
Generates the specified unit object.
Parameters:
unit - the unit to be generated.
Throws:
GeneratorException - if an error occurs while generating.

Graph

public void Graph(Graph graph)
           throws GeneratorException
Generates the specified graph.
Parameters:
graph - the graph to be generated.
Throws:
GeneratorException - if an error occurs while generating.

Concept

public void Concept(Concept concept)
             throws GeneratorException
Generates the specified concept.
Parameters:
concept - the concept to be generated.
Throws:
GeneratorException - if an error occurs while generating.

Relation

public void Relation(Relation relation)
              throws GeneratorException
Generates the specified relation.
Parameters:
relation - the relation to be generated.
Throws:
GeneratorException - if an error occurs while generating.


Copyright 1998-1999 Finnegan Southey