Package org.apache.uima.uimacpp
Class UimacppEngine
- java.lang.Object
-
- org.apache.uima.uimacpp.UimacppEngine
-
public class UimacppEngine extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description UimacppEngine()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbatchProcessComplete()batchProcessCompletevoidcollectionProcessComplete()CasConsumer collectionProcessCompletestatic voidconfigureResourceManager(java.lang.String workDirectory, java.lang.String dataDirectory)Configure the TAF Resource Manager.static UimacppEnginecreateJTafTAE(java.lang.String configFile)create a TAF engine with a config filevoiddestroy()de-initializes the TAF engine.protected voidfinalize()static java.lang.StringgetErrorMessage(long errorCode)helper function to get the error message for some TAF error ID.static java.lang.StringgetTafJNIVersion()helper function to get the TAF JNI version.booleanhasNext()hasNextvoidnext(CAS segment)nextvoidprocess(ResultSpecification rs, CAS aCas, boolean casIsEmpty)process the document.
-
-
-
Constructor Detail
-
UimacppEngine
public UimacppEngine() throws UimacppException- Throws:
UimacppException
-
-
Method Detail
-
configureResourceManager
public static void configureResourceManager(java.lang.String workDirectory, java.lang.String dataDirectory) throws UimacppExceptionConfigure the TAF Resource Manager.- Parameters:
workDirectory- the work directorydataDirectory- the data directory- Throws:
UimacppException- wraps any exception
-
createJTafTAE
public static UimacppEngine createJTafTAE(java.lang.String configFile) throws UimacppException
create a TAF engine with a config file- Parameters:
configFile- the configuration file used for initialization- Returns:
- a UimacppEngine
- Throws:
UimacppException- pass thru
-
destroy
public void destroy() throws UimacppExceptionde-initializes the TAF engine.- Throws:
UimacppException- wraps any exception
-
process
public void process(ResultSpecification rs, CAS aCas, boolean casIsEmpty) throws UimacppException
process the document.- Parameters:
rs- the result specificationaCas- the CAScasIsEmpty- tbd- Throws:
UimacppException- wraps any exception
-
hasNext
public boolean hasNext() throws UimacppExceptionhasNext- Returns:
- true if there's a next element
- Throws:
UimacppException- wraps any exception
-
next
public void next(CAS segment) throws UimacppException
next- Parameters:
segment- tbd- Throws:
UimacppException- wraps any exception
-
batchProcessComplete
public void batchProcessComplete() throws UimacppExceptionbatchProcessComplete- Throws:
UimacppException- wraps any exception
-
collectionProcessComplete
public void collectionProcessComplete() throws UimacppExceptionCasConsumer collectionProcessComplete- Throws:
UimacppException- wraps any exception
-
getErrorMessage
public static java.lang.String getErrorMessage(long errorCode) throws UimacppExceptionhelper function to get the error message for some TAF error ID.- Parameters:
errorCode- the code used as the key to look up the error message- Returns:
- the error message
- Throws:
UimacppException- wraps any exception
-
getTafJNIVersion
public static java.lang.String getTafJNIVersion() throws UimacppExceptionhelper function to get the TAF JNI version.- Returns:
- Taf JNI Version
- Throws:
UimacppException- wraps any exception
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
-