|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cgp.translators.SimpleGenerator
An abstract base class for generators.
Field Summary | |
(package private) notio.ConceptTypeHierarchy |
conceptHierarchy
The concept type hierarchy from the knowledge base. |
private static java.lang.String |
DEFINING_LABEL_TABLE_NAME
Name of DefiningLabelTable unit in context. |
(package private) notio.KnowledgeBase |
knowledgeBase
A knowledge base. |
(package private) notio.MarkerSet |
markerSet
The marker set from the knowledge base. |
(package private) notio.RelationTypeHierarchy |
relationHierarchy
The relation type hierarchy from the knowledge base. |
(package private) notio.TranslationContext |
translationContext
A translation context. |
(package private) java.io.Writer |
writer
The writer to which the writer will write. |
Constructor Summary | |
(package private) |
SimpleGenerator()
|
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. |
(package private) void |
generate(java.lang.String txt)
Appends the specified string to the StringBuffer or OutputStream with which the generator was initialized. |
void |
generateUnit(java.lang.Object unit)
Generates a graph to the output stream. |
(package private) notio.translators.DefiningLabelTable |
getDefiningLabelTable(notio.TranslationContext translationContext)
Returns the DefiningLabelTable currently in used by this parser. |
java.lang.Class |
getUnitClass()
Returns a Class object that indicates what class the Unit parse method will return. |
private void |
initializeGenerator(notio.KnowledgeBase newKnowledgeBase,
notio.TranslationContext newTranslationContext)
Private initialization common to the public initializers. |
void |
initializeGenerator(java.io.Writer newWriter,
notio.KnowledgeBase newKnowledgeBase,
notio.TranslationContext newTranslationContext)
Initializes the generator to write to the specified writer using the specified TranslationContext and KnowledgeBase. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final java.lang.String DEFINING_LABEL_TABLE_NAME
java.io.Writer writer
notio.KnowledgeBase knowledgeBase
notio.TranslationContext translationContext
notio.MarkerSet markerSet
notio.ConceptTypeHierarchy conceptHierarchy
notio.RelationTypeHierarchy relationHierarchy
Constructor Detail |
SimpleGenerator()
Method Detail |
public void initializeGenerator(java.io.Writer newWriter, notio.KnowledgeBase newKnowledgeBase, notio.TranslationContext newTranslationContext) throws notio.GeneratorException
newWriter
- the writer to be generated to.newKnowledgeBase
- the knowledge base to be used while generating.newTranslationContext
- the translationContext to be used while
generating.private void initializeGenerator(notio.KnowledgeBase newKnowledgeBase, notio.TranslationContext newTranslationContext) throws notio.GeneratorException
newKnowledgeBase
- the knowledge base to be used while generating.newTranslationContext
- the translationContext to be used while
generating.final notio.translators.DefiningLabelTable getDefiningLabelTable(notio.TranslationContext translationContext)
translationContext
- the translation context from which to get the table.void generate(java.lang.String txt) throws notio.GeneratorException
txt
- the string to be written.public java.lang.Class getUnitClass()
Generator.generateUnit(java.lang.Object)
public void generateUnit(java.lang.Object unit) throws notio.GeneratorException
unit
- the unit object to be generated.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 |