|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--notio.translators.SimpleGenerator | +--notio.translators.CGIFGenerator
A CGIF Generator class.
Constructor Summary | |
CGIFGenerator()
|
Method Summary | |
static java.lang.String |
escapeCharactersInString(java.lang.String in,
java.lang.String chars,
char escapeSequence)
Adds escape sequences for specified characters whenever they occur within the specified string. |
void |
generateActor(Actor actor)
Generates an actor to the output stream. |
void |
generateCGStream(java.util.Vector graphs)
Generates a vector of graphs to the output stream. |
void |
generateConcept(Concept concept)
Generates a concept to the output stream. |
void |
generateGraph(Graph graph)
Generates a graph to the output stream. |
void |
generateOutermostContext(Graph graph)
Generates a graph to the output stream. |
void |
generateRelation(Relation relation)
Generates a relation to the output stream. |
void |
generateUnit(java.lang.Object unit)
Generates a graph to the output stream. |
boolean |
getAllowIncompleteRelations()
Returns a flag indicating whether incomplete relations are allowed whilst generating. |
boolean |
getEmbedSingleRelatorConcepts()
Returns a flag indicating whether this generator will embed single relator concepts within the single relation. |
boolean |
getIndentNestedGraphs()
Returns a flag indicating whether this generator should generate indentation for nested graphs. |
boolean |
getInitiateGraphsWithNewline()
Returns a flag indicating whether this generator should generate a newline at the beginning of every graph. |
boolean |
getSupressGraphComments()
Returns a flag indicating whether this generator will supress comments in graphs. |
boolean |
getSupressNodeComments()
Returns a flag indicating whether this generator will supress comments in nodes (Concepts, Relations, and Actors). |
boolean |
getTerminateGraphsWithNewline()
Returns a flag indicating whether this generator should generate a newline at the end of every graph. |
java.lang.Class |
getUnitClass()
Returns a Class object that indicates what class the Unit parse method will return. |
void |
initializeGenerator(java.io.Writer newWriter,
KnowledgeBase newKnowledgeBase,
TranslationContext newTranslationContext)
Initializes the generator to write to the specified writer using the specified TranslationContext and KnowledgeBase. |
void |
setAllowIncompleteRelations(boolean flag)
Sets a flag indicating whether incomplete relations are allowed whilst generating. |
void |
setEmbedSingleRelatorConcepts(boolean flag)
Sets a flag indicating whether this generator should generate concepts that are not coreferent to other concepts and only related to a single relation into the relation itself. |
void |
setIndentNestedGraphs(boolean flag)
Sets a flag indicating whether this generator should generate indentation before each graph, increasing the indentation for every level of nesting. |
void |
setInitiateGraphsWithNewline(boolean flag)
Sets a flag indicating whether this generator should generate a newline at the beginning of every graph. |
void |
setSupressGraphComments(boolean flag)
Sets a flag indicating whether this generator should supress comments in graphs. |
void |
setSupressNodeComments(boolean flag)
Sets a flag indicating whether this generator should supress comments in nodes (Concepts, Relations, and Actors). |
void |
setTerminateGraphsWithNewline(boolean flag)
Sets a flag indicating whether this generator should generate a newline at the end of every graph. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface notio.Generator |
generateUnit, getUnitClass |
Constructor Detail |
public CGIFGenerator()
Method Detail |
public void initializeGenerator(java.io.Writer newWriter, KnowledgeBase newKnowledgeBase, TranslationContext newTranslationContext) throws GeneratorException
initializeGenerator
in interface Generator
initializeGenerator
in class notio.translators.SimpleGenerator
newWriter
- the writer to be generated to.newKnowledgeBase
- the knowledge base to be used while generating.newTranslationContext
- the translationContext to be used while
generating.public void setAllowIncompleteRelations(boolean flag)
flag
- the new value for the flag.Relation.isComplete()
public boolean getAllowIncompleteRelations()
Relation.isComplete()
public void setSupressNodeComments(boolean flag)
flag
- the new value for the flag.public boolean getSupressNodeComments()
public void setSupressGraphComments(boolean flag)
flag
- the new value for the flag.public boolean getSupressGraphComments()
public void setInitiateGraphsWithNewline(boolean flag)
flag
- the new value for the flag.public boolean getInitiateGraphsWithNewline()
public void setTerminateGraphsWithNewline(boolean flag)
flag
- the new value for the flag.public boolean getTerminateGraphsWithNewline()
public void setIndentNestedGraphs(boolean flag)
flag
- the new value for the flag.public boolean getIndentNestedGraphs()
public void setEmbedSingleRelatorConcepts(boolean flag)
flag
- the new value for the flag.public boolean getEmbedSingleRelatorConcepts()
public void generateCGStream(java.util.Vector graphs) throws GeneratorException
generateCGStream
in interface Generator
graphs
- the vector of graphs to be generated.GeneratorException
- if an error occurs while generating.public void generateOutermostContext(Graph graph) throws GeneratorException
generateOutermostContext
in interface Generator
graph
- the graph to be generated.GeneratorException
- if an error occurs while generating.public void generateGraph(Graph graph) throws GeneratorException
generateGraph
in interface Generator
graph
- the graph to be generated.GeneratorException
- if an error occurs while generating.public void generateConcept(Concept concept) throws GeneratorException
generateConcept
in interface Generator
concept
- the concept to be generated.GeneratorException
- if an error occurs while generating.public void generateRelation(Relation relation) throws GeneratorException
generateRelation
in interface Generator
relation
- the relation to be generated.GeneratorException
- if an error occurs while generating.public void generateActor(Actor actor) throws GeneratorException
generateActor
in interface Generator
relation
- the relation to be generated.GeneratorException
- if an error occurs while generating.public java.lang.Class getUnitClass()
getUnitClass
in interface Generator
Generator.generateUnit(java.lang.Object)
public void generateUnit(java.lang.Object unit) throws GeneratorException
generateUnit
in interface Generator
unit
- the unit object to be generated.GeneratorException
- if an error occurs while generating.public static java.lang.String escapeCharactersInString(java.lang.String in, java.lang.String chars, char escapeSequence)
in
- the string to be modified.chars
- a string containing all characters that need to be
escaped.escapeSequence
- the character that should prefix characters that
need escaping (e.g. backslash).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |