Class Descriptor
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.uima.adapter.vinci.util.Descriptor
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
Instance of this class handles parsing of the xml descriptor files. It also retrieves values of
the named attributes of the named elements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The filter string.private int
The instance count.private String
The naming service host.private String
The resource specifier path.private int
The server socket timeout.private String
The service name.private int
The thread pool max size.private int
The thread pool min size. -
Constructor Summary
ConstructorsConstructorDescriptionDescriptor
(String filePath) Constructor responsible for parsing the descriptor file named in filePath. -
Method Summary
Modifier and TypeMethodDescriptionprivate String
getAttribute
(String attrName, Attributes attribs) Gets the attribute.Returns the filterString.int
Returns the instanceCount.private String
Gets the name.Gets the naming service host.Returns the resourceSpecifierPath.int
Gets the server socket timeout.Returns the serviceName.int
Gets the thread pool max size.int
Gets the thread pool min size.private Document
Parses the.void
setFilterString
(String filterString) Sets the filterString.void
setInstanceCount
(int instanceCount) Sets the instanceCount.void
setNamingServiceHost
(String namingServiceHost) Sets the naming service host.void
setResourceSpecifierPath
(String resourceSpecifierPath) Sets the resourceSpecifierPath.void
setServerSocketTimeout
(int serverSocketTimeout) Sets the server socket timeout.void
setServiceName
(String serviceName) Sets the serviceName.void
setThreadPoolMaxSize
(int threadPoolMaxSize) Sets the thread pool max size.void
setThreadPoolMinSize
(int threadPoolMinSize) Sets the thread pool min size.void
startElement
(String uri, String localName, String qName, Attributes attribs) Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
Field Details
-
serviceName
The service name. -
instanceCount
private int instanceCountThe instance count. -
resourceSpecifierPath
The resource specifier path. -
filterString
The filter string. -
namingServiceHost
The naming service host. -
serverSocketTimeout
private int serverSocketTimeoutThe server socket timeout. -
threadPoolMinSize
private int threadPoolMinSizeThe thread pool min size. -
threadPoolMaxSize
private int threadPoolMaxSizeThe thread pool max size.
-
-
Constructor Details
-
Descriptor
Constructor responsible for parsing the descriptor file named in filePath.- Parameters:
filePath
- Fully qualified path the xml descriptor.
-
-
Method Details
-
parse
Parses the.- Parameters:
configFile
- the config file- Returns:
- the document
-
getAttribute
Gets the attribute.- Parameters:
attrName
- the attr nameattribs
- the attribs- Returns:
- the attribute
-
getName
Gets the name.- Parameters:
s1
- the s 1s2
- the s 2- Returns:
- the name
-
startElement
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
-
getThreadPoolMaxSize
public int getThreadPoolMaxSize()Gets the thread pool max size.- Returns:
- the thread pool max size
-
setThreadPoolMaxSize
public void setThreadPoolMaxSize(int threadPoolMaxSize) Sets the thread pool max size.- Parameters:
threadPoolMaxSize
- the new thread pool max size
-
getThreadPoolMinSize
public int getThreadPoolMinSize()Gets the thread pool min size.- Returns:
- the thread pool min size
-
setThreadPoolMinSize
public void setThreadPoolMinSize(int threadPoolMinSize) Sets the thread pool min size.- Parameters:
threadPoolMinSize
- the new thread pool min size
-
getInstanceCount
public int getInstanceCount()Returns the instanceCount.- Returns:
- int
-
getResourceSpecifierPath
Returns the resourceSpecifierPath.- Returns:
- String
-
getServiceName
Returns the serviceName.- Returns:
- String
-
setInstanceCount
public void setInstanceCount(int instanceCount) Sets the instanceCount.- Parameters:
instanceCount
- The instanceCount to set
-
setResourceSpecifierPath
Sets the resourceSpecifierPath.- Parameters:
resourceSpecifierPath
- The resourceSpecifierPath to set
-
setServiceName
Sets the serviceName.- Parameters:
serviceName
- The serviceName to set
-
getFilterString
Returns the filterString.- Returns:
- String
-
setFilterString
Sets the filterString.- Parameters:
filterString
- The filterString to set
-
getNamingServiceHost
Gets the naming service host.- Returns:
- the naming service host
-
setNamingServiceHost
Sets the naming service host.- Parameters:
namingServiceHost
- the new naming service host
-
getServerSocketTimeout
public int getServerSocketTimeout()Gets the server socket timeout.- Returns:
- the server socket timeout
-
setServerSocketTimeout
public void setServerSocketTimeout(int serverSocketTimeout) Sets the server socket timeout.- Parameters:
serverSocketTimeout
- the new server socket timeout
-