org.infai.emo.matcher.action
Class MappingBuilder

java.lang.Object
  extended by org.infai.emo.matcher.action.MappingBuilder

 class MappingBuilder
extends java.lang.Object

Class for building the mapping out of a matching between two models.

Version:
1.1.0
Author:
Stanley Hillner

Field Summary
private  Matching baseMatch
          The final matching that serves as the basis for the Mapping.
private  ModelComparator comparator
          The main class that controls the order of the comparison.
private  MapFactory fac
          The factory for creating the elements of the mapping.
 
Constructor Summary
MappingBuilder(Matching baseMatch, ModelComparator comparator)
          Initializes a new MappingBuilder with the matching and the comparator.
 
Method Summary
private  void createConfigurationData(MapFactory fac, MapModel mapModel)
          create the configuration-data for the comparison that will be stored in the model.
private  MappingElement createMappingElement(MapFactory fac, org.eclipse.emf.ecore.EObject leftElement, org.eclipse.emf.ecore.EObject rightElement, java.lang.Double matchingValue)
          Creates a mapping-element with the given values.
private  NotMappedElement createNotMappedElement(MapFactory fac, org.eclipse.emf.ecore.EObject modelElement, boolean inleftModel)
          Creates a EMF-Element that shows up an element of one of the original models that couldn't be mapped onto another.
protected  MapModel getMapping(boolean createConfigurationData)
          This method calculates the Mapping between the model-elements and creates an EMF-Model that contains the mapped elements and their matching-values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

baseMatch

private Matching baseMatch
The final matching that serves as the basis for the Mapping.

See Also:
Matching

comparator

private ModelComparator comparator
The main class that controls the order of the comparison.

See Also:
ModelComparator

fac

private MapFactory fac
The factory for creating the elements of the mapping.

See Also:
MapFactory
Constructor Detail

MappingBuilder

MappingBuilder(Matching baseMatch,
               ModelComparator comparator)
Initializes a new MappingBuilder with the matching and the comparator.

Parameters:
baseMatch - the basis for the mapping.
comparator - the class that controls the order of comparison.
See Also:
baseMatch, comparator
Method Detail

getMapping

protected MapModel getMapping(boolean createConfigurationData)
This method calculates the Mapping between the model-elements and creates an EMF-Model that contains the mapped elements and their matching-values.

Returns:
the mapping between both models.
See Also:
MapModel

createConfigurationData

private void createConfigurationData(MapFactory fac,
                                     MapModel mapModel)
create the configuration-data for the comparison that will be stored in the model.

Parameters:
fac - the factory for creating the model-elements.
mapModel - the model in which the configuration-data shall be stored.
See Also:
MapFactory, MapModel

createMappingElement

private MappingElement createMappingElement(MapFactory fac,
                                            org.eclipse.emf.ecore.EObject leftElement,
                                            org.eclipse.emf.ecore.EObject rightElement,
                                            java.lang.Double matchingValue)
Creates a mapping-element with the given values.

Parameters:
fac - the factory for the element-creation.
leftElement - the first oft the mapped elements.
rightElement - the second oft the mapped elements.
matchingValue - the matching-value for both elements.
Returns:
the EMF-Element for the model.
See Also:
MapFactory, MappingElement

createNotMappedElement

private NotMappedElement createNotMappedElement(MapFactory fac,
                                                org.eclipse.emf.ecore.EObject modelElement,
                                                boolean inleftModel)
Creates a EMF-Element that shows up an element of one of the original models that couldn't be mapped onto another.

Parameters:
fac - the factory for the element-creation.
modelElement - the element that couldn't be mapped.
inleftModel - indicates whether the element was detected in the left model or in the right.
Returns:
the EMF-Element for the model.
See Also:
MapFactory, NotMappedElement