public void add(String name, String value) { ReportDTO ur = new ReportDTO(name, value); reportDTOs.add(ur); }
public void report(Map <String, String> map, String nameSuffix) { for (String name : map.keySet()) { String value = map.get(name); ReportDTO r = new ReportDTO(name + nameSuffix, value); reportDTOs.add(r); } }
public void report(Map <String, String> map) { if (map == null) return; for (String name : map.keySet()) { String value = map.get(name); ReportDTO r = new ReportDTO(name, value); reportDTOs.add(r); } }
void reportStepParameters() { logger.info("generating linkageAsReports"); if (reportManager == null) reportManager = new ReportManager(testConfig); Map<String, String> params = getStep().getPlan().getExtraLinkage(); logger.info("transaction: " + params); for (String name : params.keySet()) { String value = params.get(name); ReportDTO reportDTO = new ReportDTO(name, value); logger.info("adding ReportDTO " + reportDTO); reportManager.addReport(reportDTO); logger.info("ReportBuilder manager has " + reportManager.toString()); } }
private void parseReports() { // See Issue #418 Duplicate UseReports/Reports in Conformance tool Section/Step UI (Test log.xml file contains singular values though). // without use of the map we get duplicates because of the Assertions // section of the log.xml file format // Map<String, String> map = new HashMap<>(); for (OMElement ele : XmlUtil.decendentsWithLocalName(root, "Report")) { String name = ele.getAttributeValue(nameQname); String value = ele.getText(); c.getReportsSummary().add(name + " = " + value); c.addReportDTO(new ReportDTO(name, value)); // map.put(name, value); } // for(String key : map.keySet()) { // c.getReportsSummary().add(key + " = " + map.get(key)); // c.addReportDTO(new ReportDTO(key, map.get(key))); // } }
public void addReport(OMElement r) { ReportDTO reportDTO = new ReportDTO(); reportDTO.setName(r.getAttributeValue(new QName("name"))); reportDTO.setSection(r.getAttributeValue(new QName("section"))); reportDTO.setXpath(r.getText()); reportDTO.setEscapedCharsInXml(r.getAttributeValue(new QName("escapedCharsInXml"))); addReport(reportDTO); }
@Override protected void run(OMElement request) throws Exception { PlanContext planContext = s_ctx.getPlan(); Map<String, String> params = planContext.getExtraLinkage(); for (String name : params.keySet()) { ReportDTO report = new ReportDTO(); report.setName(name); report.setValue(params.get(name)); getReportManager().addReport(report); } reportManagerPostRun(); }
static public ReportDTO parse(OMElement rep) throws XdsInternalException { ReportDTO r = new ReportDTO(); r.setName(rep.getAttributeValue(name_qname)); r.setValue(rep.toString()); // Was: r.setValue(rep.getText()); -- This caused &amp; to be dropped out and appear simply as & Which caused wstxlazyexception unexpected character error. if (r.getName() == null || r.getName().equals("")) throw new XdsInternalException("Cannot parse Report: " + rep.toString()); return r; }
private void prsSameKOSDcm(AssertionEngine engine, Assertion a, OMElement assertion_output) throws XdsInternalException { try { // pfn of std KON.dcm String pfn = a.xpath.trim(); String stdDcmPfn = Paths.get(testConfig.testplanDir.getAbsolutePath(), pfn).toString(); SimulatorTransaction simulatorTransaction = getSimulatorTransaction(a); simulatorTransaction.setStdPfn(stdDcmPfn); // load sop instance uid from test kos for later comparison String tstKOSPfn = simulatorTransaction.getPfns().get(0); DicomInputStream din = new DicomInputStream(new File(tstKOSPfn)); Attributes at = din.readDataset(-1, Tag.PixelData); String siu = at.getString(Tag.SOPInstanceUID); reportManager.addReport(new ReportDTO("SOPInstanceUID", siu)); din.close(); TestRAD68 testInstance = new TestRAD68(); testInstance.initializeTest(a.process, simulatorTransaction); testInstance.runTest(); Results results = testInstance.getResults(a.process); String rep = results.toString(); CAT cat = CAT.SUCCESS; if (results.getErrorCount() > 0) cat = CAT.ERROR; store(engine, cat, rep); reportManagerPostRun(); } catch (Exception e) { e.printStackTrace(); throw new XdsInternalException("ImgDetailTransaction - sameKOSDcm: " + e.getMessage()); } }