public class NameMatchingStrategy extends Object implements IResourceMatchingStrategy
| Constructor and Description |
|---|
NameMatchingStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected static MatchResource |
createMatchResource(Resource left,
Resource right,
Resource origin)
Creates a
MatchResource instance and sets all three resources of the mapping on it. |
protected Resource |
findMatch(Resource reference,
Iterable<Resource> candidates)
Returns the first match of
reference in candidates. |
List<MatchResource> |
matchResources(Iterable<? extends Resource> left,
Iterable<? extends Resource> right,
Iterable<? extends Resource> origin)
This will be called by the resource matcher in order to determine the matching between n
resources.
|
public List<MatchResource> matchResources(Iterable<? extends Resource> left, Iterable<? extends Resource> right, Iterable<? extends Resource> origin)
matchResources in interface IResourceMatchingStrategyleft - Resources we are to match in the left.right - Resources we are to match in the right.origin - Resources we are to match in the origin.IResourceMatchingStrategy.matchResources(java.lang.Iterable,
java.lang.Iterable, java.lang.Iterable)protected Resource findMatch(Resource reference, Iterable<Resource> candidates)
reference in candidates. This implementation will
consider two Resources to be "matches" if they have the same name.reference - The reference resource.candidates - The list of potential candidates that may match reference.reference in candidates. null if
none.protected static MatchResource createMatchResource(Resource left, Resource right, Resource origin)
MatchResource instance and sets all three resources of the mapping on it.left - The left resource of this mapping.right - The right resource of this mapping.origin - The origin resource of this mapping.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.