org.eclipse.emf.compare.match.service
Class MatchService

java.lang.Object
  extended by org.eclipse.emf.compare.match.service.MatchService

public final class MatchService
extends java.lang.Object

Service facade for matching models.


Method Summary
static MatchModel doContentMatch(org.eclipse.emf.ecore.EObject leftObject, org.eclipse.emf.ecore.EObject rightObject, org.eclipse.emf.ecore.EObject ancestor, java.util.Map<java.lang.String,java.lang.Object> options)
          Matches three objects along with their content, then return the corresponding match model.
static MatchModel doContentMatch(org.eclipse.emf.ecore.EObject leftObject, org.eclipse.emf.ecore.EObject rightObject, java.util.Map<java.lang.String,java.lang.Object> options)
          Matches two objects along with their content, then return the corresponding match model.
static MatchModel doMatch(org.eclipse.emf.ecore.EObject leftRoot, org.eclipse.emf.ecore.EObject rightRoot, org.eclipse.emf.ecore.EObject ancestor, java.util.Map<java.lang.String,java.lang.Object> options)
          Matches three models and returns the corresponding matching model.
static MatchModel doMatch(org.eclipse.emf.ecore.EObject leftRoot, org.eclipse.emf.ecore.EObject rightRoot, java.util.Map<java.lang.String,java.lang.Object> options)
          Matches two models and returns the corresponding matching model.
static MatchModel doResourceMatch(org.eclipse.emf.ecore.resource.Resource leftResource, org.eclipse.emf.ecore.resource.Resource rightResource, java.util.Map<java.lang.String,java.lang.Object> options)
          Matches two resources along with their content, then return the corresponding match model.
static MatchModel doResourceMatch(org.eclipse.emf.ecore.resource.Resource leftResource, org.eclipse.emf.ecore.resource.Resource rightResource, org.eclipse.emf.ecore.resource.Resource ancestorResource, java.util.Map<java.lang.String,java.lang.Object> options)
          Matches three resources and returns the corresponding matching model.
static IMatchEngine getBestMatchEngine(java.lang.String extension)
          Returns the best IMatchEngine for a file given its extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doContentMatch

public static MatchModel doContentMatch(org.eclipse.emf.ecore.EObject leftObject,
                                        org.eclipse.emf.ecore.EObject rightObject,
                                        org.eclipse.emf.ecore.EObject ancestor,
                                        java.util.Map<java.lang.String,java.lang.Object> options)
                                 throws java.lang.InterruptedException
Matches three objects along with their content, then return the corresponding match model.

Parameters:
leftObject - Left of the three objects to get compared.
rightObject - Right of the three objects to compare.
ancestor - Common ancestor of the two others.
options - Options to tweak the matching procedure. null or Collections.EMPTY_MAP will result in the default options to be used.
Returns:
MatchModel for these three objects' comparison.
Throws:
java.lang.InterruptedException - Thrown if the matching is interrupted somehow.
Since:
0.8.0
See Also:
MatchOptions, IMatchEngine.contentMatch(EObject, EObject, EObject, Map)

doContentMatch

public static MatchModel doContentMatch(org.eclipse.emf.ecore.EObject leftObject,
                                        org.eclipse.emf.ecore.EObject rightObject,
                                        java.util.Map<java.lang.String,java.lang.Object> options)
                                 throws java.lang.InterruptedException
Matches two objects along with their content, then return the corresponding match model.

Parameters:
leftObject - Left of the two objects to get compared.
rightObject - Right of the two objects to compare.
options - Options to tweak the matching procedure. null or Collections.EMPTY_MAP will result in the default options to be used.
Returns:
MatchModel for these two objects' comparison.
Throws:
java.lang.InterruptedException - Thrown if the matching is interrupted somehow.
Since:
0.8.0
See Also:
MatchOptions, IMatchEngine.contentMatch(EObject, EObject, Map)

doMatch

public static MatchModel doMatch(org.eclipse.emf.ecore.EObject leftRoot,
                                 org.eclipse.emf.ecore.EObject rightRoot,
                                 org.eclipse.emf.ecore.EObject ancestor,
                                 java.util.Map<java.lang.String,java.lang.Object> options)
                          throws java.lang.InterruptedException
Matches three models and returns the corresponding matching model.

Parameters:
leftRoot - Left model of this comparison.
rightRoot - Right model of this comparison.
ancestor - Common ancestor of leftRoot and rightRoot.
options - Options to tweak the matching procedure. null or Collections.EMPTY_MAP will result in the default options to be used.
Returns:
Matching model result of the comparison.
Throws:
java.lang.InterruptedException - Thrown if the matching is interrupted somehow.
See Also:
MatchOptions

doMatch

public static MatchModel doMatch(org.eclipse.emf.ecore.EObject leftRoot,
                                 org.eclipse.emf.ecore.EObject rightRoot,
                                 java.util.Map<java.lang.String,java.lang.Object> options)
                          throws java.lang.InterruptedException
Matches two models and returns the corresponding matching model.

Parameters:
leftRoot - Left model of the comparison.
rightRoot - Right model of the comparison.
options - Options to tweak the matching procedure. null or Collections.EMPTY_MAP will result in the default options to be used.
Returns:
Matching model result of these two models' comparison.
Throws:
java.lang.InterruptedException - Thrown if the matching is interrupted somehow.
See Also:
MatchOptions

doResourceMatch

public static MatchModel doResourceMatch(org.eclipse.emf.ecore.resource.Resource leftResource,
                                         org.eclipse.emf.ecore.resource.Resource rightResource,
                                         java.util.Map<java.lang.String,java.lang.Object> options)
                                  throws java.lang.InterruptedException
Matches two resources along with their content, then return the corresponding match model.

Parameters:
leftResource - Left of the two resources to get compared.
rightResource - Right of the two resources to compare.
options - Options to tweak the matching procedure. null or Collections.EMPTY_MAP will result in the default options to be used.
Returns:
MatchModel for these two resources' comparison.
Throws:
java.lang.InterruptedException - Thrown if the matching is interrupted somehow.
Since:
0.8.0
See Also:
MatchOptions, IMatchEngine.contentMatch(EObject, EObject, Map)

doResourceMatch

public static MatchModel doResourceMatch(org.eclipse.emf.ecore.resource.Resource leftResource,
                                         org.eclipse.emf.ecore.resource.Resource rightResource,
                                         org.eclipse.emf.ecore.resource.Resource ancestorResource,
                                         java.util.Map<java.lang.String,java.lang.Object> options)
                                  throws java.lang.InterruptedException
Matches three resources and returns the corresponding matching model.

Parameters:
leftResource - Left resource of this comparison.
rightResource - Right resource of this comparison.
ancestorResource - Common ancestor of leftResource and rightResource.
options - Options to tweak the matching procedure. null or Collections.EMPTY_MAP will result in the default options to be used.
Returns:
Matching model result of the comparison.
Throws:
java.lang.InterruptedException - Thrown if the matching is interrupted somehow.
See Also:
MatchOptions

getBestMatchEngine

public static IMatchEngine getBestMatchEngine(java.lang.String extension)
Returns the best IMatchEngine for a file given its extension.

Parameters:
extension - The extension of the file we need a IMatchEngine for.
Returns:
The best IMatchEngine for the given file extension.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.