public boolean addExecInfoNode(ReportInfoNode infoNode) { return getExecInfoNodes().add(infoNode); } }
private void mapNode(ReportNode reportNode, List<MessageNode> visits) throws IOException { List<ReportNode> children; MessageNode messageNode; messageNode = new MessageNode(); messageNode.setNodeId(messageNodeCounter); messageNode.setElementName(reportNode.getElementName()); messageNode.setVisitBefore(true); messageNode.setDepth(reportNode.getDepth()); mapNodeEvents(VisitSequence.BEFORE, reportNode, messageNode); visits.add(messageNode); messageNodeCounter++; children = reportNode.children; for (ReportNode child : children) { mapNode(child, visits); } messageNode = new MessageNode(); messageNode.setNodeId(messageNodeCounter); messageNode.setElementName(reportNode.getElementName()); messageNode.setVisitBefore(false); messageNode.setDepth(reportNode.getDepth()); mapNodeEvents(VisitSequence.AFTER, reportNode, messageNode); visits.add(messageNode); messageNodeCounter++; }
private void processFinishEvent() throws IOException { if(report instanceof DOMReport) { if(report.getProcessings().isEmpty()) { mapMessageNodeVists(report.getProcessings()); } else { mapMessageNodeVists(((DOMReport)report).getSerializations()); mapMessageNodeVists(report.getProcessings()); report.setResults(resultNodes); if(results != null) { for(Result result : results) { if(result != null) { ResultNode resultNode = new ResultNode(); resultNodes.add(resultNode); if(result instanceof JavaResult) { resultNode.setSummary("This Smooks Filtering operation produced a JavaResult. The following is an XML serialization of the JavaResult bean Map entries."); } else if(result instanceof StringResult) { resultNode.setSummary("This Smooks Filtering operation produced the following StreamResult."); } else { resultNode.setSummary("Cannot show Smooks Filtering Result. Modify the code and use a '" + StringResult.class.getName() + "' Result in the call to the Smooks.filter() method."); resultNode.setDetail(result.toString());
private void mapNodeEvents(VisitSequence visitSequence, ReportNode reportNode, MessageNode messageNode) { List<ExecutionEvent> events = reportNode.getElementProcessingEvents(); for (ExecutionEvent event : events) { if (event instanceof ElementVisitEvent) { ElementVisitEvent visitEvent = (ElementVisitEvent) event; if (visitEvent.getSequence() == visitSequence) { ReportInfoNode reportInfoNode = new ReportInfoNode(); ContentHandlerConfigMap configMapping = ((ElementVisitEvent) event).getConfigMapping(); messageNode.addExecInfoNode(reportInfoNode); reportInfoNode.setNodeId(reportInfoNodeCounter); reportInfoNode.setSummary(configMapping.getContentHandler().getClass().getSimpleName() + ": " + visitEvent.getReportSummary()); reportInfoNode.setDetail(visitEvent.getReportDetail()); reportInfoNode.setResourceXML(configMapping.getResourceConfig().toXML()); reportInfoNode.setContextState(visitEvent.getExecutionContextState()); reportInfoNodeCounter++; } } } }
mapMessageNodeVists(((DOMReport)report).getAssemblies()); } else if (domEvent.getDOMEventType() == DOMFilterLifecycleEvent.DOMEventType.SERIALIZATION_STARTED) { mapMessageNodeVists(report.getProcessings()); report = new DOMReport(); } else { report = new Report();
private void mapNodeEvents(VisitSequence visitSequence, ReportNode reportNode, MessageNode messageNode) { List<ExecutionEvent> events = reportNode.getElementProcessingEvents(); for (ExecutionEvent event : events) { if (event instanceof ElementVisitEvent) { ElementVisitEvent visitEvent = (ElementVisitEvent) event; if (visitEvent.getSequence() == visitSequence) { ReportInfoNode reportInfoNode = new ReportInfoNode(); ContentHandlerConfigMap configMapping = ((ElementVisitEvent) event).getConfigMapping(); messageNode.addExecInfoNode(reportInfoNode); reportInfoNode.setNodeId(reportInfoNodeCounter); reportInfoNode.setSummary(configMapping.getContentHandler().getClass().getSimpleName() + ": " + visitEvent.getReportSummary()); reportInfoNode.setDetail(visitEvent.getReportDetail()); reportInfoNode.setResourceXML(configMapping.getResourceConfig().toXML()); reportInfoNode.setContextState(visitEvent.getExecutionContextState()); reportInfoNodeCounter++; } } } }
private void processFinishEvent() throws IOException { if(report instanceof DOMReport) { if(report.getProcessings().isEmpty()) { mapMessageNodeVists(report.getProcessings()); } else { mapMessageNodeVists(((DOMReport)report).getSerializations()); mapMessageNodeVists(report.getProcessings()); report.setResults(resultNodes); if(results != null) { for(Result result : results) { if(result != null) { ResultNode resultNode = new ResultNode(); resultNodes.add(resultNode); if(result instanceof JavaResult) { resultNode.setSummary("This Smooks Filtering operation produced a JavaResult. The following is an XML serialization of the JavaResult bean Map entries."); } else if(result instanceof StringResult) { resultNode.setSummary("This Smooks Filtering operation produced the following StreamResult."); } else { resultNode.setSummary("Cannot show Smooks Filtering Result. Modify the code and use a '" + StringResult.class.getName() + "' Result in the call to the Smooks.filter() method."); resultNode.setDetail(result.toString());
private void mapNode(ReportNode reportNode, List<MessageNode> visits) throws IOException { List<ReportNode> children; MessageNode messageNode; messageNode = new MessageNode(); messageNode.setNodeId(messageNodeCounter); messageNode.setElementName(reportNode.getElementName()); messageNode.setVisitBefore(true); messageNode.setDepth(reportNode.getDepth()); mapNodeEvents(VisitSequence.BEFORE, reportNode, messageNode); visits.add(messageNode); messageNodeCounter++; children = reportNode.children; for (ReportNode child : children) { mapNode(child, visits); } messageNode = new MessageNode(); messageNode.setNodeId(messageNodeCounter); messageNode.setElementName(reportNode.getElementName()); messageNode.setVisitBefore(false); messageNode.setDepth(reportNode.getDepth()); mapNodeEvents(VisitSequence.AFTER, reportNode, messageNode); visits.add(messageNode); messageNodeCounter++; }
mapMessageNodeVists(((DOMReport)report).getAssemblies()); } else if (domEvent.getDOMEventType() == DOMFilterLifecycleEvent.DOMEventType.SERIALIZATION_STARTED) { mapMessageNodeVists(report.getProcessings()); report = new DOMReport(); } else { report = new Report();
public boolean addExecInfoNode(ReportInfoNode infoNode) { return getExecInfoNodes().add(infoNode); } }
private void mapNodeEvents(VisitSequence visitSequence, ReportNode reportNode, MessageNode messageNode) { List<ExecutionEvent> events = reportNode.getElementProcessingEvents(); for (ExecutionEvent event : events) { if (event instanceof ElementVisitEvent) { ElementVisitEvent visitEvent = (ElementVisitEvent) event; if (visitEvent.getSequence() == visitSequence) { ReportInfoNode reportInfoNode = new ReportInfoNode(); ContentHandlerConfigMap configMapping = ((ElementVisitEvent) event).getConfigMapping(); messageNode.addExecInfoNode(reportInfoNode); reportInfoNode.setNodeId(reportInfoNodeCounter); reportInfoNode.setSummary(configMapping.getContentHandler().getClass().getSimpleName() + ": " + visitEvent.getReportSummary()); reportInfoNode.setDetail(visitEvent.getReportDetail()); reportInfoNode.setResourceXML(configMapping.getResourceConfig().toXML()); reportInfoNode.setContextState(visitEvent.getExecutionContextState()); reportInfoNodeCounter++; } } } }
private void processFinishEvent() throws IOException { if(report instanceof DOMReport) { if(report.getProcessings().isEmpty()) { mapMessageNodeVists(report.getProcessings()); } else { mapMessageNodeVists(((DOMReport)report).getSerializations()); mapMessageNodeVists(report.getProcessings()); report.setResults(resultNodes); if(results != null) { for(Result result : results) { if(result != null) { ResultNode resultNode = new ResultNode(); resultNodes.add(resultNode); if(result instanceof JavaResult) { resultNode.setSummary("This Smooks Filtering operation produced a JavaResult. The following is an XML serialization of the JavaResult bean Map entries."); } else if(result instanceof StringResult) { resultNode.setSummary("This Smooks Filtering operation produced the following StreamResult."); } else { resultNode.setSummary("Cannot show Smooks Filtering Result. Modify the code and use a '" + StringResult.class.getName() + "' Result in the call to the Smooks.filter() method."); resultNode.setDetail(result.toString());
private void mapNode(ReportNode reportNode, List<MessageNode> visits) throws IOException { List<ReportNode> children; MessageNode messageNode; messageNode = new MessageNode(); messageNode.setNodeId(messageNodeCounter); messageNode.setElementName(reportNode.getElementName()); messageNode.setVisitBefore(true); messageNode.setDepth(reportNode.getDepth()); mapNodeEvents(VisitSequence.BEFORE, reportNode, messageNode); visits.add(messageNode); messageNodeCounter++; children = reportNode.children; for (ReportNode child : children) { mapNode(child, visits); } messageNode = new MessageNode(); messageNode.setNodeId(messageNodeCounter); messageNode.setElementName(reportNode.getElementName()); messageNode.setVisitBefore(false); messageNode.setDepth(reportNode.getDepth()); mapNodeEvents(VisitSequence.AFTER, reportNode, messageNode); visits.add(messageNode); messageNodeCounter++; }
mapMessageNodeVists(((DOMReport)report).getAssemblies()); } else if (domEvent.getDOMEventType() == DOMFilterLifecycleEvent.DOMEventType.SERIALIZATION_STARTED) { mapMessageNodeVists(report.getProcessings()); report = new DOMReport(); } else { report = new Report();
public boolean addExecInfoNode(ReportInfoNode infoNode) { return getExecInfoNodes().add(infoNode); } }
private void mapNodeEvents(VisitSequence visitSequence, ReportNode reportNode, MessageNode messageNode) { List<ExecutionEvent> events = reportNode.getElementProcessingEvents(); for (ExecutionEvent event : events) { if (event instanceof ElementVisitEvent) { ElementVisitEvent visitEvent = (ElementVisitEvent) event; if (visitEvent.getSequence() == visitSequence) { ReportInfoNode reportInfoNode = new ReportInfoNode(); ContentHandlerConfigMap configMapping = ((ElementVisitEvent) event).getConfigMapping(); messageNode.addExecInfoNode(reportInfoNode); reportInfoNode.setNodeId(reportInfoNodeCounter); reportInfoNode.setSummary(configMapping.getContentHandler().getClass().getSimpleName() + ": " + visitEvent.getReportSummary()); reportInfoNode.setDetail(visitEvent.getReportDetail()); reportInfoNode.setResourceXML(configMapping.getResourceConfig().toXML()); reportInfoNode.setContextState(visitEvent.getExecutionContextState()); reportInfoNodeCounter++; } } } }
private void processFinishEvent() throws IOException { if(report instanceof DOMReport) { if(report.getProcessings().isEmpty()) { mapMessageNodeVists(report.getProcessings()); } else { mapMessageNodeVists(((DOMReport)report).getSerializations()); mapMessageNodeVists(report.getProcessings()); report.setResults(resultNodes); if(results != null) { for(Result result : results) { if(result != null) { ResultNode resultNode = new ResultNode(); resultNodes.add(resultNode); if(result instanceof JavaResult) { resultNode.setSummary("This Smooks Filtering operation produced a JavaResult. The following is an XML serialization of the JavaResult bean Map entries."); } else if(result instanceof StringResult) { resultNode.setSummary("This Smooks Filtering operation produced the following StreamResult."); } else { resultNode.setSummary("Cannot show Smooks Filtering Result. Modify the code and use a '" + StringResult.class.getName() + "' Result in the call to the Smooks.filter() method."); resultNode.setDetail(result.toString());
private void mapNode(ReportNode reportNode, List<MessageNode> visits) throws IOException { List<ReportNode> children; MessageNode messageNode; messageNode = new MessageNode(); messageNode.setNodeId(messageNodeCounter); messageNode.setElementName(reportNode.getElementName()); messageNode.setVisitBefore(true); messageNode.setDepth(reportNode.getDepth()); mapNodeEvents(VisitSequence.BEFORE, reportNode, messageNode); visits.add(messageNode); messageNodeCounter++; children = reportNode.children; for (ReportNode child : children) { mapNode(child, visits); } messageNode = new MessageNode(); messageNode.setNodeId(messageNodeCounter); messageNode.setElementName(reportNode.getElementName()); messageNode.setVisitBefore(false); messageNode.setDepth(reportNode.getDepth()); mapNodeEvents(VisitSequence.AFTER, reportNode, messageNode); visits.add(messageNode); messageNodeCounter++; }
mapMessageNodeVists(((DOMReport)report).getAssemblies()); } else if (domEvent.getDOMEventType() == DOMFilterLifecycleEvent.DOMEventType.SERIALIZATION_STARTED) { mapMessageNodeVists(report.getProcessings()); report = new DOMReport(); } else { report = new Report();
public boolean addExecInfoNode(ReportInfoNode infoNode) { return getExecInfoNodes().add(infoNode); } }