|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.ic.doc.automed.matching.RelationshipExtractor
uk.ac.ic.doc.automed.matching.SQLRelationshipExtractor
public class SQLRelationshipExtractor
The class for the extraction of relationships between SQL schema elements. Mainly, the relationship between tables can be defined based on the relationship of their primary key columns.
| Field Summary | |
|---|---|
protected java.util.ArrayList[] |
columns
|
protected java.util.ArrayList[] |
pks
|
protected java.util.ArrayList[] |
tables
|
| Constructor Summary | |
|---|---|
SQLRelationshipExtractor()
|
|
| Method Summary | |
|---|---|
protected SchemaObject[] |
getColumns(SchemaObject table,
java.util.ArrayList columns)
Returns an array of schema objects that are the columns of the specified table. |
protected SchemaObject |
getPK(SchemaObject table,
java.util.ArrayList pks)
Returns a schema object that is the primary key of the specified table. |
protected SchemaObject[] |
getPKColumns(SchemaObject table,
java.util.ArrayList pks)
Returns an array of schema objects that are the columns constituting the primary key of the specified table. |
SchemaElementPairRelationship[] |
getRelationships()
Returns the semantic relationships for the schema objects in the schemas |
void |
setSchemas(Schema[] schemas)
Sets the schemas that are being matched. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ArrayList[] tables
protected java.util.ArrayList[] pks
protected java.util.ArrayList[] columns
| Constructor Detail |
|---|
public SQLRelationshipExtractor()
| Method Detail |
|---|
public void setSchemas(Schema[] schemas)
setSchemas in class RelationshipExtractorschemas - the array of the schemas to be matched.
public SchemaElementPairRelationship[] getRelationships()
throws RelationshipExtractorException
getRelationships in class RelationshipExtractorRelationshipExtractorException - if specific contructs cannot be found
protected SchemaObject[] getPKColumns(SchemaObject table,
java.util.ArrayList pks)
throws RelationshipExtractorException
table - the table whose primary key columns are returnedpks - the SchemaObject list of all the primary key columns
RelationshipExtractorException - if the primary key of the table cannot be found
protected SchemaObject getPK(SchemaObject table,
java.util.ArrayList pks)
table - the table whose primary key is returnedpks - the SchemaObject list of all the primary key columns
protected SchemaObject[] getColumns(SchemaObject table,
java.util.ArrayList columns)
table - the table whose columns are returnedcolumns - the SchemaObject list of all the columns
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||