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/02/01 15:10:25 UTC

svn commit: r502217 - /incubator/uima/uimaj/trunk/uima-docbooks/src/docbook/tutorials_and_users_guides/annotator_analysis_engine_guide.xml

Author: schor
Date: Thu Feb  1 06:10:24 2007
New Revision: 502217

URL: http://svn.apache.org/viewvc?view=rev&rev=502217
Log:
No Jira - minor update detailing two argument form of getIndex
on the JFSIndexRepository.

Modified:
    incubator/uima/uimaj/trunk/uima-docbooks/src/docbook/tutorials_and_users_guides/annotator_analysis_engine_guide.xml

Modified: incubator/uima/uimaj/trunk/uima-docbooks/src/docbook/tutorials_and_users_guides/annotator_analysis_engine_guide.xml
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uima-docbooks/src/docbook/tutorials_and_users_guides/annotator_analysis_engine_guide.xml?view=diff&rev=502217&r1=502216&r2=502217
==============================================================================
--- incubator/uima/uimaj/trunk/uima-docbooks/src/docbook/tutorials_and_users_guides/annotator_analysis_engine_guide.xml (original)
+++ incubator/uima/uimaj/trunk/uima-docbooks/src/docbook/tutorials_and_users_guides/annotator_analysis_engine_guide.xml Thu Feb  1 06:10:24 2007
@@ -1253,9 +1253,16 @@
         <literal>JCAS.getJFSIndexRepository().getAllIndexedFS(YourClass.type)</literal>, which returns an iterator
         over all instances of <literal>YourClass</literal> in no particular order. This can be useful for types
         that are not subtypes of the built-in Annotation type and which therefore have no default sort order.</para>
+        
       <para>Also, if you've defined your own custom index as described in <olink targetdoc="&uima_docs_ref;"
           targetptr="ugr.ref.xml.component_descriptor.aes.index"/>, you can get an iterator over that
-        specific index by calling <literal>JCAS.getJFSIndexRepository().getIndex(label)</literal>.</para></note>
+        specific index by calling <literal>aJCas.getJFSIndexRepository().getIndex(label)</literal>.
+        The <literal>getIndex(...)</literal> method has also a 2 argument form; the second argument, 
+      if used, specialized the index to subtype of the type the index was declared to index.  For instance,
+      if you defined an index called "allEvents" over the type <literal>Event</literal>, and wanted 
+      to get an index over just a particular subtype of event, say, <literal>TimeEvent</literal>,
+      you can ask for that index using 
+        <literal>aJCas.getJFSIndexRepository().getIndex("allEvents", TimeEvent.type)</literal>.</para></note>
       
       <para>Now that we&apos;ve explained the basics, let&apos;s take a look at the process method for
         <literal>org.apache.uima.tutorial.ex4.MeetingAnnotator</literal>. Since we&apos;re looking for a