easik.sketch.util.Export.Components
Class ExportPath

java.lang.Object
  extended by easik.sketch.util.Export.Components.ExportPath

public class ExportPath
extends java.lang.Object

Class representing a path from the sketch. Contains references to all edges associated in the path in a LinkedList. Should only be used for exportation to a database. Does not provide functionality for graphical display.

Since:
2006-05-22 Vera Ranieri
Version:
2006-06-22 Vera Ranieri
Author:
Vera Ranieri 2006

Field Summary
private  java.lang.String _domain
          The domain of this path
private  java.util.LinkedList<ExportEdge> _edges
          The edges involved in this path
private  java.lang.String _name
          The name of this path
 
Constructor Summary
ExportPath(java.lang.String n, java.lang.String d)
          Constructor to initialize linkedlist of edges
 
Method Summary
 void addEdge(ExportEdge e)
          Adds an edge to the path.
static java.lang.String getAllTablesString(ExportPath path)
          Determines the tables along a path, and formats them into a string.
 java.lang.String getCoDomain()
          Returns the codomain of the last edge in the edge collection of the path, and thus the codomain of the path.
static java.lang.String getConditions(ExportPath path)
          Gets the conditions for a path.
static java.lang.String getDelConditions(ExportPath path)
          Determines the initial condition, as required by a BEFORE DELETE procedure.
 java.lang.String getDomain()
          Returns the domain of the first edge in the edge collection of the path, and thus the domain of the path.
 java.util.LinkedList<ExportEdge> getEdges()
          Getter method for the linked list of edges contained in this path.
 java.lang.String getName()
          Returns the unique name of this path, created by the edges contained in this path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_edges

private java.util.LinkedList<ExportEdge> _edges
The edges involved in this path


_name

private java.lang.String _name
The name of this path


_domain

private java.lang.String _domain
The domain of this path

Constructor Detail

ExportPath

public ExportPath(java.lang.String n,
                  java.lang.String d)
Constructor to initialize linkedlist of edges

Parameters:
n - The name of the path
d - The domain of the path
Since:
2006-05-22, Vera Ranieri
Method Detail

getEdges

public java.util.LinkedList<ExportEdge> getEdges()
Getter method for the linked list of edges contained in this path.

Returns:
The linked list of edges for this path
Since:
2006-05-22

addEdge

public void addEdge(ExportEdge e)
Adds an edge to the path. Builds the path according to the order they are stored in the XML file.

Parameters:
e - The edge to be added to the end of the path
Since:
2006-05-22

getName

public java.lang.String getName()
Returns the unique name of this path, created by the edges contained in this path.
Example: If a path contains edges e1, e2, e3 in that order, the name of the path is taken to be e1;e2;e3 .

Returns:
The name of this path
Since:
2006-05-22

getDomain

public java.lang.String getDomain()
Returns the domain of the first edge in the edge collection of the path, and thus the domain of the path.

Returns:
The domain of the path
Since:
2006-05-22

getCoDomain

public java.lang.String getCoDomain()
Returns the codomain of the last edge in the edge collection of the path, and thus the codomain of the path.

Returns:
The codomain of the path
Since:
2006-05-23

getAllTablesString

public static java.lang.String getAllTablesString(ExportPath path)
Determines the tables along a path, and formats them into a string.

Parameters:
path - The path for which the tables must be determined
Returns:
A string for SQL containing a list of all tables involved in the path.
Since:
2006-06-16, Vera Ranieri

getDelConditions

public static java.lang.String getDelConditions(ExportPath path)
Determines the initial condition, as required by a BEFORE DELETE procedure. Once initial condition is determined, all other conditions are then determined.

Parameters:
path - The path for which the delete conditions need to be determined
Returns:
String of the delete conditions
Since:
2006-06-20, Vera Ranieri

getConditions

public static java.lang.String getConditions(ExportPath path)
Gets the conditions for a path. These conditions are determined by matching unique ids along the path.

Parameters:
path - The path for which an element needs to be deleted from the codomain.
Returns:
A string of the conditions.
Since:
2006-06-22, Vera Ranieri