Class Descriptor
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.apache.uima.adapter.vinci.util.Descriptor
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
public class Descriptor extends org.xml.sax.helpers.DefaultHandler
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
Fields Modifier and Type Field Description private java.lang.String
filterString
The filter string.private int
instanceCount
The instance count.private java.lang.String
namingServiceHost
The naming service host.private java.lang.String
resourceSpecifierPath
The resource specifier path.private int
serverSocketTimeout
The server socket timeout.private java.lang.String
serviceName
The service name.private int
threadPoolMaxSize
The thread pool max size.private int
threadPoolMinSize
The thread pool min size.
-
Constructor Summary
Constructors Constructor Description Descriptor(java.lang.String filePath)
Constructor responsible for parsing the descriptor file named in filePath.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
getAttribute(java.lang.String attrName, org.xml.sax.Attributes attribs)
Gets the attribute.java.lang.String
getFilterString()
Returns the filterString.int
getInstanceCount()
Returns the instanceCount.private java.lang.String
getName(java.lang.String s1, java.lang.String s2)
Gets the name.java.lang.String
getNamingServiceHost()
Gets the naming service host.java.lang.String
getResourceSpecifierPath()
Returns the resourceSpecifierPath.int
getServerSocketTimeout()
Gets the server socket timeout.java.lang.String
getServiceName()
Returns the serviceName.int
getThreadPoolMaxSize()
Gets the thread pool max size.int
getThreadPoolMinSize()
Gets the thread pool min size.private org.w3c.dom.Document
parse(java.lang.String configFile)
Parses the.void
setFilterString(java.lang.String filterString)
Sets the filterString.void
setInstanceCount(int instanceCount)
Sets the instanceCount.void
setNamingServiceHost(java.lang.String namingServiceHost)
Sets the naming service host.void
setResourceSpecifierPath(java.lang.String resourceSpecifierPath)
Sets the resourceSpecifierPath.void
setServerSocketTimeout(int serverSocketTimeout)
Sets the server socket timeout.void
setServiceName(java.lang.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(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.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 Detail
-
serviceName
private java.lang.String serviceName
The service name.
-
instanceCount
private int instanceCount
The instance count.
-
resourceSpecifierPath
private java.lang.String resourceSpecifierPath
The resource specifier path.
-
filterString
private java.lang.String filterString
The filter string.
-
namingServiceHost
private java.lang.String namingServiceHost
The naming service host.
-
serverSocketTimeout
private int serverSocketTimeout
The server socket timeout.
-
threadPoolMinSize
private int threadPoolMinSize
The thread pool min size.
-
threadPoolMaxSize
private int threadPoolMaxSize
The thread pool max size.
-
-
Method Detail
-
parse
private org.w3c.dom.Document parse(java.lang.String configFile)
Parses the.- Parameters:
configFile
- the config file- Returns:
- the document
-
getAttribute
private java.lang.String getAttribute(java.lang.String attrName, org.xml.sax.Attributes attribs)
Gets the attribute.- Parameters:
attrName
- the attr nameattribs
- the attribs- Returns:
- the attribute
-
getName
private java.lang.String getName(java.lang.String s1, java.lang.String s2)
Gets the name.- Parameters:
s1
- the s 1s2
- the s 2- Returns:
- the name
-
startElement
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attribs)
- Specified by:
startElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in classorg.xml.sax.helpers.DefaultHandler
-
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
public java.lang.String getResourceSpecifierPath()
Returns the resourceSpecifierPath.- Returns:
- String
-
getServiceName
public java.lang.String getServiceName()
Returns the serviceName.- Returns:
- String
-
setInstanceCount
public void setInstanceCount(int instanceCount)
Sets the instanceCount.- Parameters:
instanceCount
- The instanceCount to set
-
setResourceSpecifierPath
public void setResourceSpecifierPath(java.lang.String resourceSpecifierPath)
Sets the resourceSpecifierPath.- Parameters:
resourceSpecifierPath
- The resourceSpecifierPath to set
-
setServiceName
public void setServiceName(java.lang.String serviceName)
Sets the serviceName.- Parameters:
serviceName
- The serviceName to set
-
getFilterString
public java.lang.String getFilterString()
Returns the filterString.- Returns:
- String
-
setFilterString
public void setFilterString(java.lang.String filterString)
Sets the filterString.- Parameters:
filterString
- The filterString to set
-
getNamingServiceHost
public java.lang.String getNamingServiceHost()
Gets the naming service host.- Returns:
- the naming service host
-
setNamingServiceHost
public void setNamingServiceHost(java.lang.String namingServiceHost)
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
-
-