Hello,

using JCas doesn't work here because the UIMA Runtime doesn't import your
JCas class.

To get things working you can do two things:
- Do not use JCas, you can do all operations with the CAS API
- Fix the imports in the UIMA Runtime OSGI Manifest and
  only use the modified bundle

HTH,
Jörn

On 09/20/2012 04:40 PM, Sergeant, Alan wrote:
Hi,
I am trying to extend the Cas editor with my own custom view as in the 
documentation in chapter 7.4. But I run into problems when using the JCas.

My code is as follows:

JCas jcas = cas.getJCas();

               AnnotationIndex<Annotation> fsIndex = 
jcas.getAnnotationIndex(Proposition.type);
               FSIterator<Annotation> fsIter = fsIndex.iterator();

               while (fsIter.hasNext()) {
                      Proposition p = (Proposition)fsIter.next();
                      props.add(p);
               }

               return props;

The error is:

org.apache.uima.cas.CASRuntimeException: The JCAS cover class 
"com.sap.ta.research.argumentation.Proposition_Type" could not be loaded.
        at org.apache.uima.jcas.impl.JCasImpl.getType(JCasImpl.java:417)
        at org.apache.uima.jcas.impl.JCasImpl.getCasType(JCasImpl.java:436)
        at 
org.apache.uima.jcas.impl.JCasImpl.getAnnotationIndex(JCasImpl.java:1531)
        at 
org.apache.uima.caseditor.editor.argumentation.ArgumentationZest.getPropositions(ArgumentationZest.java:194)
        at 
org.apache.uima.caseditor.editor.argumentation.ArgumentationZest.createControl(ArgumentationZest.java:142)
        at 
org.apache.uima.caseditor.editor.CasEditorViewPage.initializeAndShowPage(CasEditorViewPage.java:145)
        at 
org.apache.uima.caseditor.editor.CasEditorViewPage.setCASViewPage(CasEditorViewPage.java:184)
        at 
org.apache.uima.caseditor.editor.CasEditorView.createViewPage(CasEditorView.java:102)
        at 
org.apache.uima.caseditor.editor.CasEditorView.doCreatePage(CasEditorView.java:164)

Can anyone offer advice?

Alan


Reply via email to