org.ocopomo.visualization
Class ModelVisualizer

java.lang.Object
  extended by org.ocopomo.visualization.ModelVisualizer

public class ModelVisualizer
extends java.lang.Object


Constructor Summary
ModelVisualizer(java.lang.String dataFolder, java.lang.String dataFilename, java.lang.String outputFolder, java.lang.String outputFileName)
           
 
Method Summary
static void copy(java.lang.String fromFileName, java.lang.String toFileName, boolean promptOverwrite)
           
static void copyFromLib(java.lang.String fromFileName, java.lang.String toFileName, boolean promptOverwrite)
          Copy
 org.w3c.dom.Document exportResult(double tick, java.util.ArrayList<? extends org.ocopomo.drams.modelling.Agent> researchCentreList, org.ocopomo.drams.data.FactBase factBase)
          Load the default XML file (at location TEST_DATA_FOLDER + TEST_DATA_FILENAME) and update it with the data of the last simulated year
 org.w3c.dom.Document exportResult(java.lang.String path, java.lang.String filename, double tick, java.util.ArrayList<? extends org.ocopomo.drams.modelling.Agent> researchCentreList, org.ocopomo.drams.data.FactBase factBase)
          Load a XML file and update it with the data of the last simulated year
 void getHTMLPresentation()
          Produce a basic HTML representation of a XML file describing test results.
 void getHTMLPresentation(java.lang.String xmlFile, java.lang.String xsltFile, java.lang.String htmlFolder, java.lang.String htmlFile)
          Produce a basic HTML representation of a XML file describing test results.
static void printDOMToFile(org.w3c.dom.Document xmlDoc, java.lang.String fileName)
          Store a DOM Document in a XML file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelVisualizer

public ModelVisualizer(java.lang.String dataFolder,
                       java.lang.String dataFilename,
                       java.lang.String outputFolder,
                       java.lang.String outputFileName)
Method Detail

exportResult

public org.w3c.dom.Document exportResult(double tick,
                                         java.util.ArrayList<? extends org.ocopomo.drams.modelling.Agent> researchCentreList,
                                         org.ocopomo.drams.data.FactBase factBase)
Load the default XML file (at location TEST_DATA_FOLDER + TEST_DATA_FILENAME) and update it with the data of the last simulated year

Parameters:
tick - Time information
researchCentreList - A list containing the research centres with the data to be extracted
factBase - The fact base containing the data to be extracted
Returns:
A DOM Document with the results

exportResult

public org.w3c.dom.Document exportResult(java.lang.String path,
                                         java.lang.String filename,
                                         double tick,
                                         java.util.ArrayList<? extends org.ocopomo.drams.modelling.Agent> researchCentreList,
                                         org.ocopomo.drams.data.FactBase factBase)
Load a XML file and update it with the data of the last simulated year

Parameters:
path - The path of the XML file to update
filename - The name of the XML file to update
tick - Time information
researchCentreList - A list containing the research centres with the data to be extracted
factBase - The fact base containing the data to be extracted
Returns:
A DOM Document with the results

printDOMToFile

public static void printDOMToFile(org.w3c.dom.Document xmlDoc,
                                  java.lang.String fileName)
Store a DOM Document in a XML file

Parameters:
xmlDoc - The input DOM Document to be stored
fileName - The file name in which to store the results

getHTMLPresentation

public void getHTMLPresentation()
Produce a basic HTML representation of a XML file describing test results.

Parameters:
xmlFile - The XML file with the collected data
xsltFile - The XSLT transormation that produces the intended HTML representation
htmlFile - The file in which the results will be stored

getHTMLPresentation

public void getHTMLPresentation(java.lang.String xmlFile,
                                java.lang.String xsltFile,
                                java.lang.String htmlFolder,
                                java.lang.String htmlFile)
Produce a basic HTML representation of a XML file describing test results.

Parameters:
xmlFile - The XML file with the collected data
xsltFile - The XSLT transormation that produces the intended HTML representation
htmlFile - The file in which the results will be stored

copyFromLib

public static void copyFromLib(java.lang.String fromFileName,
                               java.lang.String toFileName,
                               boolean promptOverwrite)
                        throws java.io.IOException
Copy

Parameters:
fromFileName -
toFileName -
Throws:
java.io.IOException

copy

public static void copy(java.lang.String fromFileName,
                        java.lang.String toFileName,
                        boolean promptOverwrite)
                 throws java.io.IOException
Parameters:
fromFileName -
toFileName -
promptOverwrite -
Throws:
java.io.IOException