vc.xml.sax
Class SaxDataExtractor

java.lang.Object
  |
  +--vc.xml.sax.SaxDataExtractor
Direct Known Subclasses:
ProjectDBSaxDataExtractor, VersionDBSaxDataExtractor

public class SaxDataExtractor
extends java.lang.Object

SaxDataExtractor is the Template Method (pattern) class of XML subsystem which standardizes the message flow for extraction of SAx data related to the project and version databases. The derived classes of this implements the abstract methods of this class.


Field Summary
protected  java.util.Stack directoryStack
          Stack to keep track of the recent directory so that the file and other elements can be related to the directory to which they belong to
protected  File file
          Holds the file objects temporarily, until they are added to the database
protected  Directory newDirectory
          Holds the directory objects temporarily, until they are added to the database
 ProjectDB projectDB
          project database object which stores even the version related data
 
Constructor Summary
SaxDataExtractor()
           
 
Method Summary
protected  void processDataBaseElement(org.xml.sax.Attributes attrs)
          Event handler or the data extraction method for the Database element.
protected  void processDirectoryElement(org.xml.sax.Attributes attrs)
          Event handler or the data extraction method for the Directory element.
protected  void processDiskMapElement(org.xml.sax.Attributes attrs)
          Event handler or the data extraction method for the diskmap element.
 void processElement(java.lang.String elementName, org.xml.sax.Attributes attrs)
          SAX event handler invoked when ever a new Element is processed.
protected  void processFileElement(org.xml.sax.Attributes attrs)
          Event handler or the data extraction method for the File element.
protected  void processLabelVersionMapElement(org.xml.sax.Attributes attrs)
          Event handler or the data extraction method for the LabelVersionMap element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directoryStack

protected java.util.Stack directoryStack
Stack to keep track of the recent directory so that the file and other elements can be related to the directory to which they belong to

newDirectory

protected Directory newDirectory
Holds the directory objects temporarily, until they are added to the database

file

protected File file
Holds the file objects temporarily, until they are added to the database

projectDB

public ProjectDB projectDB
project database object which stores even the version related data
Constructor Detail

SaxDataExtractor

public SaxDataExtractor()
Method Detail

processElement

public void processElement(java.lang.String elementName,
                           org.xml.sax.Attributes attrs)
SAX event handler invoked when ever a new Element is processed. This method identifies the king of element and calls the respective data extraction methods. All such data extraction methods are defined in this class but implemented in the derived classes. This class is the Template method because it is standerdizing method call sequence even for the derived classes.
Parameters:
elementName - name of the Element parsed in the XML content
attrs - Attributes object passed by the XML SAX parser with the attribute data/values packed into it.

processDirectoryElement

protected void processDirectoryElement(org.xml.sax.Attributes attrs)
Event handler or the data extraction method for the Directory element. This is just to standardize the signatur and it will be implemented actually in the derived classes
Parameters:
attrs - Attributes object passed by the XML SAX parser with the attribute data/values packed into it.

processDiskMapElement

protected void processDiskMapElement(org.xml.sax.Attributes attrs)
Event handler or the data extraction method for the diskmap element. This is just to standardize the signatur and it will be implemented actually in the derived classes
Parameters:
attrs - Attributes object passed by the XML SAX parser with the attribute data/values packed into it.

processFileElement

protected void processFileElement(org.xml.sax.Attributes attrs)
Event handler or the data extraction method for the File element. This is just to standardize the signatur and it will be implemented actually in the derived classes
Parameters:
attrs - Attributes object passed by the XML SAX parser with the attribute data/values packed into it.

processDataBaseElement

protected void processDataBaseElement(org.xml.sax.Attributes attrs)
Event handler or the data extraction method for the Database element. This is just to standardize the signatur and it will be implemented actually in the derived classes
Parameters:
attrs - Attributes object passed by the XML SAX parser with the attribute data/values packed into it.

processLabelVersionMapElement

protected void processLabelVersionMapElement(org.xml.sax.Attributes attrs)
Event handler or the data extraction method for the LabelVersionMap element. This is just to standardize the signatur and it will be implemented actually in the derived classes
Parameters:
attrs - Attributes object passed by the XML SAX parser with the attribute data/values packed into it.