DBVIEW
|
Public Member Functions | |
Database (String in_name) | |
String | getName () |
Table | getTable (String in_name) |
ArrayList< Table > | getTables () |
void | generateRelations () throws Exception |
ArrayList< Table > | getReferenceTables (Table in_dependent_table) throws Exception |
ArrayList< Table > | getReferenceTables (String in_dependent_table_name) throws Exception |
ArrayList< Table > | getDependentTables (Table in_reference_table) throws Exception |
ArrayList< Table > | getDependentTables (String in_reference_table_name) throws Exception |
ArrayList< FieldToFieldJoin > | getRelationsFromReferenceToTarget (Table in_dependent_table, Table in_reference_table) throws Exception |
int | getTableToTableRelationType (Table in_dependent_table, Table in_reference_table) throws Exception |
ArrayList< FieldToFieldJoin > | getRelationsFromReferenceToTarget (String in_dependent_table_name, String in_reference_table_name) throws Exception |
ArrayList< Table > | getNeighborhood (Table in_table) throws Exception |
ArrayList< Table > | getNeighborhood (String in_table_name) throws Exception |
ArrayList< Table > | zoomAroundByTables (ArrayList< Table > in_tables, Integer in_level) throws Exception |
ArrayList< Table > | zoomAroundByNames (ArrayList< String > in_table_names, Integer in_level) throws Exception |
UndirectedGraph< Table, JgraphtTableToTableEdge > | jgrapht (ArrayList< Table > in_tables) throws Exception |
String | toString () |
String | getNonTableTag () throws Exception |
Static Public Attributes | |
static final int | MIN_0 = 0 |
static final int | MIN_1 = 1 |
static final int | MAX_1 = 1 |
static final int | MAX_N = -1 |
static final int | UNDEFINED_LINK = -1 |
static final int | SOFT_LINK = 0 |
static final int | SOFT_AND_HARD_LINK = 1 |
static final int | HARD_LINK = 2 |
Package Functions | |
void | addTable (Table in_table) throws org.dbview.db.structure.DatabaseException |
Private Member Functions | |
Hashtable< Table, TableToTableRelation > | __getRelationsFromTable (Table in_dependent_table) throws Exception |
void | __updateMetaRelationType (TableToTableRelation in_meta, int new_relation_type) |
Hashtable< Table, ArrayList < FieldToFieldJoin > > | __getRelationsToTable (Table in_reference_table) throws Exception |
Private Attributes | |
Hashtable< String, Table > | __tables = new Hashtable<String, Table>() |
Hashtable< Table, Hashtable < Table, TableToTableRelation > > | __relations = null |
String | __name = null |
Static Private Attributes | |
static Integer | __n = 0 |
This class represents a database.
Definition at line 42 of file Database.java.
org.dbview.db.structure.Database.Database | ( | String | in_name | ) |
Create a database.
in_name | Name of the database. |
Definition at line 132 of file Database.java.
Hashtable<Table, TableToTableRelation> org.dbview.db.structure.Database.__getRelationsFromTable | ( | Table | in_dependent_table | ) | throws Exception [private] |
This method returns the relations from a given "dependent" table (to a list of "reference" table(s)).
in_dependent_table | Table for which you want to get the list of relations. |
Exception |
Definition at line 452 of file Database.java.
Referenced by org.dbview.db.structure.Database.generateRelations().
Hashtable<Table, ArrayList<FieldToFieldJoin> > org.dbview.db.structure.Database.__getRelationsToTable | ( | Table | in_reference_table | ) | throws Exception [private] |
This method returns the list of joins (between fields) to a given "reference" table.
in_reference_table | Table for which you want to get the list of joins to. |
Definition at line 503 of file Database.java.
Referenced by org.dbview.db.structure.Database.getDependentTables().
void org.dbview.db.structure.Database.__updateMetaRelationType | ( | TableToTableRelation | in_meta, |
int | new_relation_type | ||
) | [private] |
This method is used by the method "__getRelationsFromTable()" only.
in_meta | "Table to table" relation to update. |
new_relation_type | Type of the new "field to field" relation found in the "table to table" relation. |
Definition at line 486 of file Database.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable().
void org.dbview.db.structure.Database.addTable | ( | Table | in_table | ) | throws org.dbview.db.structure.DatabaseException [package] |
Add a table to the database.
in_table | Table to add. |
org.dbview.db.structure.DatabaseException |
Definition at line 175 of file Database.java.
Referenced by org.dbview.db.structure.Table.Table().
void org.dbview.db.structure.Database.generateRelations | ( | ) | throws Exception |
This method generates the list of all relations for the current database.
Exception |
Definition at line 187 of file Database.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable(), org.dbview.db.structure.Database.__getRelationsToTable(), org.dbview.db.structure.Database.getDependentTables(), org.dbview.db.structure.Database.getReferenceTables(), and org.dbview.db.structure.Database.getRelationsFromReferenceToTarget().
ArrayList<Table> org.dbview.db.structure.Database.getDependentTables | ( | Table | in_reference_table | ) | throws Exception |
This method returns the list of "dependent" tables in contact with a given "reference" table.
in_reference_table | The "reference" table. |
Definition at line 230 of file Database.java.
Referenced by org.dbview.db.structure.Database.getDependentTables(), and org.dbview.db.structure.Database.getNeighborhood().
ArrayList<Table> org.dbview.db.structure.Database.getDependentTables | ( | String | in_reference_table_name | ) | throws Exception |
This method returns the list of "dependent" tables in contact with a given "reference" table, identified by its name.
in_reference_table_name | The "reference" table_name. |
Definition at line 245 of file Database.java.
String org.dbview.db.structure.Database.getName | ( | ) |
Return the name of the database.
Definition at line 141 of file Database.java.
Referenced by org.dbview.db.structure.Table.getDatabaseName().
ArrayList<Table> org.dbview.db.structure.Database.getNeighborhood | ( | Table | in_table | ) | throws Exception |
This method returns the neighborhood of a given table.
in_table | The table. |
Definition at line 318 of file Database.java.
Referenced by org.dbview.db.structure.Database.getNeighborhood(), and org.dbview.db.structure.Database.zoomAroundByTables().
ArrayList<Table> org.dbview.db.structure.Database.getNeighborhood | ( | String | in_table_name | ) | throws Exception |
This method returns the neighborhood of a given table, identified by its name.
in_table_name | The name of the table. |
Definition at line 340 of file Database.java.
String org.dbview.db.structure.Database.getNonTableTag | ( | ) | throws Exception |
This method returns an identifier that does not represent a table's name. Each call to this method returns a unique identifier.
Exception |
Definition at line 576 of file Database.java.
ArrayList<Table> org.dbview.db.structure.Database.getReferenceTables | ( | Table | in_dependent_table | ) | throws Exception |
This method returns the list of "reference" tables in contact with a given "dependent" table.
in_dependent_table | The "dependent" table. |
Definition at line 200 of file Database.java.
Referenced by org.dbview.databaseExporters.dot.DotLight.export(), org.dbview.databaseExporters.dot.DotMedium.export(), org.dbview.databaseExporters.dot.DotFull.export(), org.dbview.db.structure.Database.getNeighborhood(), org.dbview.db.structure.Database.getReferenceTables(), and org.dbview.db.structure.Database.jgrapht().
ArrayList<Table> org.dbview.db.structure.Database.getReferenceTables | ( | String | in_dependent_table_name | ) | throws Exception |
This method returns the list of "reference" tables in contact with a given "dependent" table, identified by its name.
in_dependent_table_name | Name of the "dependent" table. |
Definition at line 219 of file Database.java.
ArrayList<FieldToFieldJoin> org.dbview.db.structure.Database.getRelationsFromReferenceToTarget | ( | Table | in_dependent_table, |
Table | in_reference_table | ||
) | throws Exception |
This method returns the list of relations from a given "dependent" table to a given "reference" table.
in_dependent_table | The "dependent" table. |
in_reference_table | The "reference" table. |
Definition at line 258 of file Database.java.
Referenced by org.dbview.db.structure.Database.__getRelationsToTable(), org.dbview.databaseExporters.dot.DotFull.export(), and org.dbview.db.structure.Database.getRelationsFromReferenceToTarget().
ArrayList<FieldToFieldJoin> org.dbview.db.structure.Database.getRelationsFromReferenceToTarget | ( | String | in_dependent_table_name, |
String | in_reference_table_name | ||
) | throws Exception |
This method returns the list of relations from a given "dependent" table (identified by its name) to a given "reference" table (identified by its name).
in_dependent_table_name | Name of the dependent table. |
in_reference_table_name | Name of the reference table. |
Definition at line 306 of file Database.java.
Table org.dbview.db.structure.Database.getTable | ( | String | in_name | ) |
Return a table.
in_name | Nane of the table to return. |
Definition at line 152 of file Database.java.
Referenced by org.dbview.db.structure.Database.getDependentTables(), org.dbview.db.structure.Database.getNeighborhood(), org.dbview.db.structure.Database.getNonTableTag(), org.dbview.db.structure.Database.getReferenceTables(), org.dbview.db.structure.Database.getRelationsFromReferenceToTarget(), and org.dbview.db.structure.Database.zoomAroundByNames().
ArrayList<Table> org.dbview.db.structure.Database.getTables | ( | ) |
Return the list of all tables in the database.
Definition at line 163 of file Database.java.
Referenced by org.dbview.db.structure.Database.__getRelationsToTable(), org.dbview.databaseExporters.dot.AbstractDatabaseExporter.AbstractDatabaseExporter(), org.dbview.db.structure.Database.generateRelations(), and org.dbview.db.structure.Database.jgrapht().
int org.dbview.db.structure.Database.getTableToTableRelationType | ( | Table | in_dependent_table, |
Table | in_reference_table | ||
) | throws Exception |
This method returns the type of relation between to given tables.
in_dependent_table | The "dependent" table. |
in_reference_table | The "reference" table. |
Definition at line 286 of file Database.java.
Referenced by org.dbview.databaseExporters.dot.DotLight.export(), org.dbview.databaseExporters.dot.DotMedium.export(), and org.dbview.databaseExporters.dot.DotFull.export().
UndirectedGraph<Table, JgraphtTableToTableEdge> org.dbview.db.structure.Database.jgrapht | ( | ArrayList< Table > | in_tables | ) | throws Exception |
This method returns the JGRAPHT representation of a given set of tables.
in_tables | Set of tables. If the parameter's value is null, then the model is built using all the database's tables. |
Exception |
Definition at line 527 of file Database.java.
String org.dbview.db.structure.Database.toString | ( | ) |
This method produces a textual representation of the database.
Definition at line 555 of file Database.java.
ArrayList<Table> org.dbview.db.structure.Database.zoomAroundByNames | ( | ArrayList< String > | in_table_names, |
Integer | in_level | ||
) | throws Exception |
This method returns the neighborhood of a given list of tables, identified by their names. The size of the neighbourhood area is defined by an integer (the zoom level).
in_table_names | The list of tables' name. |
in_level | Zoom level (starts at 0). |
Exception |
Definition at line 427 of file Database.java.
ArrayList<Table> org.dbview.db.structure.Database.zoomAroundByTables | ( | ArrayList< Table > | in_tables, |
Integer | in_level | ||
) | throws Exception |
This method returns the neighborhood of a given list of tables. The size of the neighbourhood area is defined by an integer (the zoom level).
in_tables | The list of tables. |
in_level | Zoom level (starts at 0). |
Exception |
Definition at line 355 of file Database.java.
Referenced by org.dbview.db.structure.Database.zoomAroundByNames().
Integer org.dbview.db.structure.Database.__n = 0 [static, private] |
This value is used by the method that generates unique names that don't represent tables.
Definition at line 47 of file Database.java.
Referenced by org.dbview.db.structure.Database.getNonTableTag().
String org.dbview.db.structure.Database.__name = null [private] |
Name of the database.
Definition at line 126 of file Database.java.
Referenced by org.dbview.db.structure.Database.Database(), org.dbview.db.structure.Database.getName(), and org.dbview.db.structure.Database.toString().
Hashtable<Table, Hashtable<Table, TableToTableRelation> > org.dbview.db.structure.Database.__relations = null [private] |
This hash contains all relations between tables.
Definition at line 121 of file Database.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable(), org.dbview.db.structure.Database.__getRelationsToTable(), org.dbview.db.structure.Database.generateRelations(), org.dbview.db.structure.Database.getDependentTables(), org.dbview.db.structure.Database.getReferenceTables(), org.dbview.db.structure.Database.getRelationsFromReferenceToTarget(), and org.dbview.db.structure.Database.getTableToTableRelationType().
Hashtable<String, Table> org.dbview.db.structure.Database.__tables = new Hashtable<String, Table>() [private] |
This hash table lists all database's tables.
Definition at line 106 of file Database.java.
Referenced by org.dbview.db.structure.Database.addTable(), org.dbview.db.structure.Database.getTable(), org.dbview.db.structure.Database.getTables(), org.dbview.db.structure.Database.toString(), and org.dbview.db.structure.Database.zoomAroundByTables().
final int org.dbview.db.structure.Database.HARD_LINK = 2 [static] |
This constant represents a "hard relation".
Definition at line 97 of file Database.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable(), org.dbview.databaseExporters.dot.AbstractDatabaseExporter._relationColor(), and org.dbview.db.structure.FieldToFieldJoin.type().
final int org.dbview.db.structure.Database.MAX_1 = 1 [static] |
This constant represents a maximum cardinality of 1 (for join).
Definition at line 62 of file Database.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable(), and org.dbview.db.structure.FieldToFieldJoin.__getSymbol().
final int org.dbview.db.structure.Database.MAX_N = -1 [static] |
This constant represents a maximum cardinality of N (for join).
Definition at line 67 of file Database.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable(), and org.dbview.db.structure.FieldToFieldJoin.__getSymbol().
final int org.dbview.db.structure.Database.MIN_0 = 0 [static] |
This constant represents a minimum cardinality of 0 (for join).
Definition at line 52 of file Database.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable(), org.dbview.db.structure.FieldToFieldJoin.__getSymbol(), and org.dbview.db.structure.FieldToFieldJoin.cardinality_from_reference_to_dependent().
final int org.dbview.db.structure.Database.MIN_1 = 1 [static] |
This constant represents a minimum cardinality of 1 (for join).
Definition at line 57 of file Database.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable(), and org.dbview.db.structure.FieldToFieldJoin.__getSymbol().
final int org.dbview.db.structure.Database.SOFT_AND_HARD_LINK = 1 [static] |
This constant represents a "mixed relation". This type of relation is a mix between soft and hard joins.
Definition at line 90 of file Database.java.
Referenced by org.dbview.db.structure.Database.__updateMetaRelationType(), and org.dbview.databaseExporters.dot.AbstractDatabaseExporter._relationColor().
final int org.dbview.db.structure.Database.SOFT_LINK = 0 [static] |
This constant represents a "soft relation".
Definition at line 81 of file Database.java.
Referenced by org.dbview.db.structure.Database.__getRelationsFromTable(), org.dbview.databaseExporters.dot.AbstractDatabaseExporter._relationColor(), and org.dbview.db.structure.FieldToFieldJoin.type().
final int org.dbview.db.structure.Database.UNDEFINED_LINK = -1 [static] |
This constant represents an unknown type of relation.
Definition at line 74 of file Database.java.
Referenced by org.dbview.db.structure.Database.__updateMetaRelationType(), org.dbview.db.structure.Database.getTableToTableRelationType(), and org.dbview.db.structure.FieldToFieldJoin.type().