SMACS

smacs.find
Class CreateTableFile

java.lang.Object
  extended bysmacs.find.CreateTableFile

public class CreateTableFile
extends Object

Parse TableDefs from Sql File.

We want to parse a number of sql input files - and handle them as packages of rules expressed as CREATE TABLE statements. We need classes as the head of the rule package. We incorporate a list of tablenames (and database names) to allow us to rename those on actual instantiation on the backend compiler. The following class represents a single input file (and its CreateTableStatements).

Author:
Copyright (C) 2004, Guido Draheim. All rights reserved. Part of SMACS project.

Nested Class Summary
static class CreateTableFile.Code
          SqlWriter adapter
static class CreateTableFile.Writer
          SqlWriter derivate
 
Field Summary
protected static Logger log
           
 
Constructor Summary
CreateTableFile(String filename)
           
 
Method Summary
 String getRuleScript()
           
 String getRuleScript(String packagename)
           
static void main(String[] args)
           
static String toRuleScript(SimpleNode tree, String classname)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Logger log
Constructor Detail

CreateTableFile

public CreateTableFile(String filename)
                throws ParseException
Method Detail

getRuleScript

public String getRuleScript()

getRuleScript

public String getRuleScript(String packagename)

toRuleScript

public static String toRuleScript(SimpleNode tree,
                                  String classname)

main

public static void main(String[] args)

SMACS