|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectuk.ac.bbk.dcs.automed.evolution.schemaEvolution.SchemaEvolution
uk.ac.bbk.dcs.automed.evolution.schemaEvolution.DataSourceSchemaEvolution
public class DataSourceSchemaEvolution
Class that handles the evolution of a data source schema.
| Field Summary | |
|---|---|
protected java.lang.Object |
domainKnowledge
|
protected Schema |
newDerivedSchema
|
protected boolean |
newDerivedSchemaCreated
|
private static java.lang.String |
QUERY_EXTEND_CONTRACT1
|
private static java.lang.String |
QUERY_EXTEND_CONTRACT2
|
protected boolean |
removeDescendants
If true, Range Void Any descendants are to be removed from union and/or derived schema |
protected boolean |
removeOldPathway
If true, old pathway is to be removed |
| Fields inherited from class uk.ac.bbk.dcs.automed.evolution.schemaEvolution.SchemaEvolution |
|---|
dataSourceSchemas, derivedSchema, EVOLUTION_TYPE_SCHEMA_AND_DATA, EVOLUTION_TYPE_SCHEMA_ONLY, evolutionPathway, evolutionType, EVOLVED_SCHEMA_TYPE_DATASOURCE, EVOLVED_SCHEMA_TYPE_DERIVED, evolvedSchemaType, logger, pathwaysToUnionSchemas, pathwayToDerivedSchema, unionSchemas |
| Constructor Summary | |
|---|---|
protected |
DataSourceSchemaEvolution()
|
| Method Summary | |
|---|---|
static boolean |
canBeRemoved(SchemaObject so,
Schema source,
Schema[] targets)
|
static boolean |
compare(java.util.Set constructsToMatch,
ASG g)
This method compares a set of constructs one by one with the Cell object of AutoMed. |
static boolean |
compare(java.lang.String schemeString,
Cell c)
|
private java.util.Set |
descendants(SchemaObject so,
int indexOfOrigEvolvedSchema)
Gets the descendant constructs in the derived schema. |
private java.util.Set |
getDescendantsToRemove(java.util.Set descendants)
|
protected Schema |
getNewDerivedSchema()
|
protected boolean |
getNewDerivedSchemaCreated()
|
private int |
indexOfMatchingTransformation(Transformation[] ts,
Transformation t)
|
void |
processContractTransformation(Transformation t)
Processes a contract transformation |
void |
processExtendTransformation(Transformation t)
Processes an extend transformation |
private SchemaObject[] |
sortDescendantsToRemove(java.util.Set descendantsToRemove)
|
| Methods inherited from class uk.ac.bbk.dcs.automed.evolution.schemaEvolution.SchemaEvolution |
|---|
getDataSourceSchemas, getDerivedSchema, getEvolutionPathway, getEvolutionType, getEvolvedSchemaType, getPathwaysToUnionSchemas, getPathwayToDerivedSchema, processAddTransformation, processDataSourceSchemaEvolution, processDeleteTransformation, processDerivedSchemaEvolution, processEvolution, processIdentTransformation, processNewPathways, processRenameTransformation, setPathwayToDerivedSchema |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String QUERY_EXTEND_CONTRACT1
private static final java.lang.String QUERY_EXTEND_CONTRACT2
protected boolean removeDescendants
protected boolean removeOldPathway
protected java.lang.Object domainKnowledge
protected boolean newDerivedSchemaCreated
protected Schema newDerivedSchema
| Constructor Detail |
|---|
protected DataSourceSchemaEvolution()
| Method Detail |
|---|
public void processExtendTransformation(Transformation t)
SchemaEvolution
processExtendTransformation in class SchemaEvolutiont - transformation to process
private int indexOfMatchingTransformation(Transformation[] ts,
Transformation t)
throws EvolutionException
ts - input pathway in the form of an array of transformationst - a transformation in ts
EvolutionException - if ts contains no matching transformation of t, or if t is not a contract transformation
public void processContractTransformation(Transformation t)
throws EvolutionException
SchemaEvolution
processContractTransformation in class SchemaEvolutiont - transformation to process
EvolutionException
private java.util.Set descendants(SchemaObject so,
int indexOfOrigEvolvedSchema)
throws EvolutionException
so - input schema objectindexOfOrigEvolvedSchema - the index in dataSourceSchemas of the schema that has undergone evolution
EvolutionException - thrown if a problem is encountered during the search for descendants
public static boolean compare(java.util.Set constructsToMatch,
ASG g)
Set - All constructs that needed to be searched.c - cell Object
public static boolean compare(java.lang.String schemeString,
Cell c)
toMatch - string to match with the Cell.c - current Cell
private java.util.Set getDescendantsToRemove(java.util.Set descendants)
throws EvolutionException
descendants - set of constructs affected by the evolution of the data source schema
QUERY_EXTEND_CONTRACT1 or
QUERY_EXTEND_CONTRACT2 and so could be contracted from derived schema
EvolutionException
public static boolean canBeRemoved(SchemaObject so,
Schema source,
Schema[] targets)
throws EvolutionException
so - constrsource - source schematarget - target schema
QueryProcessor
EvolutionException - thrown if parsing or query processing problem occursprivate SchemaObject[] sortDescendantsToRemove(java.util.Set descendantsToRemove)
descendantsToRemove - the constructs that can be removed from the derived schema
protected boolean getNewDerivedSchemaCreated()
protected Schema getNewDerivedSchema()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||