public class Service extends 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(File serviceSpecFile) |
void |
configureAnalysisEngine(File descriptorFile,
File resultSpecXMLFile)
Configure service with a UIMA descriptor.
|
void |
configurePear(File pearFile,
File pearInstallationDir,
File serviceSpecFile)
Configure service with a UIMA PEAR file.
|
static org.apache.uima.util.Logger |
getLogger() |
String |
getServiceDescription()
Delivers the service description as an XML document.
|
ServerSpec |
getServiceSpec() |
String |
getXMLResultXSD()
Gets an XSD for the output format of the service.
|
protected void |
logInitializationError() |
Result |
process(String text) |
Result |
process(String text,
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(File descriptorFile, File resultSpecXMLFile) throws SimpleServerException, IOException, org.apache.xmlbeans.XmlException
descriptorFile
- AE descriptor file.resultSpecXMLFile
- Service specification file.org.apache.xmlbeans.XmlException
- If service spec is not valid XML.IOException
- On I/O problems (file not found etc).SimpleServerException
- Other initialization problems.public void configurePear(File pearFile, File pearInstallationDir, File serviceSpecFile) throws 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.IOException
- On I/O problems (file not found etc).SimpleServerException
- Other initialization problems.protected void configure(File serviceSpecFile) throws IOException, SimpleServerException, org.apache.xmlbeans.XmlException
IOException
SimpleServerException
org.apache.xmlbeans.XmlException
protected final void logInitializationError()
public String getXMLResultXSD()
public Result process(String text, String lang)
public ServerSpec getServiceSpec()
public String getServiceDescription()
Copyright © 2006–2024 The Apache Software Foundation. All rights reserved.