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 StringThe filter string.private intThe instance count.private StringThe naming service host.private StringThe resource specifier path.private intThe server socket timeout.private StringThe service name.private intThe thread pool max size.private intThe thread pool min size. -
Constructor Summary
ConstructorsConstructorDescriptionDescriptor(String filePath) Constructor responsible for parsing the descriptor file named in filePath. -
Method Summary
Modifier and TypeMethodDescriptionprivate StringgetAttribute(String attrName, Attributes attribs) Gets the attribute.Returns the filterString.intReturns the instanceCount.private StringGets the name.Gets the naming service host.Returns the resourceSpecifierPath.intGets the server socket timeout.Returns the serviceName.intGets the thread pool max size.intGets the thread pool min size.private DocumentParses the.voidsetFilterString(String filterString) Sets the filterString.voidsetInstanceCount(int instanceCount) Sets the instanceCount.voidsetNamingServiceHost(String namingServiceHost) Sets the naming service host.voidsetResourceSpecifierPath(String resourceSpecifierPath) Sets the resourceSpecifierPath.voidsetServerSocketTimeout(int serverSocketTimeout) Sets the server socket timeout.voidsetServiceName(String serviceName) Sets the serviceName.voidsetThreadPoolMaxSize(int threadPoolMaxSize) Sets the thread pool max size.voidsetThreadPoolMinSize(int threadPoolMinSize) Sets the thread pool min size.voidstartElement(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:
startElementin interfaceContentHandler- Overrides:
startElementin 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
-