NodeList scanNodeList = d.getElementsByTagName("scanconfiglist");
String runName = null;
if (scanNodeList != null && scanNodeList.getLength() > 0) {
Element scanElements = (Element) scanNodeList.item(0);
NodeList runNameNodes = scanElements.getElementsByTagName("item");
ScanProperties prop = null;
if (runNameNodes != null && runNameNodes.getLength() > 0) {
for (int j = 0; j < runNameNodes.getLength(); j++) {
Node child = runNameNodes.item(j);
Element propertyElement = ((Element) child);
runName = propertyElement.getAttribute("key");
prop = new ScanProperties(runName);
NodeList chartNode = propertyElement.getElementsByTagName("chart");
if (chartNode != null && chartNode.getLength() > 0) {
Element chartElement = (Element) chartNode.item(0);
String xmlChart = chartElement.getTextContent();
Node node = XMLUtils.getRootNodeFromFileContent(xmlChart);
prop.setChartProperties(ChartPropertiesXmlManager.loadChartProperties(node));
}
NodeList y1NodeList = propertyElement.getElementsByTagName("y1List");
if (y1NodeList != null && y1NodeList.getLength() > 0) {
prop.setY1AttributeList(getAttributeList((Element) y1NodeList.item(0)));
}
NodeList y2NodeList = propertyElement.getElementsByTagName("y2List");
if (y2NodeList != null && y2NodeList.getLength() > 0) {
prop.setY2AttributeList(getAttributeList((Element) y2NodeList.item(0)));
}
NodeList zNodeList = propertyElement.getElementsByTagName("zList");
if (zNodeList != null && zNodeList.getLength() > 0) {
prop.setZAttributeList(getAttributeList((Element) zNodeList.item(0)));
}
NodeList xNode = propertyElement.getElementsByTagName("xAttribute");
if (xNode != null && xNode.getLength() > 0) {
prop.setXAttribute(((Element) xNode.item(0)).getAttribute("name"));
}
// System.out.println("Load property=" + prop);
UIPreferences.getInstance().addCurrentScanProperties(prop);
}