|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.automed.matching.Integrator
public abstract class Integrator
The class that represents the Integrator component in the schema matching architecture. Its role is the integration of the schemas based on the discovered relationships.
Field Summary | |
---|---|
protected java.util.ArrayList |
disjoints
|
protected java.util.ArrayList |
equivalents
|
protected java.util.ArrayList |
overlaps
|
protected java.util.ArrayList |
subsumptions
|
Constructor Summary | |
---|---|
Integrator()
|
Method Summary | |
---|---|
protected java.util.ArrayList |
areRelated(SchemaObject[] objects1,
SchemaObject[] objects2,
SemanticRelationship rel,
boolean isAtomic)
Returns a list of SchemaElementPair arrays with all the combinations of related schema elements. |
protected static boolean |
contains(SchemaElementPair[] pairs,
SchemaElement[] elements,
int index)
Returns true if the specified elements are contained in the specified pairs. |
protected static boolean |
contains(SchemaElementPair[] container,
SchemaElementPair[] containee)
Returns true if the pairs are contained in the specified array. |
protected boolean |
existsIn(SchemaElement element,
SchemaElementPair[] pairs,
int index)
Returns true if the specified element appears in one of the pairs of the array. |
protected boolean |
existsIn(java.lang.String name,
SchemaObject[] objects)
Returns true if a schema object with the specified name exists in the array. |
static Schema |
extendToMatch(Schema s1,
Schema s2)
Returns the Schema produced by extending the two schemas with schema objects
which are missing from each other. |
protected java.util.ArrayList |
findRelated(SchemaObject[] objects1,
SchemaObject[] objects2,
SemanticRelationship rel,
boolean isAtomic)
Returns a list of SchemaElementPair arrays with all the combinations of related schema elements. |
protected java.util.ArrayList |
getAllCombinations(java.lang.Object[] pairs1,
java.lang.Object[] pairs2)
|
protected java.lang.Object[] |
getCombinations(java.lang.Object[] array)
|
protected java.util.ArrayList[] |
getCombinationsOverMultipleArrays(java.util.ArrayList[] array)
|
protected static SemanticRelationship |
getCommonRelationship(SchemaElementPairRelationship[] pairs)
|
protected static SchemaElement[] |
getElements(SchemaObject[] objects,
boolean isAtomic)
Returns a SchemaElement array, whose member wraps the corresponding member in the SchemaObject array. |
protected SemanticRelationship |
getRelationship(SchemaElementPair pair)
Returns the relationship in the pair. |
abstract Schema[] |
getSchemas()
|
protected SchemaElementPair[] |
isRelated(SchemaObject object,
SchemaObject[] objects,
SemanticRelationship rel,
boolean isAtomic)
Returns a SchemaElementPair array with pairs defined by the specified schema object and the schema object array. |
abstract void |
mergeSchemas()
|
protected SchemaElementPair[] |
removeDuplicates(SchemaElementPair[] hasDups)
Returns a duplicate-free SchemaElementPair array. |
abstract void |
resolveNamingConflicts()
|
abstract void |
resolveStructuralConflicts()
|
protected SchemaElementPair[] |
selectPairs(java.util.ArrayList allPairs,
java.util.ArrayList constraintPairs)
Returns the maximum SchemaElementPair array which contains the constraint pairs. |
protected SchemaElementPair[] |
selectPairs(java.util.ArrayList allPairs,
SchemaElement[] constraintElements,
int index)
Returns an array of schema element pairs which contain the specified constraint elements. |
void |
setRelationships(SchemaElementPairRelationship[] rels)
Sets the discovered relationships between the schema elements. |
abstract void |
setSchemas(Schema[] schemas)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList equivalents
protected java.util.ArrayList subsumptions
protected java.util.ArrayList overlaps
protected java.util.ArrayList disjoints
Constructor Detail |
---|
public Integrator()
Method Detail |
---|
public abstract void resolveNamingConflicts() throws IntegratorException, IntegrityException
IntegratorException
IntegrityException
public abstract void mergeSchemas() throws IntegratorException
IntegratorException
public abstract void resolveStructuralConflicts() throws IntegratorException, IntegrityException
IntegratorException
IntegrityException
public abstract Schema[] getSchemas()
public abstract void setSchemas(Schema[] schemas) throws IntegratorException
IntegratorException
public void setRelationships(SchemaElementPairRelationship[] rels)
rels
- the array of the relationship of the pairspublic static Schema extendToMatch(Schema s1, Schema s2) throws IntegrityException, NotFoundException, TypeMismatchException
Schema
produced by extending the two schemas with schema objects
which are missing from each other. The return schema contains the constructs of both schemas.
s1
- the first schemas2
- the second schema
Schema
produced by extending the two schemas with schema objects that are missing from each other
IntegrityException
NotFoundException
TypeMismatchException
protected static boolean contains(SchemaElementPair[] pairs, SchemaElement[] elements, int index) throws java.lang.IndexOutOfBoundsException
true
if the specified elements are contained in the specified pairs.
The index
determines which elements in the pairs are going to be examined, i.e.
the first or the second elements in the pairs.
pairs
- the contained array of schema element pairselements
- the array of the elements to look forindex
- the index where the elements are in the pairs
true
if the specified elements are contained in the specified pairs, false
otherwise.
java.lang.IndexOutOfBoundsException
- if the index is >1.protected static boolean contains(SchemaElementPair[] container, SchemaElementPair[] containee)
true
if the pairs are contained in the specified array. All the pairs in
containee
should be contained in the container
, for a true
answer.
container
- the container array of schema element pairscontainee
- the containee array of schema element pairs
true
if the pairs are contained in the specified array, false
otherwise.protected SchemaElementPair[] selectPairs(java.util.ArrayList allPairs, SchemaElement[] constraintElements, int index) throws java.lang.IndexOutOfBoundsException
SchemaElementPair
array. This array is checked
whether it contains the specified elements.
The index
determines which part of the pairs
are going to be examined, i.e. the first or the second elements in the pairs
allPairs
- the list of SchemaElementPair arraysconstraintElements
- the elements which define which array is selectedindex
- the index where the contraint elements should appear in the pairs
- Returns:
- an array of schema element pairs which contain the specified constraint elements.
- Throws:
IndexOutOfBoundException
- if index
>1.
java.lang.IndexOutOfBoundsException
protected SchemaElementPair[] selectPairs(java.util.ArrayList allPairs, java.util.ArrayList constraintPairs) throws IntegratorException
SchemaElementPair
array which contains the constraint pairs.
The allPairs
and constraintPairs
are two lists of SchemaElementPair
arrays. This method returns the maximum array in allPairs
which contains a constraint array of pairs.
allPairs
- the list of all the SchemaElementPair
arraysconstraintPairs
- the lists of all the constraint SchemaElementPair
arrays
SchemaElementPair
array which contains the constraint pairs.
IntegratorException
- if no array of pairs satisfies the constraint to contain
one of the constraint arrays of constraintPairs
protected boolean existsIn(SchemaElement element, SchemaElementPair[] pairs, int index) throws java.lang.IndexOutOfBoundsException
true
if the specified element appears in one of the pairs of the array.
index
determines which part of the pairs are going to be examined, i.e.
the first or the second elements in the pairs.
element
- the element to look forpairs
- the array of schema element pairsindex
- the index of the element in the pair
true
if the specified element appears in one of the pairs of the array, false
otherwise
IndexOutOfBounds
- if index >1.
java.lang.IndexOutOfBoundsException
protected boolean existsIn(java.lang.String name, SchemaObject[] objects)
true
if a schema object with the specified name exists in the array.
name
- the name to look forobjects
- the array of schema objects
true
if a schema object with the specified name exists in the array, false
otherwise.protected static SemanticRelationship getCommonRelationship(SchemaElementPairRelationship[] pairs)
protected SemanticRelationship getRelationship(SchemaElementPair pair)
pair
- the pair of schema elements
protected java.util.ArrayList areRelated(SchemaObject[] objects1, SchemaObject[] objects2, SemanticRelationship rel, boolean isAtomic)
SchemaElementPair
arrays with all the combinations of related schema elements.
The pairs are constructed from the schema object arrays, and each object must have a related counterpart.
The relationship that is looked for is rel
. The length of the arrays in the list
increases as you go from the first to the last member.
objects1
- the first array of schema objectsobjects2
- the second array of schema objectsrel
- the semantic relationship in each returned pairisAtomic
- whether the schema elements are going to be atomic or not
SchemaElementPair
arrays with all the combinations of related schema elementsprotected java.util.ArrayList findRelated(SchemaObject[] objects1, SchemaObject[] objects2, SemanticRelationship rel, boolean isAtomic)
SchemaElementPair
arrays with all the combinations of related schema elements.
The pairs are constructed from the schema object arrays, and each object may not have a related counterpart.
The relationship that is looked for is rel
. The length of the arrays in the list
decreases as you go from the first to the last member.
objects1
- the first array of schema objectsobjects2
- the second array of schema objectsrel
- the semantic relationship in each returned pairisAtomic
- whether the schema elements are going to be atomic or not
SchemaElementPair
arrays with all the combinations of related schema elementsprotected static SchemaElement[] getElements(SchemaObject[] objects, boolean isAtomic)
SchemaElement
array, whose member wraps the corresponding member in the SchemaObject
array.
objects
- the schema object arrayisAtomic
- whether the returned elements are atomic or not
SchemaElement
array, whose member wraps the corresponding member in the SchemaObject
arrayprotected java.util.ArrayList getAllCombinations(java.lang.Object[] pairs1, java.lang.Object[] pairs2)
protected SchemaElementPair[] removeDuplicates(SchemaElementPair[] hasDups)
SchemaElementPair
array. Duplicates
are removed from the specified array and the remaining pairs are returned.
hasDups
- a SchemaElementPair
array, which may contain duplicate members
SchemaElementPair
arrayprotected java.util.ArrayList[] getCombinationsOverMultipleArrays(java.util.ArrayList[] array)
protected java.lang.Object[] getCombinations(java.lang.Object[] array)
protected SchemaElementPair[] isRelated(SchemaObject object, SchemaObject[] objects, SemanticRelationship rel, boolean isAtomic)
SchemaElementPair
array with pairs defined by the specified schema object and the schema object array. rel
is the relationship that is being identified between the schema objects
object
- the schema object to be comparedobjects
- the SchemaObject
array whose member are compared to object
rel
- the relationship to look for between the objectsisAtomic
- whether the shcme alements in the returned pairs are atomic or not
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |