uk.ac.bbk.dcs.automed.evolution2
Class EvolutionUtility

java.lang.Object
  extended by uk.ac.bbk.dcs.automed.evolution2.EvolutionUtility

public class EvolutionUtility
extends java.lang.Object


Constructor Summary
EvolutionUtility()
           
 
Method Summary
static Schema applyPathway(Transformation[] ts, Schema currentSchema)
           
static Schema applyTransformationToSchema(Transformation t, Schema schemaToBeAppliedOn)
          This method is given transformation and a schema arguments.
static void displayTransformation(Transformation transformation)
           
static void dropSchemas(Pathway p)
          Retracts schemas in the pathway from s1 to s2, WITHOUT retracting s2.
static Schema duplicateSchema(Schema s, java.lang.String dupName)
           
static Transformation getTransformationBetweenSchemas(Schema fromSchema, Schema toSchema)
           
static Transformation[] getTransformations(Schema schema1, Schema schema2)
           
static boolean isAddTransformation(Transformation transformation, Schema fromSchema)
           
static boolean isContractTransformation(Transformation transformation, Schema fromSchema)
           
static boolean isDeleteTransformation(Transformation transformation, Schema fromSchema)
           
static boolean isExtendontractTransformation(Transformation transformation, Schema fromSchema)
           
static boolean isExtendTransformation(Transformation transformation, Schema fromSchema)
           
static boolean isIdentTransformation(Transformation transformation, Schema fromSchema)
           
static boolean isRenameTransformation(Transformation transformation, Schema fromSchema)
           
static void listPathway(Pathway p)
           
static void main(java.lang.String[] args)
           
static void removeInBetweenSchemas()
           
static void retract(java.lang.String schemaName)
           
static void retractAll()
           
static void showPathway()
           
static void showPathways(Schema schema1, Schema schema2)
           
static void showPathways(java.lang.String schema1, java.lang.String schema2)
           
static java.lang.String substring2(java.lang.String mainString, java.lang.String function, java.lang.String constraint)
           
static java.lang.String substring3(java.lang.String mainString, java.lang.String function, java.lang.String constraint)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvolutionUtility

public EvolutionUtility()
Method Detail

isContractTransformation

public static boolean isContractTransformation(Transformation transformation,
                                               Schema fromSchema)

isAddTransformation

public static boolean isAddTransformation(Transformation transformation,
                                          Schema fromSchema)

isExtendTransformation

public static boolean isExtendTransformation(Transformation transformation,
                                             Schema fromSchema)

isExtendontractTransformation

public static boolean isExtendontractTransformation(Transformation transformation,
                                                    Schema fromSchema)

isDeleteTransformation

public static boolean isDeleteTransformation(Transformation transformation,
                                             Schema fromSchema)

isRenameTransformation

public static boolean isRenameTransformation(Transformation transformation,
                                             Schema fromSchema)

isIdentTransformation

public static boolean isIdentTransformation(Transformation transformation,
                                            Schema fromSchema)

listPathway

public static void listPathway(Pathway p)

displayTransformation

public static void displayTransformation(Transformation transformation)

showPathway

public static void showPathway()
                        throws java.lang.Exception
Throws:
java.lang.Exception

getTransformations

public static Transformation[] getTransformations(Schema schema1,
                                                  Schema schema2)
                                           throws IntegrityException,
                                                  NotFoundException
Throws:
IntegrityException
NotFoundException

showPathways

public static void showPathways(java.lang.String schema1,
                                java.lang.String schema2)
                         throws java.lang.Exception
Throws:
java.lang.Exception

showPathways

public static void showPathways(Schema schema1,
                                Schema schema2)
                         throws java.lang.Exception
Throws:
java.lang.Exception

retractAll

public static void retractAll()
                       throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

dropSchemas

public static void dropSchemas(Pathway p)
                        throws IntegrityException,
                               NotFoundException
Retracts schemas in the pathway from s1 to s2, WITHOUT retracting s2.

Throws:
IntegrityException
NotFoundException

removeInBetweenSchemas

public static void removeInBetweenSchemas()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

retract

public static void retract(java.lang.String schemaName)

getTransformationBetweenSchemas

public static Transformation getTransformationBetweenSchemas(Schema fromSchema,
                                                             Schema toSchema)
                                                      throws EvolutionException
Throws:
EvolutionException

applyTransformationToSchema

public static Schema applyTransformationToSchema(Transformation t,
                                                 Schema schemaToBeAppliedOn)
                                          throws EvolutionException
This method is given transformation and a schema arguments. applies the same transformation to the schema argument. Returns the schema

Throws:
EvolutionException

substring3

public static java.lang.String substring3(java.lang.String mainString,
                                          java.lang.String function,
                                          java.lang.String constraint)

substring2

public static java.lang.String substring2(java.lang.String mainString,
                                          java.lang.String function,
                                          java.lang.String constraint)

duplicateSchema

public static Schema duplicateSchema(Schema s,
                                     java.lang.String dupName)
                              throws EvolutionException
Throws:
EvolutionException

applyPathway

public static Schema applyPathway(Transformation[] ts,
                                  Schema currentSchema)
                           throws java.lang.Exception
Throws:
java.lang.Exception