![JAR search and dependency download from the Maven repository](/logo.png)
org.opencds.cqf.cql.engine.debug.DebugResult Maven / Gradle / Ivy
package org.opencds.cqf.cql.engine.debug;
import org.cqframework.cql.elm.execution.Library;
import org.opencds.cqf.cql.engine.elm.execution.Executable;
import java.util.HashMap;
import java.util.Map;
public class DebugResult {
private Map libraryResults;
public DebugResult() {
libraryResults = new HashMap();
}
public void logDebugResult(Executable node, Library currentLibrary, Object result, DebugAction action) {
try {
DebugLibraryResultEntry libraryResultEntry = libraryResults.get(currentLibrary.getIdentifier().getId());
if (libraryResultEntry == null) {
libraryResultEntry = new DebugLibraryResultEntry(currentLibrary.getIdentifier().getId());
libraryResults.put(libraryResultEntry.getLibraryName(), libraryResultEntry);
}
if (libraryResultEntry != null) {
libraryResultEntry.logDebugResultEntry(node, result);
}
if (action == DebugAction.LOG) {
DebugUtilities.logDebugResult(node, currentLibrary, result);
}
}
catch (Exception e) {
// do nothing, an exception logging debug helps no one
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy