edu.uchsc.ccp.iaa.matcher
Class SpansExactComplexFeatureMatcher

java.lang.Object
  extended by edu.uchsc.ccp.iaa.matcher.SpansExactComplexFeatureMatcher
All Implemented Interfaces:
Matcher

public class SpansExactComplexFeatureMatcher
extends Object
implements Matcher


Constructor Summary
SpansExactComplexFeatureMatcher()
           
 
Method Summary
 String getDescription()
           
 String getName()
           
static Annotation match(Annotation annotation, String compareSetName, IAA iaa, Set<Annotation> excludeAnnotations, MatchResult matchResult)
          This method will return an annotation that has the exact same spans and simple features.
 Annotation match(Annotation annotation, String compareSetName, Set<Annotation> excludeAnnotations, IAA iaa, MatchResult matchResult)
          This method will return an annotation that has the exact same spans and complex features.
 boolean returnsTrivials()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpansExactComplexFeatureMatcher

public SpansExactComplexFeatureMatcher()
Method Detail

match

public Annotation match(Annotation annotation,
                        String compareSetName,
                        Set<Annotation> excludeAnnotations,
                        IAA iaa,
                        MatchResult matchResult)
This method will return an annotation that has the exact same spans and complex features. It is not required that the annotation class match. Preference will be given to an annotation that has the same class as well as spans and simple features. If one does not exist, then null is returned.

Specified by:
match in interface Matcher
Parameters:
annotation - the annotation that is to be matched
compareSetName - the set of annotations that we will look for a match in
excludeAnnotations - a set of annotations that cannot be the return value
iaa - an instance of IAA from which to get information about annotations
matchResult - instantiate a new MatchType and pass it to the method. The method must set the result to one of the four result values given in MatchResult.
Returns:
the annotation that was matched. If none exists then return null.

match

public static Annotation match(Annotation annotation,
                               String compareSetName,
                               IAA iaa,
                               Set<Annotation> excludeAnnotations,
                               MatchResult matchResult)
This method will return an annotation that has the exact same spans and simple features. It is not required that the annotation class match. Preference will be given to an annotation that has the same class as well as spans and simple features. If one does not exist, then null is returned.

Parameters:
annotation -
compareSetName -
iaa -
excludeAnnotations -
matchResult - will be set to:
  • TRIVIAL_NONMATCH if there are no exactly overlapping annotations with the passed in annotation
  • NONTRIVIAL_MATCH if there is an annotation that is exactly overlapping and the Annotation.compareSimpleFeatures returns NONTRIVIAL_MATCH
  • TRIVIAL_MATCH if there is an annotation that is exactly overlapping and the Annotation.compareSimpleFeatures returns TRIVIAL_MATCH
    Note: if there is a trivial_match then there cannot possibly be a NONTRIVIAL_MATCH because one of the simple features of the passed in annotation must have a null value or there are no simple features.
  • NONTRIVIAL_NONMATCH if there an annotation that is exactly overlapping and the Annotation.compareSimpleFeatures returns NONTRIVIAL_NONMATCH
  • TRIVIAL_NONMATCH if there is no match or non-trivial non-match found.
    Returns:
    will return the first nontrivial match that it finds preferring
    See Also:
    Matcher.match(Annotation, String, Set, IAA, MatchResult), MatchResult.NONTRIVIAL_MATCH, MatchResult.NONTRIVIAL_NONMATCH, MatchResult.TRIVIAL_MATCH, MatchResult.TRIVIAL_NONMATCH

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