org.utgenome.gwt.utgb.client.db
Class DatabaseCatalog

java.lang.Object
  extended by org.utgenome.gwt.utgb.client.db.DatabaseCatalog

public class DatabaseCatalog
extends Object

read a JSON description of database catalog, a list of database relations. JSON format example (json object consisting of pairs of table_name:relation) { "table_1":{"relation":[["id", "integer"], ["name", "string"], ...]}, "table_2":{"relation":[["p_id", "integer"], ["phone", "string"], ...]} }

Author:
leo

Constructor Summary
DatabaseCatalog()
           
DatabaseCatalog(String jsonData)
           
 
Method Summary
 Relation getRelation(String tableName)
           
 ArrayList<Relation> getRelationList()
           
 ArrayList<String> getTableNameList()
           
 void load(String jsonData)
          parsing the given JSONData representing database schema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseCatalog

public DatabaseCatalog(String jsonData)
                throws UTGBClientException
Throws:
UTGBClientException

DatabaseCatalog

public DatabaseCatalog()
Method Detail

load

public void load(String jsonData)
          throws UTGBClientException
parsing the given JSONData representing database schema

Parameters:
jsonData -
Throws:
UTGBClientException

getTableNameList

public ArrayList<String> getTableNameList()

getRelationList

public ArrayList<Relation> getRelationList()

getRelation

public Relation getRelation(String tableName)


Copyright © 2007-2012 utgenome.org. All Rights Reserved.