public class Service
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.uima.cas.CAS |
cas |
protected boolean |
initialized |
protected ResultExtractor |
resultExtractor |
protected ServerSpec |
serviceSpec |
| Constructor and Description |
|---|
Service()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure(java.io.File serviceSpecFile) |
void |
configureAnalysisEngine(java.io.File descriptorFile,
java.io.File resultSpecXMLFile)
Configure service with a UIMA descriptor.
|
void |
configurePear(java.io.File pearFile,
java.io.File pearInstallationDir,
java.io.File serviceSpecFile)
Configure service with a UIMA PEAR file.
|
static org.apache.uima.util.Logger |
getLogger() |
java.lang.String |
getServiceDescription()
Delivers the service description as an XML document.
|
ServerSpec |
getServiceSpec() |
java.lang.String |
getXMLResultXSD()
Gets an XSD for the output format of the service.
|
protected void |
logInitializationError() |
Result |
process(java.lang.String text) |
Result |
process(java.lang.String text,
java.lang.String lang)
Calls the services analysis engine on the input text, filters and produces the result.
|
protected org.apache.uima.cas.CAS cas
protected ServerSpec serviceSpec
protected ResultExtractor resultExtractor
protected volatile boolean initialized
public static org.apache.uima.util.Logger getLogger()
public void configureAnalysisEngine(java.io.File descriptorFile,
java.io.File resultSpecXMLFile)
throws SimpleServerException,
java.io.IOException,
org.apache.xmlbeans.XmlException
descriptorFile - AE descriptor file.resultSpecXMLFile - Service specification file.org.apache.xmlbeans.XmlException - If service spec is not valid XML.java.io.IOException - On I/O problems (file not found etc).SimpleServerException - Other initialization problems.public void configurePear(java.io.File pearFile,
java.io.File pearInstallationDir,
java.io.File serviceSpecFile)
throws java.io.IOException,
SimpleServerException,
org.apache.xmlbeans.XmlException
pearFile - The PEAR file.pearInstallationDir - The installation directory for the PEAR.serviceSpecFile - Service specification file.org.apache.xmlbeans.XmlException - If service spec is not valid XML.java.io.IOException - On I/O problems (file not found etc).SimpleServerException - Other initialization problems.protected void configure(java.io.File serviceSpecFile)
throws java.io.IOException,
SimpleServerException,
org.apache.xmlbeans.XmlException
java.io.IOExceptionSimpleServerExceptionorg.apache.xmlbeans.XmlExceptionprotected final void logInitializationError()
public java.lang.String getXMLResultXSD()
public Result process(java.lang.String text, java.lang.String lang)
public Result process(java.lang.String text)
public ServerSpec getServiceSpec()
public java.lang.String getServiceDescription()
Copyright © 2013. All Rights Reserved.