I have an upstream Java AE putting annotations in the CAS of type, say,
com.my.Foo.

In a downstream C++ annotator, one can get such annotations as instances
of AnnotationFS in C++ but not the as the specific type Foo.

My C++ process() code is along these lines ...

    CAS* pMyView = cas.getView( "MyView");

    if ( pMyView)
        {
        ANIndex fooIndex = pAudioView->getAnnotationIndex( m_fooType);

        if ( !fooIndex.isValid())
        {
            m_pAnnotatorContext->getLogger().logError( "Error getting
Foo index");
            return (TyErrorId) UIMA_ERR_RESMGR_INVALID_RESOURCE;
        }

        AnnotationFS foo = fooIndex.iterator().get();

        if ( !foo.isValid())
        {
            m_pAnnotatorContext->getLogger().logError( "Error getting
Foo FS");
            return (TyErrorId) UIMA_ERR_RESMGR_INVALID_RESOURCE;
        }

        // Problem: How to get Foo specific fields out of foo when it's
just an AnnotationFS?
        }

Observing that there is nothing like a JCasGen for producing C++ header
files for types, then there must be some other way of accessing the
annotations in C++.  Looking through the examples though gives me no
joy.

Could the list please enlighten me on this aspect of UIMA C++.

Thanks
Justin

IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


Reply via email to