in uimaj-core/src/main/java/org/apache/uima/pear/tools/InstallationDescriptorHandler.java [450:554]
public void endElement(String uri, String localName, String qName) throws SAXException {
String elemValue = _activeBuffer.toString().trim();
if (OS_TAG.equals(_activeSection)) {
if (localName.equalsIgnoreCase(OS_TAG))
_activeSection = "";
else
_insdObject.addOSSpec(localName, elemValue);
} else if (TOOLKITS_TAG.equals(_activeSection)) {
if (localName.equalsIgnoreCase(TOOLKITS_TAG))
_activeSection = "";
else
_insdObject.addToolkitsSpec(localName, elemValue);
} else if (UIMA_FRAMEWORK_TAG.equals(_activeSection)) {
if (localName.equalsIgnoreCase(UIMA_FRAMEWORK_TAG))
_activeSection = "";
else
_insdObject.addFrameworkSpec(localName, elemValue);
} else if (SUBMITTED_COMPONENT_TAG.equals(_activeSection)) {
if (localName.equalsIgnoreCase(SUBMITTED_COMPONENT_TAG)) {
_activeSection = "";
if (_activeService != null)
_insdObject.setMainComponentService(_activeService);
_activeService = null;
} else if (localName.equalsIgnoreCase(SERVICE_COMMAND_ARGS_TAG))
_activeSubSection = "";
else if (localName.equalsIgnoreCase(COLLECTION_READER_TAG))
_activeSubSection = "";
else if (localName.equalsIgnoreCase(CAS_CONSUMER_TAG))
_activeSubSection = "";
else if (localName.equalsIgnoreCase(ID_TAG)) {
_activeComponentId = elemValue;
_insdObject.setMainComponent(_activeComponentId, "");
_activeService = new InstallationDescriptor.ServiceInfo();
} else if (localName.equalsIgnoreCase(NAME_TAG)) {
if (_activeComponentId != null) {
_insdObject.setMainComponentName(elemValue);
_activeComponentId = null;
}
} else if (localName.equalsIgnoreCase(DESC_TAG)) {
if (CAS_CONSUMER_TAG.equals(_activeSubSection))
_insdObject.setMainCasConsumerDesc(elemValue);
else
_insdObject.setMainComponentDesc(elemValue);
} else if (localName.equalsIgnoreCase(DEPLOYMENT_TAG)) {
_insdObject.setMainComponentDeployment(elemValue);
} else if (localName.equalsIgnoreCase(SERVICE_COMMAND_TAG)) {
if (_activeService != null)
_activeService.command = elemValue;
} else if (localName.equalsIgnoreCase(SERVICE_WORKING_DIR_TAG)) {
if (_activeService != null)
_activeService.workingDirPath = elemValue;
} else if (localName.equalsIgnoreCase(VALUE_TAG)) {
if (SERVICE_COMMAND_ARGS_TAG.equals(_activeSubSection) && _activeArg != null)
_activeArg.value = elemValue;
} else if (localName.equalsIgnoreCase(ARGUMENT_TAG)) {
if (SERVICE_COMMAND_ARGS_TAG.equals(_activeSubSection) && _activeService != null
&& _activeArg != null && _activeArg.value != null && _activeArg.value.length() > 0)
_activeService.addArg(_activeArg);
_activeArg = null;
} else if (localName.equalsIgnoreCase(NETWORK_PARAMETERS_TAG)) {
if (NETWORK_PARAMETERS_TAG.equals(_activeSubSection))
_activeSubSection = "";
} else if (localName.equalsIgnoreCase(COMMENTS_TAG)) {
if (SERVICE_COMMAND_ARGS_TAG.equals(_activeSubSection)) {
if (_activeArg != null)
_activeArg.comments = elemValue;
} else
_insdObject.setMainComponentProperty(COMMENTS_TAG, elemValue);
} else if (localName.equalsIgnoreCase(COLLECTION_ITERATOR_DESC_TAG)) {
_insdObject.setMainCollIteratorDesc(elemValue);
} else if (localName.equalsIgnoreCase(CAS_INITIALIZER_DESC_TAG)) {
_insdObject.setMainCasInitializerDesc(elemValue);
} else
_insdObject.setMainComponentProperty(localName, elemValue);
} else if (INSTALLATION_TAG.equals(_activeSection)) {
if (localName.equalsIgnoreCase(INSTALLATION_TAG))
_activeSection = "";
else if (localName.equalsIgnoreCase(DELEGATE_COMPONENT_TAG))
_activeSubSection = "";
else if (localName.equalsIgnoreCase(PROCESS_TAG)) {
if (_activeAction != null) {
_insdObject.addInstallationAction(_activeAction);
_activeAction = null;
}
_activeSubSection = "";
} else if (localName.equalsIgnoreCase(PARAMETERS_TAG)) {
// do nothing
} else if (localName.equalsIgnoreCase(ID_TAG)) {
_activeComponentId = elemValue;
} else if (localName.equalsIgnoreCase(NAME_TAG)) {
if (DELEGATE_COMPONENT_TAG.equals(_activeSubSection)) {
if (_activeComponentId != null) {
_insdObject.addDelegateComponent(_activeComponentId, elemValue);
_activeComponentId = null;
}
}
} else if (localName.equalsIgnoreCase(ACTION_TAG)) {
if (PROCESS_TAG.equals(_activeSubSection))
_activeAction = new InstallationDescriptor.ActionInfo(elemValue);
} else {
if (_activeAction != null)
_activeAction.params.setProperty(localName, elemValue);
}
}
}