edu.uchsc.ccp.iaa.matcher
Class ClassAndSpanMatcher
java.lang.Object
edu.uchsc.ccp.iaa.matcher.ClassAndSpanMatcher
- All Implemented Interfaces:
- Matcher
public class ClassAndSpanMatcher
- extends Object
- implements Matcher
Method Summary |
String |
getDescription()
|
String |
getName()
|
static Annotation |
match(Annotation annotation,
String compareSetName,
IAA iaa,
Set<Annotation> excludeAnnotations)
This is a static version of the above match method that can be called by
other matcher implementations. |
Annotation |
match(Annotation annotation,
String compareSetName,
Set<Annotation> excludeAnnotations,
IAA iaa,
MatchResult matchResult)
|
static Set<Annotation> |
matches(Annotation annotation,
String compareSetName,
IAA iaa,
Set<Annotation> excludeAnnotations,
boolean returnFirst)
|
boolean |
returnsTrivials()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassAndSpanMatcher
public ClassAndSpanMatcher()
match
public Annotation match(Annotation annotation,
String compareSetName,
Set<Annotation> excludeAnnotations,
IAA iaa,
MatchResult matchResult)
- Specified by:
match
in interface Matcher
- Parameters:
annotation
- compareSetName
- excludeAnnotations
- iaa
- matchResult
- will be set to NONTRIVIAL_MATCH or NONTRIVIAL_NONMATCH.
Trivial matches and non-matches are not defined for this
matcher.
- Returns:
- the annotation that was matched. If none exists then return null.
- See Also:
Matcher.match(Annotation, String, Set,
IAA, MatchResult)
,
MatchResult.NONTRIVIAL_MATCH
,
MatchResult.NONTRIVIAL_NONMATCH
match
public static Annotation match(Annotation annotation,
String compareSetName,
IAA iaa,
Set<Annotation> excludeAnnotations)
- This is a static version of the above match method that can be called by
other matcher implementations.
- Parameters:
annotation
- compareSetName
- iaa
- excludeAnnotations
-
- Returns:
- an annotation that matches or null.
matches
public static Set<Annotation> matches(Annotation annotation,
String compareSetName,
IAA iaa,
Set<Annotation> excludeAnnotations,
boolean returnFirst)
- Parameters:
annotation
- compareSetName
- iaa
- excludeAnnotations
- returnFirst
- if true then a set of size 1 will be returned as soon as a
match is found. If false then all matches will be returned.
- Returns:
- this method will not return null - but rather an empty set of no
matches are found.
getName
public String getName()
- Specified by:
getName
in interface Matcher
getDescription
public String getDescription()
- Specified by:
getDescription
in interface Matcher
returnsTrivials
public boolean returnsTrivials()
- Specified by:
returnsTrivials
in interface Matcher