edu.udo.cs.miningmart.schemamatching
Class DataModelMatcher

java.lang.Object
  extended by edu.udo.cs.miningmart.schemamatching.DataModelMatcher

public class DataModelMatcher
extends java.lang.Object

Provides methods to match sets of concepts to sets of concepts.

Author:
euler

Constructor Summary
DataModelMatcher(MmSchemaMatcher useThisMatcher)
           
 
Method Summary
static java.util.Collection<Concept> addJoinsToCase(Case someCase)
          Adds concepts to the given case that represent the results of possible joins in the given case.
 java.util.Collection<MatchingResult<Concept>> getDataModelMatching(java.util.Collection<Concept> conceptualModel, java.util.Collection<Concept> targetModel)
          Tries to map as many elements of the conceptual model as possible to the target model.
 boolean isSimilarityGoodEnough(double similarity)
           
static Case readSchemaToMatch(java.util.Collection<java.lang.String> tableNames, M4Interface theM4Interface, java.lang.String nameForTheCase)
          Creates a MiningMart case whose concepts and relations represent the given tables/views and the foreign key links between them as declared in the business database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataModelMatcher

public DataModelMatcher(MmSchemaMatcher useThisMatcher)
Method Detail

addJoinsToCase

public static java.util.Collection<Concept> addJoinsToCase(Case someCase)
                                                    throws M4Exception
Adds concepts to the given case that represent the results of possible joins in the given case. Joins are possible between concepts if they are linked by a relationship. Only two-way joins are considered. The added concepts are part of the case, but are also listed in the returned collection.

Parameters:
someCase - the Case
Returns:
a collection of added concepts
Throws:
M4Exception

getDataModelMatching

public java.util.Collection<MatchingResult<Concept>> getDataModelMatching(java.util.Collection<Concept> conceptualModel,
                                                                          java.util.Collection<Concept> targetModel)
                                                                   throws SchemaMatchException
Tries to map as many elements of the conceptual model as possible to the target model. Starts with the relationships, continues with the concepts. Returns maps of concepts.

Parameters:
conceptualModel - the conceptual data model
targetModel - the target data model
theMatcherToUse - instance of MmSchemaMatcher to be used for finding the similarities
Returns:
a collection with mapped concepts
Throws:
SchemaMatchException

isSimilarityGoodEnough

public boolean isSimilarityGoodEnough(double similarity)

readSchemaToMatch

public static Case readSchemaToMatch(java.util.Collection<java.lang.String> tableNames,
                                     M4Interface theM4Interface,
                                     java.lang.String nameForTheCase)
                              throws M4Exception
Creates a MiningMart case whose concepts and relations represent the given tables/views and the foreign key links between them as declared in the business database. The case is NOT set as the current case in the given M4 interface.

Parameters:
tableNames - a collection of names of tables/views
theM4Interface - the M4 interface that provides access to the database
Returns:
a Case object; it should be treated as temporary
Throws:
M4Exception


Copyright © 2001-2005