// Path: framework/src/com/ibm/datapower/er/Analytics/AnalyticsProcessor.java
// public enum PRINT_MET_CONDITIONS {
// 	HIDEALL, HIDEDEFAULT, SHOWALL
// }
// 
// Path: framework/src/com/ibm/datapower/er/Analytics/ConditionsNode.java
// public enum LogLevelType {
// 	INFO, WARNING, ERROR, CRITICAL
// }


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.StringWriter;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.*;
import com.ibm.datapower.er.Analytics.AnalyticsProcessor.PRINT_MET_CONDITIONS;
import com.ibm.datapower.er.Analytics.ConditionsNode.LogLevelType;
			e.printStackTrace();
		}
	}

	private static ArrayList<ConditionsNode> reorderMetConditions(AnalyticsProcessor analytics, String outFile,
			ArrayList<ConditionsNode> inNodes) {
		ArrayList<ConditionsNode> overrideList = new ArrayList<ConditionsNode>();

		// general categories
		ArrayList<ConditionsNode> infoList = new ArrayList<ConditionsNode>();
		ArrayList<ConditionsNode> warnList = new ArrayList<ConditionsNode>();
		ArrayList<ConditionsNode> errorList = new ArrayList<ConditionsNode>();
		ArrayList<ConditionsNode> criticalList = new ArrayList<ConditionsNode>();
		for (int i = 0; i < inNodes.size(); i++) {
			ConditionsNode node = inNodes.get(i);

			if (node.getPopupFileName().length() > 0) {
				File file = new File(outFile);
				File parentDir = file.getParentFile(); // get parent dir
				String dir = parentDir.getPath();
				if (dir.contains(":\\"))
					dir += "\\";
				else
					dir += "/";

				CreateSubFile(analytics, dir, node.getPopupFileName());
			}

			if (node.isTopCondition())
				overrideList.add(node);
// Path: framework/src/com/ibm/datapower/er/Analytics/AnalyticsProcessor.java
// public enum PRINT_MET_CONDITIONS {
// 	HIDEALL, HIDEDEFAULT, SHOWALL
// }
// 
// Path: framework/src/com/ibm/datapower/er/Analytics/ConditionsNode.java
// public enum LogLevelType {
// 	INFO, WARNING, ERROR, CRITICAL
// }


// Path: framework/src/com/ibm/datapower/er/Analytics/AnalyticsResults.java
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.StringWriter;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.*;
import com.ibm.datapower.er.Analytics.AnalyticsProcessor.PRINT_MET_CONDITIONS;
import com.ibm.datapower.er.Analytics.ConditionsNode.LogLevelType;

			e.printStackTrace();
		}
	}

	private static ArrayList<ConditionsNode> reorderMetConditions(AnalyticsProcessor analytics, String outFile,
			ArrayList<ConditionsNode> inNodes) {
		ArrayList<ConditionsNode> overrideList = new ArrayList<ConditionsNode>();

		// general categories
		ArrayList<ConditionsNode> infoList = new ArrayList<ConditionsNode>();
		ArrayList<ConditionsNode> warnList = new ArrayList<ConditionsNode>();
		ArrayList<ConditionsNode> errorList = new ArrayList<ConditionsNode>();
		ArrayList<ConditionsNode> criticalList = new ArrayList<ConditionsNode>();
		for (int i = 0; i < inNodes.size(); i++) {
			ConditionsNode node = inNodes.get(i);

			if (node.getPopupFileName().length() > 0) {
				File file = new File(outFile);
				File parentDir = file.getParentFile(); // get parent dir
				String dir = parentDir.getPath();
				if (dir.contains(":\\"))
					dir += "\\";
				else
					dir += "/";

				CreateSubFile(analytics, dir, node.getPopupFileName());
			}

			if (node.isTopCondition())
				overrideList.add(node);
			else if (node.getLogLevel() == LogLevelType.INFO)