public interface IResourceMatcher
IResourceMatcher
will be used to match two or three
Resource
s together; depending on whether we are doing a two or three
way comparison.
Do take note that the match engine expects IResourceMatchers to return matching resources as well as resources that do not match.
A default implementation of the IResourceMatcher
, based on strategies, can also be subclassed by
clients, see StrategyResourceMatcher
.
StrategyResourceMatcher
Modifier and Type | Method and Description |
---|---|
Iterable<MatchResource> |
createMappings(Iterator<? extends Resource> leftResources,
Iterator<? extends Resource> rightResources,
Iterator<? extends Resource> originResources)
This will be called by the engine in order to retrieve the mappings created by this matcher.
|
Iterable<MatchResource> createMappings(Iterator<? extends Resource> leftResources, Iterator<? extends Resource> rightResources, Iterator<? extends Resource> originResources)
The returned mappings should include both "matching" resources and "not matching" resources (i.e. resources that are in either left or right ... but not in any of the two other lists).
leftResources
- An iterator over the resources we found on the left side.rightResources
- An iterator over the resources we found on the right side.originResources
- An iterator over the resources that may be considered as common ancestors of the couples
detected on the left and right sides.
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.