You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2007/01/24 17:12:57 UTC
svn commit: r499460 -
/incubator/uima/uimaj/trunk/uimaj-examples/src/main/java/org/apache/uima/tutorial/ex4/MeetingAnnotator.java
Author: schor
Date: Wed Jan 24 08:12:56 2007
New Revision: 499460
URL: http://svn.apache.org/viewvc?view=rev&rev=499460
Log:
No Jira - Simplify process method by eliminating call
to get JFSIndexRepository, since the getAnnotationIndex
method is now a method on the jcas (and cas) directly.
Modified:
incubator/uima/uimaj/trunk/uimaj-examples/src/main/java/org/apache/uima/tutorial/ex4/MeetingAnnotator.java
Modified: incubator/uima/uimaj/trunk/uimaj-examples/src/main/java/org/apache/uima/tutorial/ex4/MeetingAnnotator.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-examples/src/main/java/org/apache/uima/tutorial/ex4/MeetingAnnotator.java?view=diff&rev=499460&r1=499459&r2=499460
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-examples/src/main/java/org/apache/uima/tutorial/ex4/MeetingAnnotator.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-examples/src/main/java/org/apache/uima/tutorial/ex4/MeetingAnnotator.java Wed Jan 24 08:12:56 2007
@@ -26,7 +26,6 @@
import org.apache.uima.analysis_component.JCasAnnotator_ImplBase;
import org.apache.uima.cas.FSIndex;
import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JFSIndexRepository;
import org.apache.uima.resource.ResourceInitializationException;
import org.apache.uima.tutorial.DateAnnot;
import org.apache.uima.tutorial.Meeting;
@@ -58,10 +57,9 @@
*/
public void process(JCas aJCas) {
// get annotation indexes
- JFSIndexRepository indexes = aJCas.getJFSIndexRepository();
- FSIndex roomNumberIndex = indexes.getAnnotationIndex(RoomNumber.type);
- FSIndex dateIndex = indexes.getAnnotationIndex(DateAnnot.type);
- FSIndex timeIndex = indexes.getAnnotationIndex(TimeAnnot.type);
+ FSIndex roomNumberIndex = aJCas.getAnnotationIndex(RoomNumber.type);
+ FSIndex dateIndex = aJCas.getAnnotationIndex(DateAnnot.type);
+ FSIndex timeIndex = aJCas.getAnnotationIndex(TimeAnnot.type);
// store end position of last meeting we identified, to prevent multiple
// annotations over same span