{
Node attribNode;
NodeList attribList;
Element pluginElement;
Element attribElement;
PluginProperties plugin;
HashMap<String, PluginProperties> plugins = new HashMap<String, PluginProperties>();
NodeList pluginList = doc.getElementsByTagName(pluginTag);
for (int pidx = 0; pidx < pluginList.getLength(); pidx++)
{
Node pluginNode = pluginList.item(pidx);
if (pluginNode.getNodeType() == Node.ELEMENT_NODE)
{
pluginElement = (Element) pluginNode;
plugin = new PluginProperties();
plugin.setId(pluginElement.getAttribute(WorkspaceProperties.XML_ATT_ID));
plugin.setModuleClass(pluginElement.getAttribute(WorkspaceProperties.XML_ATT_DRIVER));
attribList = pluginElement.getElementsByTagName(WorkspaceProperties.XML_TAG_PARAMETER);
for (int aidx = 0; aidx < attribList.getLength(); aidx++)
{
attribNode = attribList.item(aidx);
if (attribNode.getNodeType() == Node.ELEMENT_NODE)
{
attribElement = (Element) attribNode;
plugin.setParam(attribElement.getAttribute(WorkspaceProperties.XML_ATT_KEY),
attribElement.getAttribute(WorkspaceProperties.XML_ATT_VALUE));
}
}
plugins.put(plugin.getId(), plugin);
}
}
return plugins;
}