yes, thank you I think a combination of the two last answers were right.
but now i'm facing another problem
package org.apache.uima.al;
import org.apache.uima.UIMAFramework;
import org.apache.uima.collection.CollectionProcessingEngine;
import org.apache.uima.collection.metadata.CpeDescription;
import org.apache.uima.util.*;
import org.apache.uima.collection.StatusCallbackListener;
public class RunAlexsys {
void RunAlexSys(){
XMLInputSource in = new XMLInputSource("MyDescriptor.xml");
CpeDescription cpeDesc =
UIMAFramework.getXMLParser().parseCpeDescription(in);
//instantiate CPE
CollectionProcessingEngine mCPE =
UIMAFramework.produceCollectionProcessingEngine(cpeDesc);
//Create and register a Status Callback Listener
mCPE.addStatusCallbackListener(new StatusCallbackListenerImpl());
//Start Processing
mCPE.process();
}
}
in mCPE.addStatusCallbackListener(new StatusCallbackListenerImpl());
What is the role of this line exactely ?
Rad
2010/1/14 LeHouillier, Frank D <[email protected]>
> Maybe you need to be using a org.apache.uima.util.XMLInputSource instead of
> a
> com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource
> ________________________________________
> From: Radwen ANIBA [[email protected]]
> Sent: Thursday, January 14, 2010 9:34 AM
> To: [email protected]
> Subject: Re: Calling CPE from a java application
>
> No I verified that, here is the code
>
> package org.apache.uima.al;
>
> import org.apache.uima.UIMAFramework;
> import org.apache.uima.collection.CollectionProcessingEngine;
> import org.apache.uima.collection.metadata.CpeDescription;
> import org.apache.uima.util.*;
> import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
>
> public class RunAlexsys {
>
>
>
>
> CpeDescription cpeDesc =
> UIMAFramework.getXMLParser().parseCpeDescription(new
> XMLInputSource("filename"));
>
> //instantiate CPE
> mCPE = UIMAFramework.produceCollectionProcessingEngine(cpeDesc);
>
> //Create and register a Status Callback Listener
> mCPE.addStatusCallbackListener(new StatusCallbackListenerImpl());
>
> //Start Processing
> mCPE.process();
>
>
>
> }
>
>
>
>
> 2010/1/14 Jörn Kottmann <[email protected]>
>
> > Radwen ANIBA wrote:
> >
> >> I dont really get error since I dont run the application yet but in
> >> eclipse
> >> it is marked with red cross telling me that's wrong and proposing me to
> >> change the parseCpeDescription !!
> >>
> >>
> >>
> > There is usually an error message attached to the error marker
> > in eclipse. In your case it will contain the reason why it cannot
> > compile the class.
> >
> > Maybe you are missing an import for CpeDescription, UIMAFramework,
> > XMLInputSource ?
> >
> > Jörn
> >
>