|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.kernelpanic.dbmonster.schema.SchemaUtil
public final class SchemaUtil
Utility to manipulate schema.
| Field Summary | |
|---|---|
static String |
COLUMN
Column key. |
static String |
CRLF
System dependent line separator. |
static String |
DATA_GENERATOR
Data generator key. |
static String |
DTD
DTD identifier. |
static String |
DTD_URL
DTD url. |
static String |
KEY
Primary key key. |
static String |
KEY_GENERATOR
Key generator key. |
static String |
PROJECT
Project key. |
static String |
SCHEMA_WRAPPER
Schema key. |
static String |
TABLE
Table key. |
| Method Summary | |
|---|---|
static List |
getProperties(Object object)
Returns object's properties. |
static boolean |
isHidden(Object object,
String name)
Checks if property is public and not excluded. |
static Schema |
loadSchema(InputStream is,
Log log)
Loads a schema from an input stream. |
static Schema |
loadSchema(InputStream is,
Log log,
ClassLoader classloader)
|
static Schema |
loadSchema(String fileName,
Log log)
Loads a schema from a file. |
static Schema |
loadSchema(String fileName,
Log log,
ClassLoader classloader)
|
static Schema |
loadSchema(URL url,
Log log)
Loads a schema from an url. |
static void |
serializeColumn(Writer writer,
Column column)
Dumps a column to XML. |
static void |
serializeGenerator(Writer writer,
Object generator)
Dumps a generator to XML. |
static void |
serializeKey(Writer writer,
Key key)
Dumps a key to XML representation. |
static void |
serializeSchema(Writer writer,
Schema schema)
Dumps the schema to XML file. |
static void |
serializeTable(Writer writer,
Table table)
Dumps a table to XML representation. |
static List |
validateColumn(Column column)
Validates the column. |
static List |
validateKey(Key key)
Validates key. |
static List |
validateSchema(Schema schema)
Validate schema. |
static List |
validateTable(Table table)
Validates table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DTD
public static final String DTD_URL
public static final String PROJECT
public static final String SCHEMA_WRAPPER
public static final String TABLE
public static final String COLUMN
public static final String KEY
public static final String KEY_GENERATOR
public static final String DATA_GENERATOR
public static final String CRLF
| Method Detail |
|---|
public static Schema loadSchema(String fileName,
Log log)
throws Exception
fileName - the name of the file which contains schema definition.log - logger
Exception - if schema cannot be loaded.
public static Schema loadSchema(String fileName,
Log log,
ClassLoader classloader)
throws Exception
Exception
public static Schema loadSchema(URL url,
Log log)
throws Exception
url - urllog - logger
Exception - on errors
public static Schema loadSchema(InputStream is,
Log log)
throws Exception
is - input streamlog - logger
Exception - if schema cannot be loaded.
public static Schema loadSchema(InputStream is,
Log log,
ClassLoader classloader)
throws Exception
Exceptionpublic static List validateSchema(Schema schema)
schema - schema to validate
null if schema is okpublic static List validateTable(Table table)
table - table to validate
public static List validateKey(Key key)
key - key to validate
null is key is okpublic static List validateColumn(Column column)
column - column to validate
null if column is okpublic static List getProperties(Object object)
object - an schema element
public static boolean isHidden(Object object,
String name)
object - an object to checkname - property name
true if property is hidden
public static void serializeSchema(Writer writer,
Schema schema)
throws Exception
writer - writer we are appending toschema - schema to dump
Exception - on errors
public static void serializeTable(Writer writer,
Table table)
throws Exception
writer - writer we are appengind totable - table to serialize
Exception - on errors
public static void serializeKey(Writer writer,
Key key)
throws Exception
writer - writer we are appending tokey - key to dump
Exception - on errors
public static void serializeColumn(Writer writer,
Column column)
throws Exception
writer - writer we are appending tocolumn - column to dump
Exception - on errors
public static void serializeGenerator(Writer writer,
Object generator)
throws Exception
writer - writter we are appending togenerator - generator
Exception - on errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||