You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2012/09/07 14:58:22 UTC
svn commit: r1382005 -
/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java
Author: pkluegl
Date: Fri Sep 7 12:58:22 2012
New Revision: 1382005
URL: http://svn.apache.org/viewvc?rev=1382005&view=rev
Log:
UIMA-2462
- reuse comparator instance
- removed TODO for this issue
Modified:
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java
Modified: uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java?rev=1382005&r1=1382004&r2=1382005&view=diff
==============================================================================
--- uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java (original)
+++ uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java Fri Sep 7 12:58:22 2012
@@ -51,7 +51,6 @@ public class TextMarkerTypeMatcher imple
public Collection<AnnotationFS> getMatchingAnnotations(TextMarkerStream stream,
TextMarkerBlock parent) {
// TODO what about the matching direction?
- // TODO this comparator can ignore some annotations?! same offset same type
Collection<AnnotationFS> result = new TreeSet<AnnotationFS>(comparator);
List<Type> types = getTypes(parent, stream);
for (Type type : types) {
@@ -96,7 +95,7 @@ public class TextMarkerTypeMatcher imple
if (stream.isValid()) {
TextMarkerBasic nextBasic = (TextMarkerBasic) stream.get();
List<Type> reTypes = getTypes(parent, stream);
- Collection<AnnotationFS> anchors = new TreeSet<AnnotationFS>(new AnnotationComparator());
+ Collection<AnnotationFS> anchors = new TreeSet<AnnotationFS>(comparator);
for (Type eachMatchType : reTypes) {
List<Type> types = stream.getCas().getTypeSystem().getProperlySubsumedTypes(eachMatchType);
types.add(eachMatchType);
@@ -127,7 +126,7 @@ public class TextMarkerTypeMatcher imple
if (stream.isValid()) {
TextMarkerBasic nextBasic = (TextMarkerBasic) stream.get();
List<Type> reTypes = getTypes(parent, stream);
- Collection<AnnotationFS> anchors = new TreeSet<AnnotationFS>(new AnnotationComparator());
+ Collection<AnnotationFS> anchors = new TreeSet<AnnotationFS>(comparator);
for (Type eachMatchType : reTypes) {
List<Type> types = stream.getCas().getTypeSystem().getProperlySubsumedTypes(eachMatchType);
types.add(eachMatchType);