uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yoshinobu KANO" <k...@is.s.u-tokyo.ac.jp>
Subject Removal and addition of FS between views
Date Fri, 13 Jul 2007 09:11:15 GMT

(Excuse me if this is a duplicated post.)
I tried the following code but got error

" is over view "_InitialView" and cannot be added to indexes
associated with the different view "created".
       at org.apache.uima.cas.impl.CASImpl.addFsToIndexes(CASImpl.java:3880)
       at org.apache.uima.jcas.impl.JCasImpl.addFsToIndexes(JCasImpl.java:1076)

I checked the source code of UIMA but it seems that the removal of the
FS was not made properly.

My question is that:
1. Is it impossible to share FeatureStructures between multi-views in
a single CAS?
2. If yes, then remove a FS from a view and add it to another view is
also impossible?



Inside JCasAnnotatorImplBase with the multi-view settings:

 public void process(JCas aJCas) throws AnalysisEngineProcessException {

   TypeSystem typeSystem = aJCas.getTypeSystem();
   try {
     JCas initialView = aJCas.getView("_InitialView");
     JCas createdView = initialView.createView("created");
//      JCas createdView = aJCas.createView("created");

       FSIterator allIndexedFS =
       while (allIndexedFS.hasNext()) {
         TOP top = (TOP) allIndexedFS.next();

// I think it should work without removing...   top.getView() may have
returned illegal handle though it should be removed from indexes
//          top.removeFromIndexes();


   } catch (CASException e) {


Yoshinobu KANO
Tsujii Laboratory, the University of Tokyo

View raw message