Class MatchEngineFactoryImpl
- java.lang.Object
-
- org.eclipse.emf.compare.match.impl.MatchEngineFactoryImpl
-
- All Implemented Interfaces:
IMatchEngine.Factory
public class MatchEngineFactoryImpl extends Object implements IMatchEngine.Factory
The default implementation of theIMatchEngine.Factory.Registry.- Since:
- 3.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.emf.compare.match.IMatchEngine.Factory
IMatchEngine.Factory.Registry
-
-
Field Summary
Fields Modifier and Type Field Description protected IMatchEnginematchEngineThe match engine created by this factory.
-
Constructor Summary
Constructors Constructor Description MatchEngineFactoryImpl()Constructor that instantiate aDefaultMatchEngine.MatchEngineFactoryImpl(IEObjectMatcher matcher, IComparisonFactory comparisonFactory)Deprecated.Using this will ignore any weight provider or equality helper extension provided through extension points.MatchEngineFactoryImpl(UseIdentifiers useIDs)Constructor that instantiate aDefaultMatchEnginethat will use identifiers as specified by the givenuseIDsenumeration.MatchEngineFactoryImpl(UseIdentifiers useIDs, WeightProvider.Descriptor.Registry weightProviderRegistry)Constructor that instantiate aDefaultMatchEnginethat will use identifiers as specified by the givenuseIDsenumeration.MatchEngineFactoryImpl(UseIdentifiers useIDs, WeightProvider.Descriptor.Registry weightProviderRegistry, EqualityHelperExtensionProvider.Descriptor.Registry equalityHelperExtensionProviderRegistry)Constructor that instantiate aDefaultMatchEnginethat will use identifiers as specified by the givenuseIDsenumeration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IMatchEnginegetMatchEngine()Returns the wrapped match engine.intgetRanking()Returns the ranking of this match engine factory.booleanisMatchEngineFactoryFor(IComparisonScope scope)Check if the match engine factory is a good candidate for comparison.voidsetEqualityHelperExtensionProviderRegistry(EqualityHelperExtensionProvider.Descriptor.Registry equalityHelperExtensionProviderRegistry)The match engine may need a Equality Helper Extension.voidsetRanking(int r)Set the ranking of this match engine factory.
-
-
-
Field Detail
-
matchEngine
protected IMatchEngine matchEngine
The match engine created by this factory.
-
-
Constructor Detail
-
MatchEngineFactoryImpl
public MatchEngineFactoryImpl()
Constructor that instantiate aDefaultMatchEngine. This match engine will use a the standalone weight provider registry {@link WeightProviderDescriptorRegistryImpl.createStandaloneInstance()}.
-
MatchEngineFactoryImpl
public MatchEngineFactoryImpl(UseIdentifiers useIDs)
Constructor that instantiate aDefaultMatchEnginethat will use identifiers as specified by the givenuseIDsenumeration. This match engine will use a the standalone weight provider registry {@link WeightProviderDescriptorRegistryImpl.createStandaloneInstance()}.- Parameters:
useIDs- the kinds of matcher to use.
-
MatchEngineFactoryImpl
public MatchEngineFactoryImpl(UseIdentifiers useIDs, WeightProvider.Descriptor.Registry weightProviderRegistry)
Constructor that instantiate aDefaultMatchEnginethat will use identifiers as specified by the givenuseIDsenumeration.- Parameters:
useIDs- the kinds of matcher to use.weightProviderRegistry- A match engine needs a WeightProvider in case of this match engine do not use identifiers.
-
MatchEngineFactoryImpl
public MatchEngineFactoryImpl(UseIdentifiers useIDs, WeightProvider.Descriptor.Registry weightProviderRegistry, EqualityHelperExtensionProvider.Descriptor.Registry equalityHelperExtensionProviderRegistry)
Constructor that instantiate aDefaultMatchEnginethat will use identifiers as specified by the givenuseIDsenumeration.- Parameters:
useIDs- the kinds of matcher to use.weightProviderRegistry- A match engine needs a WeightProvider in case of this match engine do not use identifiers.equalityHelperExtensionProviderRegistry- A match engine may need a Equality Helper Extension.
-
MatchEngineFactoryImpl
@Deprecated public MatchEngineFactoryImpl(IEObjectMatcher matcher, IComparisonFactory comparisonFactory)
Deprecated.Using this will ignore any weight provider or equality helper extension provided through extension points. Use another of the constructors if you need this functionality.Constructor that instantiate aDefaultMatchEnginewith the given parameters.- Parameters:
matcher- The matcher that will be in charge of pairing EObjects together for this comparison process.comparisonFactory- factory that will be use to instantiate Comparison as return by match() methods.
-
-
Method Detail
-
getMatchEngine
public IMatchEngine getMatchEngine()
Returns the wrapped match engine.- Specified by:
getMatchEnginein interfaceIMatchEngine.Factory- Returns:
- the wrapped match engine.
- See Also:
IMatchEngine.Factory.getMatchEngine()
-
getRanking
public int getRanking()
Returns the ranking of this match engine factory.- Specified by:
getRankingin interfaceIMatchEngine.Factory- Returns:
- The ranking.
- See Also:
IMatchEngine.Factory.getRanking()
-
setRanking
public void setRanking(int r)
Set the ranking of this match engine factory.- Specified by:
setRankingin interfaceIMatchEngine.Factory- Parameters:
r- The ranking.- See Also:
IMatchEngine.Factory.setRanking(int)
-
isMatchEngineFactoryFor
public boolean isMatchEngineFactoryFor(IComparisonScope scope)
Check if the match engine factory is a good candidate for comparison.- Specified by:
isMatchEngineFactoryForin interfaceIMatchEngine.Factory- Parameters:
scope- The scope on which the match engine factory will be applied.- Returns:
- True if it is the good candidate, false otherwise.
- See Also:
IMatchEngine.Factory.isMatchEngineFactoryFor(org.eclipse.emf.compare.scope.IComparisonScope)
-
setEqualityHelperExtensionProviderRegistry
public void setEqualityHelperExtensionProviderRegistry(EqualityHelperExtensionProvider.Descriptor.Registry equalityHelperExtensionProviderRegistry)
The match engine may need a Equality Helper Extension.- Parameters:
equalityHelperExtensionProviderRegistry- the registry to associate with the match engine.
-
-