easik.sketch.util.Export.Constraints
Class ExportCommutativeDiagram

java.lang.Object
  extended by easik.sketch.util.Export.Constraints.ExportConstraint
      extended by easik.sketch.util.Export.Constraints.ExportCommutativeDiagram

public class ExportCommutativeDiagram
extends ExportConstraint

A class to create a commutative diagram object, including all necessary information gleaned from the XML file. Should not be used for any other purpose than database exportation, as it contains no graphical information.

Since:
2006-05-22 Vera Ranieri
Version:
2006-08-28 Kevin Green
Author:
Vera Ranieri 2006, Kevin Green 2006

Field Summary
private static java.lang.String COMM_PROC_NAME
          The name of all procedures created because of a commutative diagram
private  java.lang.String targetTable
          The codomain of the commutative diagram
 
Fields inherited from class easik.sketch.util.Export.Constraints.ExportConstraint
_a_i_tables, _b_d_tables, _b_i_tables, _baseTable, _db_name, _id, _paths, _procedureStrings
 
Constructor Summary
ExportCommutativeDiagram(int id)
          Constructor which calls the superclass constructor.
 
Method Summary
private  java.lang.String getAllConditionsString(ExportPath p)
          Determines all conditions needing to hold along the commutative diagram path.
private  java.lang.String getAllTablesString(ExportPath p)
          Determines all tables involved in the path that must be referenced by conditions in the WHERE clause.
private  java.lang.String getSelection(ExportPath p)
          Determines the last entity before the codomain of the path and sets the SELECT statement to select the reference to the codomain of the path from this entity.
 java.lang.String getTargetTable()
          Get the target table of the commutative diagram
 void setBaseTable()
          Sets the base table (that is, the domain) of the commutative diagram.
 void setConstraintStrings()
          Sets the constraint string for this constraint
 void setTargetTable()
          Sets the target table (that is, the codomain) of the commutative diagram.
 
Methods inherited from class easik.sketch.util.Export.Constraints.ExportConstraint
addPath, getBaseTable, getConstraintStrings, getPaths, getTimeNames, set_db_name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMM_PROC_NAME

private static final java.lang.String COMM_PROC_NAME
The name of all procedures created because of a commutative diagram

See Also:
Constant Field Values

targetTable

private java.lang.String targetTable
The codomain of the commutative diagram

Constructor Detail

ExportCommutativeDiagram

public ExportCommutativeDiagram(int id)
Constructor which calls the superclass constructor.

Parameters:
id - An id number to uniquely identify this constraint from all others.
Method Detail

setBaseTable

public void setBaseTable()
Sets the base table (that is, the domain) of the commutative diagram.

Overrides:
setBaseTable in class ExportConstraint

setTargetTable

public void setTargetTable()
Sets the target table (that is, the codomain) of the commutative diagram.

Overrides:
setTargetTable in class ExportConstraint

getTargetTable

public java.lang.String getTargetTable()
Get the target table of the commutative diagram

Returns:
The string name of the target table

setConstraintStrings

public void setConstraintStrings()
Sets the constraint string for this constraint

Overrides:
setConstraintStrings in class ExportConstraint
Since:
2006-06-22 Vera Ranieri

getSelection

private java.lang.String getSelection(ExportPath p)
Determines the last entity before the codomain of the path and sets the SELECT statement to select the reference to the codomain of the path from this entity.

Parameters:
p - The path for which the selection is being made
Returns:
The string of the selection to be made
Since:
2006-06-09 Vera Ranieri

getAllTablesString

private java.lang.String getAllTablesString(ExportPath p)
Determines all tables involved in the path that must be referenced by conditions in the WHERE clause.

Parameters:
p - The path for which entities lie
Returns:
The string of where all conditions are taken
Since:
2006-06-09 Vera Ranieri

getAllConditionsString

private java.lang.String getAllConditionsString(ExportPath p)
Determines all conditions needing to hold along the commutative diagram path.

Parameters:
p - The path for which conditions must hold
Returns:
The string of the conditions
Since:
2006-06-09 Vera Ranieri