public class LeoRemoteAEDescriptor extends Object implements LeoDelegate
Modifier and Type | Class and Description |
---|---|
static class |
LeoRemoteAEDescriptor.Param
Default params for remote service descriptors.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
deleteOnExit
If TRUE then delete the generated descriptor file once the program exits, defaults to TRUE.
|
protected URI |
mDescriptorLocator
Location of the XML representation of this descriptor.
|
protected org.apache.uima.resource.CustomResourceSpecifier |
mRemoteDescriptor
Resource specifier reference object.
|
protected org.apache.uima.resource.Parameter |
name
Parameter object where the name is stored.
|
Constructor and Description |
---|
LeoRemoteAEDescriptor()
Default constructor creates a blank remote service descriptor.
|
LeoRemoteAEDescriptor(org.apache.uima.resource.CustomResourceSpecifier crs)
Initialize with the CustomResourceSpecifier that represents a remote service.
|
LeoRemoteAEDescriptor(String descriptor,
boolean byName,
NameValue... paramValues)
Import an XML descriptor and use it as the model.
|
LeoRemoteAEDescriptor(String brokerURL,
String endPoint)
Create a remote descriptor with the BrokerURL and Endpoint parameters completed.
|
Modifier and Type | Method and Description |
---|---|
LeoRemoteAEDescriptor |
addParameterSetting(String name,
String value)
Add a new parameter to the descriptor.
|
LeoRemoteAEDescriptor |
analysisEngineSection(TransformerHandler thd,
boolean isTopDescriptor)
Produce the Analysis Engine section for the Deployment Descriptor XML.
|
String |
getDescriptorLocator() |
String |
getName()
Get the name of this delegate or null if no name has been set.
|
protected org.apache.uima.resource.Parameter |
getParameterSetting(String name)
Get the Parameter object from the descriptor with the name provided or null if the
parameter is not found in the descriptor.
|
protected String |
getParameterValue(String name)
Get the value of a parameter in the descriptor, returns null if the name is not found in the parameter list.
|
org.apache.uima.resource.CustomResourceSpecifier |
getRemoteDescriptor() |
org.apache.uima.resource.ResourceSpecifier |
getResourceSpecifier()
Return a reference to the internal ResourceSpecifier that is the backend model for the delegate.
|
boolean |
isDeleteOnExit()
Returns TRUE if the generated descriptors will be deleted when the program exits.
|
LeoRemoteAEDescriptor |
setDescriptorLocator(URI descriptorLocator)
Set the location where the descriptor should be generated.
|
LeoRemoteAEDescriptor |
setIsDeleteOnExit(boolean deleteOnExit)
Set the flag to TRUE if generated descriptors should be deleted when the program exits, FALSE to persist them.
|
LeoRemoteAEDescriptor |
setName(String name)
Set the name of this remote service, return a reference to the delegate type object in each implementation.
|
LeoRemoteAEDescriptor |
setParameterSetting(NameValue nameValue)
Set the remote service parameter from the NameValue pair information provided.
|
LeoRemoteAEDescriptor |
setParameterSetting(org.apache.uima.resource.Parameter p)
Set the remote service parameter from the Parameter name and value information.
|
LeoRemoteAEDescriptor |
setParameterSetting(String name,
String value)
Set the remote parameter setting.
|
void |
toXML()
Write the descriptor file out based on the locator information in the object.
|
void |
toXML(String filename)
Write the descriptor out to a temp XML file with the name provided as the base filename.
|
protected URI mDescriptorLocator
protected org.apache.uima.resource.CustomResourceSpecifier mRemoteDescriptor
protected org.apache.uima.resource.Parameter name
protected boolean deleteOnExit
public LeoRemoteAEDescriptor()
Exception
public LeoRemoteAEDescriptor(org.apache.uima.resource.CustomResourceSpecifier crs)
crs
- CustomResourceSpecifier object representing the remote service.public LeoRemoteAEDescriptor(String descriptor, boolean byName, NameValue... paramValues) throws IOException, org.apache.uima.util.InvalidXMLException
descriptor
- String path to the XML descriptor filebyName
- if true then import the descriptor by name rather than a literal pathparamValues
- Optional parameter values to set after initializingIOException
- if there is an error reading the file at the descriptor pathorg.apache.uima.util.InvalidXMLException
- if there is an error parsing the xml of the descriptorpublic org.apache.uima.resource.CustomResourceSpecifier getRemoteDescriptor()
public org.apache.uima.resource.ResourceSpecifier getResourceSpecifier()
getResourceSpecifier
in interface LeoDelegate
public LeoRemoteAEDescriptor setDescriptorLocator(URI descriptorLocator)
setDescriptorLocator
in interface LeoDelegate
descriptorLocator
- URI path where the descriptors should be locatedpublic String getDescriptorLocator()
getDescriptorLocator
in interface LeoDelegate
public String getName()
getName
in interface LeoDelegate
public LeoRemoteAEDescriptor setName(String name)
setName
in interface LeoDelegate
name
- String name of the remote servicepublic boolean isDeleteOnExit()
isDeleteOnExit
in interface LeoDelegate
public LeoRemoteAEDescriptor setIsDeleteOnExit(boolean deleteOnExit)
setIsDeleteOnExit
in interface LeoDelegate
deleteOnExit
- public LeoRemoteAEDescriptor setParameterSetting(String name, String value)
name
- name of the parameter to setvalue
- String value to which the parameter will be setpublic LeoRemoteAEDescriptor setParameterSetting(NameValue nameValue)
nameValue
- NameValue object used to store the parameter name and valuepublic LeoRemoteAEDescriptor setParameterSetting(org.apache.uima.resource.Parameter p)
p
- Parameter object storing the name and value strings to be setpublic LeoRemoteAEDescriptor addParameterSetting(String name, String value)
name
- name of the parameter to add to the descriptorvalue
- string value of the new parameterprotected org.apache.uima.resource.Parameter getParameterSetting(String name)
name
- string name of the parameter to retrieveprotected String getParameterValue(String name)
name
- name of the parameter whose value will be returnedpublic void toXML() throws Exception
LeoDelegate
toXML
in interface LeoDelegate
Exception
- if there is an error serializing the XMLpublic void toXML(String filename) throws Exception
LeoDelegate
toXML
in interface LeoDelegate
filename
- Base filename for the XML fileException
- if there is an error serializing the XMLpublic LeoRemoteAEDescriptor analysisEngineSection(TransformerHandler thd, boolean isTopDescriptor) throws SAXException
analysisEngineSection
in interface LeoDelegate
thd
- TransformerHandler for SAX XML outputisTopDescriptor
- if true then this is the top descriptor in the remote deploymentSAXException
- If there is an error serializing the XMLCopyright © 2018 Department of Veterans Affairs. All Rights Reserved.