edu.colorado.cs.svn
Class SvnVersionParser

java.lang.Object
  extended by edu.colorado.cs.svn.SvnVersionParser

public class SvnVersionParser
extends java.lang.Object

This class implements a subversion revision number parser so it can be dynamically updated in the source code

Author:
Kevin Bauer, Pushkar Sambhoos.

Field Summary
private  int currRevNum
          The version number
 
Constructor Summary
SvnVersionParser()
          The default constructor parses the Subversion "entries" XML file.
 
Method Summary
 float getVersionNumber()
          Returns the current version number.
private  void parseNode(org.w3c.dom.Node node)
          Recursive function to parse the internal representation (IR) of the XML document and pick out the highest revision number to set as our version number.
private  void parseXML(java.lang.String fileName)
          Parse the svn XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currRevNum

private int currRevNum
The version number

Constructor Detail

SvnVersionParser

public SvnVersionParser()
The default constructor parses the Subversion "entries" XML file.

Method Detail

parseNode

private void parseNode(org.w3c.dom.Node node)
Recursive function to parse the internal representation (IR) of the XML document and pick out the highest revision number to set as our version number.

Parameters:
node - The XML node to parse.
See Also:
com.sun.org.apache.xerces.internal.impl.xs.dom.DOMParser;

getVersionNumber

public float getVersionNumber()
Returns the current version number.

Returns:
The current version number.

parseXML

private void parseXML(java.lang.String fileName)
Parse the svn XML file.

Parameters:
fileName - the name of the svn "entries" file.