## org.eclipse.emf.compare.match.service
Class MatchEngineRegistry

    java.lang.Object
      java.util.AbstractMap<K,V>
          java.util.HashMap<java.lang.String,java.util.List<java.lang.Object>>
              org.eclipse.emf.compare.match.service.MatchEngineRegistry

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.util.List<java.lang.Object>>

    public final class MatchEngineRegistry

extends java.util.HashMap<java.lang.String,java.util.List<java.lang.Object>>

This registry will be initialized with all the match engines that could be parsed from the extension points if Eclipse is running according to `EMFPlugin.IS_ECLIPSE_RUNNING`, else it will contain only the two generic ones. Clients can add their own match engines in the registry for standalone usage.

See Also:
  Serialized Form

Field Summary
`static MatchEngineRegistry` `INSTANCE` Singleton instance of the registry.

Method Summary
`java.util.List<MatchEngineDescriptor>` `getDescriptors(ModelIdentifier identifier)` This will return the list of engine descriptors available for a given model identifier.
`java.util.List<MatchEngineDescriptor>` `getDescriptors(java.lang.String engineIdentifier)` Deprecated. use `getDescriptors(ModelIdentifier)` instead.
`IMatchEngine` `getHighestEngine(ModelIdentifier identifier)` Returns the highest priority `IMatchEngine` registered against the given model identifiers.
`IMatchEngine` `getHighestEngine(java.lang.String engineIdentifier)` Deprecated. use `getHighestEngine(ModelIdentifier)` instead.
`void` `putValue(java.lang.String key, java.lang.Object value)` Adds the given value in the list of engines known for the given extension.

Methods inherited from class java.util.HashMap
`clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values`

Methods inherited from class java.util.AbstractMap
`equals, hashCode, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Field Detail

### INSTANCE

    public static final MatchEngineRegistry INSTANCE

  Singleton instance of the registry.

Method Detail

### getDescriptors

    public java.util.List<MatchEngineDescriptor> getDescriptors(ModelIdentifier identifier)

  This will return the list of engine descriptors available for a given model identifier. Engines must have been registered through an extension point for this to return anything else than an empty list. Note that engines registered against will always be returned at the end of this list.

  Parameters:
    `identifier` - `ModelIdentifier` we seek the matching engines for.
  Returns:
    The list of available engine descriptors.
  Since:
    1.1

### getDescriptors

    @Deprecated
    public java.util.List<MatchEngineDescriptor> getDescriptors(java.lang.String engineIdentifier)

  Deprecated. use `getDescriptors(ModelIdentifier)` instead.

  This will return the list of engine descriptors available for a given engine identifier. Engines must have been registered through an extension point for this to return anything else than an empty list. Note that engines registered against will always be returned at the end of this list.

  Parameters:
    `engineIdentifier` - Engine identifier we seek the matching engines for.
    An engine identifier is a String that can describe either a file extension, a content-type or a namespace.
  Returns:
    The list of available engine descriptors.

### getHighestEngine

    public IMatchEngine getHighestEngine(ModelIdentifier identifier)

  Returns the highest priority `IMatchEngine` registered against the given model identifiers. Specific engines will always come before generic ones regardless of their priority. If engines have been manually added to the list, the latest added will be returned.

  Parameters:
    `identifier` - `ModelIdentifier` to search on the registered `IMatchEngine`
  Returns:
    The best `IMatchEngine` for the given engine identifiers.
  Since:
    1.1

### getHighestEngine

    @Deprecated
    public IMatchEngine getHighestEngine(java.lang.String engineIdentifier)

  Deprecated. use `getHighestEngine(ModelIdentifier)` instead.

  Returns the highest priority `IMatchEngine` registered against the given engine identifier. Specific engines will always come before generic ones regardless of their priority. If engines have been manually added to the list, the latest added will be returned.

  Parameters:
    `engineIdentifier` - An engine identifier to search on the registered `IMatchEngine`.
    An engine identifier is a String that can describe either a file extension, a content-type or a namespace.
  Returns:
    The best `IMatchEngine` for the given file identifier.

### putValue

    public void putValue(java.lang.String key,
                         java.lang.Object value)

  Adds the given value in the list of engines known for the given extension.

  Parameters:
    `key` - The file extension we wish to add an engine for.
    `value` - Engine to be added.

Copyright 2006 IBM Corporation and others. All Rights Reserved.