Class XMLResultsWriter
java.lang.Object
common.xml.XMLResultsWriter
- All Implemented Interfaces:
XMLResultsConstants
Title: XML Results Writer
Description: Writes calculated measures to an XML file along with temporary values. This class provide methods used to store all simulation results with model definition.
- Author:
- Bertoli Marco Date: 3-ott-2005 Time: 10.36.30
-
Field Summary
Fields inherited from interface XMLResultsConstants
XML_A_LAST_INTERVAL_AVG_VALUE, XML_A_MEASURE_ALPHA, XML_A_MEASURE_CLASS, XML_A_MEASURE_DISCARDEDSAMPLES, XML_A_MEASURE_FINALVALUE, XML_A_MEASURE_ISSERVERTYPE, XML_A_MEASURE_LOG, XML_A_MEASURE_NAME, XML_A_MEASURE_NODETYPE, XML_A_MEASURE_PRECISION, XML_A_MEASURE_SAMPLES, XML_A_MEASURE_STATE, XML_A_MEASURE_STATION, XML_A_MEASURE_TYPE, XML_A_ROOT_ELAPSED, XML_A_ROOT_LOG_DECIMAL_SEP, XML_A_ROOT_LOG_DELIMITER, XML_A_ROOT_LOG_PATH, XML_A_ROOT_O_METHOD, XML_A_ROOT_O_MODELPATH, XML_A_ROOT_POLLING, XML_A_SAMPLE_LOWERBOUND, XML_A_SAMPLE_MEAN, XML_A_SAMPLE_UPPERBOUND, XML_A_SAMPLE_VALIDITY, XML_A_TIME, XML_AO_MEASURE_ALPHA, XML_AO_MEASURE_CLASS, XML_AO_MEASURE_DISCARDEDSAMPLES, XML_AO_MEASURE_LOWER, XML_AO_MEASURE_MAXSAMPLES, XML_AO_MEASURE_MEAN, XML_AO_MEASURE_NODETYPE, XML_AO_MEASURE_PRECISION, XML_AO_MEASURE_SAMPLES, XML_AO_MEASURE_SERVER_TYPE, XML_AO_MEASURE_STATION, XML_AO_MEASURE_SUCCESSFUL, XML_AO_MEASURE_TYPE, XML_AO_MEASURE_UPPER, XML_DOCUMENT_O_ROOT, XML_DOCUMENT_O_XSD, XML_DOCUMENT_ROOT, XML_DOCUMENT_XSD, XML_E_MEASURE, XML_E_SAMPLE, XML_EO_MEASURE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentgetDocument(MeasureDefinition measure) Returns the entire Document representing results data structure.protected static voidwriteMeasures(Document doc, Node resultsNode, MeasureDefinition measure) Write measures informationprotected static voidwriteResults(Document resultsDoc, MeasureDefinition measure) Creates root element and adds schema informations to itprotected static voidwriteSamples(Document doc, Node measureNode, MeasureDefinition measure, int measureIndex, boolean parametric) Writes all samples for a given measure Modified by Francesco D'Aquinostatic voidwriteXML(File xmlFile, MeasureDefinition measure) Writes results into an XML filestatic voidwriteXML(OutputStream out, MeasureDefinition measure) Writes results into an XML streamstatic voidwriteXML(String fileName, MeasureDefinition measure) Writes results into an XML file
-
Constructor Details
-
XMLResultsWriter
public XMLResultsWriter()
-
-
Method Details
-
writeXML
Writes results into an XML file- Parameters:
fileName- name of the file to be createdmeasure- data structure
-
writeXML
Writes results into an XML file- Parameters:
xmlFile- handler to the file to be createdmeasure- data structure
-
writeXML
Writes results into an XML stream- Parameters:
out- stream where XML should be writtenmeasure- data structure
-
getDocument
Returns the entire Document representing results data structure.- Parameters:
measure- data structure- Returns:
- complete measures data structure in Document format
-
writeResults
Creates root element and adds schema informations to it- Parameters:
resultsDoc- Document rootmeasure- data structure
-
writeMeasures
Write measures information- Parameters:
doc- Document rootresultsNode- parent node where measure informations should be addedmeasure- data structure
-
writeSamples
protected static void writeSamples(Document doc, Node measureNode, MeasureDefinition measure, int measureIndex, boolean parametric) Writes all samples for a given measure Modified by Francesco D'Aquino- Parameters:
doc- Document rootmeasureNode- parent node where samples informations should be addedmeasure- data structuremeasureIndex- index of the measure to be writtenparametric- true if these are results from a parametric analysis simulation
-