uk.ac.bbk.dcs.automed.evolution2.schemaEvolution
Class SchemaEvolution

java.lang.Object
  extended by uk.ac.bbk.dcs.automed.evolution2.schemaEvolution.SchemaEvolution
All Implemented Interfaces:
Evolution
Direct Known Subclasses:
ExtensionalSchemaEvolution, IntegratedSchemaEvolution

public abstract class SchemaEvolution
extends java.lang.Object
implements Evolution


Field Summary
protected  int evolutionType
           
protected  boolean isRepair
           
protected  int schemaEvolutionType
           
protected  Schema schemaToEvolve
           
 
Fields inherited from interface uk.ac.bbk.dcs.automed.evolution2.Evolution
EVOLVE_ADD, EVOLVE_CONTRACT, EVOLVE_DATA, EVOLVE_DELETE, EVOLVE_EXTEND, EVOLVE_EXTENTIONAL_SCHEMA, EVOLVE_INTEGRATED_SCHEMA, EVOLVE_MODEL, EVOLVE_RENAME, EVOLVE_SCHEMA
 
Constructor Summary
SchemaEvolution(int schemaEvolutionType, boolean isRepair)
           
 
Method Summary
abstract  void createNew()
           
abstract  void createNewOneStep()
           
static void dropSchemas(Pathway p)
          Retracts schemas in the pathway from s1 to s2, WITHOUT retracting s2.
 int getEvolutionType()
           
 boolean getIsRepair()
           
 int getSchemaEvolutionType()
           
protected abstract  Transformation processAddTransformation(Transformation crntTransformation)
           
protected abstract  Transformation processContractTransformation(Transformation crntTransformation)
           
protected abstract  Transformation processDeleteTransformation(Transformation crntTransformation)
           
 java.lang.Object processEvolution(java.lang.Object inObject)
          Fasade method to transparently do Evolution work
protected abstract  Transformation processExtendTransformation(Transformation crntTransformation)
           
protected abstract  Transformation processRenameTransformation(Transformation crntTransformation)
           
abstract  void repairExisting()
           
abstract  void repairExistingOneStep()
           
 boolean repairPathway(Pathway pathway)
           
 boolean repairPathway(Transformation[] transformation)
           
 void setIsRepair(boolean isRepair)
           
 Pathway simplifyPathway(Pathway pathway)
          The current implementation of this method is null.
 java.util.List simplifyPathway(Schema fromSchema, Schema toSchema)
          This is over loaded method to simplify the pathway between two schemas.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

schemaToEvolve

protected Schema schemaToEvolve

evolutionType

protected int evolutionType

isRepair

protected boolean isRepair

schemaEvolutionType

protected int schemaEvolutionType
Constructor Detail

SchemaEvolution

public SchemaEvolution(int schemaEvolutionType,
                       boolean isRepair)
                throws SchemaEvolutionException
Throws:
SchemaEvolutionException
Method Detail

createNew

public abstract void createNew()

createNewOneStep

public abstract void createNewOneStep()

repairExisting

public abstract void repairExisting()

repairExistingOneStep

public abstract void repairExistingOneStep()

setIsRepair

public void setIsRepair(boolean isRepair)

getEvolutionType

public int getEvolutionType()
Specified by:
getEvolutionType in interface Evolution

getIsRepair

public boolean getIsRepair()

processEvolution

public java.lang.Object processEvolution(java.lang.Object inObject)
                                  throws SchemaEvolutionException
Fasade method to transparently do Evolution work

Specified by:
processEvolution in interface Evolution
Throws:
SchemaEvolutionException

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

simplifyPathway

public Pathway simplifyPathway(Pathway pathway)
The current implementation of this method is null. This method can be implemented to return the simplified version of the pathhway.


simplifyPathway

public java.util.List simplifyPathway(Schema fromSchema,
                                      Schema toSchema)
                               throws SchemaEvolutionException
This is over loaded method to simplify the pathway between two schemas. And returns the List of Pathways. The current implementation of this method is null. This method can be implemented to return the simplified version of the pathhway.

Throws:
SchemaEvolutionException

repairPathway

public boolean repairPathway(Pathway pathway)
Parameters:
pathway -
Returns:
true if the repair was successful.

repairPathway

public boolean repairPathway(Transformation[] transformation)

processRenameTransformation

protected abstract Transformation processRenameTransformation(Transformation crntTransformation)

processAddTransformation

protected abstract Transformation processAddTransformation(Transformation crntTransformation)

processDeleteTransformation

protected abstract Transformation processDeleteTransformation(Transformation crntTransformation)

processExtendTransformation

protected abstract Transformation processExtendTransformation(Transformation crntTransformation)

processContractTransformation

protected abstract Transformation processContractTransformation(Transformation crntTransformation)

getSchemaEvolutionType

public int getSchemaEvolutionType()