metricsOverlay.xml
Class MetricXMLReader

java.lang.Object
  extended by metricsOverlay.xml.MetricXMLReader

public class MetricXMLReader
extends java.lang.Object

Main class for reading in XML files. The file "metric.dtd" describes the appropriate XML format.

Version:
23/6/2009
Author:
Matthew Harward

Constructor Summary
MetricXMLReader(MetricDocument mDoc)
          Constructor given an existing MetricDocument for the file.
MetricXMLReader(java.lang.String fileName)
          Main constructor.
 
Method Summary
 java.lang.String getFileName()
           
 MetricDocument getMetricDocument()
           
 java.util.Map<java.lang.String,ActualMetric> getMetricMap()
           
 void readXML(java.lang.String xmlFileName)
          Reads a specific xmlFile
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetricXMLReader

public MetricXMLReader(java.lang.String fileName)
Main constructor.

Parameters:
fileName - A string to store the resultant file name.

MetricXMLReader

public MetricXMLReader(MetricDocument mDoc)
Constructor given an existing MetricDocument for the file.

Parameters:
mDoc - a document to contain all of the mappings etc
Method Detail

readXML

public void readXML(java.lang.String xmlFileName)
Reads a specific xmlFile

Parameters:
xmlFileName -

getFileName

public java.lang.String getFileName()
Returns:
the fileName listed in the xml

getMetricDocument

public MetricDocument getMetricDocument()
Returns:
a document containing all of the mappings and the appropriate locations

getMetricMap

public java.util.Map<java.lang.String,ActualMetric> getMetricMap()
Returns:
a map object containing the metrics listed in the XML file. The initial string represents their name.