uk.ac.ic.doc.automed.tml
Class TML

java.lang.Object
  extended by uk.ac.ic.doc.automed.tml.TML
Direct Known Subclasses:
TempTML

public class TML
extends java.lang.Object

This class represents a Transformation in TML notation.

Author:
Nerissa Tong (nnyt98@doc.ic.ac.uk)

Constructor Summary
protected TML(int a, Schema fs, Schema ts, SchemaObject fo, SchemaObject to, java.lang.String f, java.lang.String c)
           
protected TML(SchemaObject to)
           
protected TML(TML tml)
           
  TML(Transformation t)
           
 
Method Summary
protected  void addQuerySchemaObjectsToConditions(java.util.ArrayList querySchemaObjects)
           
protected  void addToNegPostString(java.lang.String str)
           
protected  void addToNegPreString(java.lang.String str)
           
protected  void addToPosPostString(java.lang.String str)
           
protected  void addToPosPreString(java.lang.String str)
           
 int getAction()
           
 java.lang.String getActionString()
           
 java.lang.String getConstraint()
           
 SchemaObject getFromObject()
           
 Schema getFromSchema()
           
 java.lang.String getFunction()
           
 java.util.HashSet getNegativePostconditions()
           
 java.util.HashSet getNegativePreconditions()
           
 java.util.HashSet getPositivePostconditions()
           
 java.util.HashSet getPositivePreconditions()
           
protected static java.util.ArrayList getQuerySchemaObjects(int a, java.lang.String query, Schema fs)
          Returns an ArrayList of OBIDs referenced by the given query.
 Transformation getRepTran()
           
static TML getTML(Schema fs, Schema ts)
           
 SchemaObject getToObject()
           
 Schema getToSchema()
           
 boolean isChangedRefTML()
           
 java.lang.String toActionString(int a)
           
 java.lang.String toPrintString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TML

public TML(Transformation t)

TML

protected TML(SchemaObject to)

TML

protected TML(TML tml)

TML

protected TML(int a,
              Schema fs,
              Schema ts,
              SchemaObject fo,
              SchemaObject to,
              java.lang.String f,
              java.lang.String c)
       throws NotFoundException,
              InconsistentException
Throws:
NotFoundException
InconsistentException
Method Detail

getQuerySchemaObjects

protected static java.util.ArrayList getQuerySchemaObjects(int a,
                                                           java.lang.String query,
                                                           Schema fs)
                                                    throws InconsistentException,
                                                           NotFoundException
Returns an ArrayList of OBIDs referenced by the given query. These OBIDs exist in the given from schema.

Parameters:
a - the action of the transformation to which the query belongs. This information is used for the different query extraction methods for extend and contract transformations (the range(q_l, q_u) syntax
query - the query from which schema objects are to be extracted
fs - the from schema of the transformation. If set to null, it means some of the schema objects in the query do not exist (for the purpose of optimisation), in this case, an ArrayList of String values is returned. An ArrayList of Integer values is returned otherwise.
Throws:
InconsistentException
NotFoundException

getTML

public static TML getTML(Schema fs,
                         Schema ts)
                  throws NotFoundException
Throws:
NotFoundException

getAction

public int getAction()

getPositivePreconditions

public java.util.HashSet getPositivePreconditions()

getNegativePreconditions

public java.util.HashSet getNegativePreconditions()

getPositivePostconditions

public java.util.HashSet getPositivePostconditions()

getNegativePostconditions

public java.util.HashSet getNegativePostconditions()

addToPosPreString

protected void addToPosPreString(java.lang.String str)

addToNegPreString

protected void addToNegPreString(java.lang.String str)

addToPosPostString

protected void addToPosPostString(java.lang.String str)

addToNegPostString

protected void addToNegPostString(java.lang.String str)

addQuerySchemaObjectsToConditions

protected void addQuerySchemaObjectsToConditions(java.util.ArrayList querySchemaObjects)
                                          throws NotFoundException
Throws:
NotFoundException

toActionString

public java.lang.String toActionString(int a)

getActionString

public java.lang.String getActionString()

getFromSchema

public Schema getFromSchema()

getToSchema

public Schema getToSchema()

getFromObject

public SchemaObject getFromObject()

getToObject

public SchemaObject getToObject()

getFunction

public java.lang.String getFunction()

getConstraint

public java.lang.String getConstraint()

getRepTran

public Transformation getRepTran()

isChangedRefTML

public boolean isChangedRefTML()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toPrintString

public java.lang.String toPrintString()
                               throws IntegrityException
Throws:
IntegrityException