public class InstallationDescriptorHandler
extends org.xml.sax.helpers.DefaultHandler
InstallationDescriptorHandler
class allows parsing XML installation descriptor
files, creating instances of the InstallationDescriptor
class. The
InstallationDescriptorHandler
class also allows to save existing
InstallationDescriptor
objects as XML files.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_TAG |
static java.lang.String |
ARGUMENT_TAG |
static java.lang.String |
CAS_CONSUMER_TAG |
static java.lang.String |
CAS_INITIALIZER_DESC_TAG |
static java.lang.String |
COLLECTION_ITERATOR_DESC_TAG |
static java.lang.String |
COLLECTION_READER_TAG |
static java.lang.String |
COMMENTS_TAG |
static java.lang.String |
DELEGATE_COMPONENT_TAG |
static java.lang.String |
DEPLOYMENT_TAG |
static java.lang.String |
DESC_TAG |
static java.lang.String |
FILE_TAG |
static java.lang.String |
FIND_STRING_TAG |
static java.lang.String |
ID_TAG |
static java.lang.String |
INSTALLATION_TAG |
static java.lang.String |
JDK_VERSION_TAG |
static java.lang.String |
NAME_TAG |
static java.lang.String |
NETWORK_PARAMETERS_TAG |
static java.lang.String |
NETWORK_TAG |
static java.lang.String |
OS_TAG |
static java.lang.String |
PARAMETERS_TAG |
static java.lang.String |
PROCESS_TAG |
static java.lang.String |
REPLACE_WITH_TAG |
static java.lang.String |
ROOT_TAG |
static java.lang.String |
SERVICE_COMMAND_ARGS_TAG |
static java.lang.String |
SERVICE_COMMAND_TAG |
static java.lang.String |
SERVICE_TAG |
static java.lang.String |
SERVICE_WORKING_DIR_TAG |
static java.lang.String |
STANDARD_TAG |
static java.lang.String |
SUBMITTED_COMPONENT_TAG |
static java.lang.String |
TAF_VERSION_TAG |
static java.lang.String |
TOOLKITS_TAG |
static java.lang.String |
UIMA_FRAMEWORK_TAG |
static java.lang.String |
UIMA_VERSION_TAG |
static java.lang.String |
VALUE_TAG |
static java.lang.String |
VAR_NAME_TAG |
static java.lang.String |
VAR_VALUE_TAG |
static java.lang.String |
VERSION_TAG |
protected static java.lang.String |
XML_HEADER |
Constructor and Description |
---|
InstallationDescriptorHandler() |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Receives notification of character data inside an element.
|
void |
endDocument()
Receives notification of the end of the document.
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Receive notification of the end of an element.
|
void |
error(org.xml.sax.SAXParseException ex)
XML parser error handler.
|
void |
fatalError(org.xml.sax.SAXParseException ex)
XML parser fatal error handler.
|
InstallationDescriptor |
getInstallationDescriptor() |
static java.io.InputStream |
getInstallationDescriptorAsStream(InstallationDescriptor insdObject)
Returns the content of the installation descriptor XML file for a given intallation descriptor
object as
InputStream object (for use in Eclipse plug-in). |
void |
parse(java.io.File xmlFile)
Starts parsing a given XML file.
|
void |
parse(java.io.InputStream xmlStream)
Starts parsing XML content from a given input stream.
|
void |
parseInstallationDescriptor(java.util.jar.JarFile pearFile)
Parses XML installation descriptor automatically extracting it from a given PEAR (JAR) file.
|
static void |
printInstallationDescriptor(InstallationDescriptor insdObject,
java.io.PrintWriter oWriter)
Prints a given
InstallationDescriptor object in XML format to a given
PrintWriter . |
void |
saveInstallationDescriptor(java.io.File xmlFile)
Saves created
InstallationDescriptor object to a given XML file. |
static void |
saveInstallationDescriptor(InstallationDescriptor insdObject,
java.io.File xmlFile)
Saves a given
InstallationDescriptor object in a given XML file. |
void |
startDocument()
Receives notification of the beginning of the document.
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Receives notification of the start of an element.
|
void |
warning(org.xml.sax.SAXParseException ex)
XML parser warning handler.
|
protected static final java.lang.String XML_HEADER
public static final java.lang.String ROOT_TAG
public static final java.lang.String OS_TAG
public static final java.lang.String NAME_TAG
public static final java.lang.String VERSION_TAG
public static final java.lang.String TOOLKITS_TAG
public static final java.lang.String JDK_VERSION_TAG
public static final java.lang.String UIMA_FRAMEWORK_TAG
public static final java.lang.String UIMA_VERSION_TAG
public static final java.lang.String TAF_VERSION_TAG
public static final java.lang.String SUBMITTED_COMPONENT_TAG
public static final java.lang.String ID_TAG
public static final java.lang.String DESC_TAG
public static final java.lang.String DEPLOYMENT_TAG
public static final java.lang.String STANDARD_TAG
public static final java.lang.String SERVICE_TAG
public static final java.lang.String NETWORK_TAG
public static final java.lang.String SERVICE_COMMAND_TAG
public static final java.lang.String SERVICE_WORKING_DIR_TAG
public static final java.lang.String SERVICE_COMMAND_ARGS_TAG
public static final java.lang.String ARGUMENT_TAG
public static final java.lang.String VALUE_TAG
public static final java.lang.String NETWORK_PARAMETERS_TAG
public static final java.lang.String COMMENTS_TAG
public static final java.lang.String COLLECTION_READER_TAG
public static final java.lang.String COLLECTION_ITERATOR_DESC_TAG
public static final java.lang.String CAS_INITIALIZER_DESC_TAG
public static final java.lang.String CAS_CONSUMER_TAG
public static final java.lang.String INSTALLATION_TAG
public static final java.lang.String DELEGATE_COMPONENT_TAG
public static final java.lang.String PROCESS_TAG
public static final java.lang.String ACTION_TAG
public static final java.lang.String PARAMETERS_TAG
public static final java.lang.String FILE_TAG
public static final java.lang.String FIND_STRING_TAG
public static final java.lang.String REPLACE_WITH_TAG
public static final java.lang.String VAR_NAME_TAG
public static final java.lang.String VAR_VALUE_TAG
public static java.io.InputStream getInstallationDescriptorAsStream(InstallationDescriptor insdObject) throws java.io.IOException
InputStream
object (for use in Eclipse plug-in).insdObject
- The given intallation descriptor object.InputStream
object that contains the content of the installation
descriptor XML file.java.io.IOException
- if any I/O exception occurred.public static void printInstallationDescriptor(InstallationDescriptor insdObject, java.io.PrintWriter oWriter) throws java.io.IOException
InstallationDescriptor
object in XML format to a given
PrintWriter
.insdObject
- The given InstallationDescriptor
object.oWriter
- The given PrintWriter
object.java.io.IOException
- if any I/O exception occurred.public static void saveInstallationDescriptor(InstallationDescriptor insdObject, java.io.File xmlFile) throws java.io.IOException
InstallationDescriptor
object in a given XML file.insdObject
- The given InstallationDescriptor
object.xmlFile
- The given XML file.java.io.IOException
- if any I/O exception occurred.public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
ch
- The characters.start
- The start position in the character array.length
- The number of characters to use from the character array.org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
uri
- The element URI.localName
- The element type name.qName
- The qualified name of the element.org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.public void error(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void fatalError(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
fatalError
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public InstallationDescriptor getInstallationDescriptor()
InstallationDescriptor
object after the installation descriptor file has
been loaded, or null
, if the file was not loaded.public void parse(java.io.File xmlFile) throws java.io.IOException, org.xml.sax.SAXException
xmlFile
- The given XML file.java.io.IOException
- Any I/O exception.org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.public void parse(java.io.InputStream xmlStream) throws java.io.IOException, org.xml.sax.SAXException
xmlStream
- The given XML input stream.java.io.IOException
- if any I/O exception occurred.org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.public void parseInstallationDescriptor(java.util.jar.JarFile pearFile) throws java.io.IOException, org.xml.sax.SAXException
pearFile
- The given PEAR (JAR) file.java.io.IOException
- if any I/O exception occurred.org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.public void saveInstallationDescriptor(java.io.File xmlFile) throws java.io.IOException
InstallationDescriptor
object to a given XML file.xmlFile
- The given XML file.java.io.IOException
- if any I/O exception occurred.public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
uri
- The element URI.localName
- The element type name.qName
- The qualified name of the element.attributes
- The specified or defaulted attributes.org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.public void warning(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
warning
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
Copyright © 2006–2014 The Apache Software Foundation. All rights reserved.