wt.replication.unit
Class ManifestBasicParser

java.lang.Object
  extended byorg.xml.sax.HandlerBase
      extended bywt.replication.unit.ManifestBasicParser
All Implemented Interfaces:
DocumentHandler, DTDHandler, EntityResolver, ErrorHandler

public class ManifestBasicParser
extends HandlerBase

class to parse and retrieve elements of the unit manifest XML file. content and metadata are not parsed. Uses SAX parser. no multithreading


Field Summary
protected  Hashtable basicProperties
           
protected  org.apache.xerces.parsers.SAXParser parser
           
protected  InputSource source
           
protected  String tagName
           
protected  String tagText
           
 
Constructor Summary
ManifestBasicParser(InputSource source)
          constructor takes org.xml.sax.InputSource and parses the document.
ManifestBasicParser(InputStream is)
          constructor takes xml input stream
ManifestBasicParser(String filename)
          constructor takes xml filepath
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(String name)
           
 String getElementText(String elementName)
          access element text and attributes
 String getUnitCreationTime()
           
 String getUnitCreator()
           
 String getUnitDescription()
           
 String getUnitName()
          access unit property - UNIT_NAME
 String getUnitNumber()
          access unit property - UNIT_NUMBER
 String getUnitTeamTemplateDomain()
           
 String getUnitTeamTemplateName()
           
 String getUnitVersion()
           
static void main(String[] args)
           
 void startElement(String name, AttributeList atts)
           
 
Methods inherited from class org.xml.sax.HandlerBase
endDocument, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, startDocument, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parser

protected org.apache.xerces.parsers.SAXParser parser

basicProperties

protected Hashtable basicProperties

source

protected InputSource source

tagName

protected String tagName

tagText

protected String tagText
Constructor Detail

ManifestBasicParser

public ManifestBasicParser(String filename)
constructor takes xml filepath


ManifestBasicParser

public ManifestBasicParser(InputStream is)
constructor takes xml input stream


ManifestBasicParser

public ManifestBasicParser(InputSource source)
constructor takes org.xml.sax.InputSource and parses the document. This method depends on the ibm Parser api

Method Detail

getElementText

public String getElementText(String elementName)
access element text and attributes


getUnitName

public String getUnitName()
access unit property - UNIT_NAME


getUnitNumber

public String getUnitNumber()
access unit property - UNIT_NUMBER


getUnitCreationTime

public String getUnitCreationTime()

getUnitCreator

public String getUnitCreator()

getUnitVersion

public String getUnitVersion()

getUnitDescription

public String getUnitDescription()

getUnitTeamTemplateDomain

public String getUnitTeamTemplateDomain()

getUnitTeamTemplateName

public String getUnitTeamTemplateName()

startElement

public void startElement(String name,
                         AttributeList atts)
                  throws SAXException
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Throws:
SAXException

endElement

public void endElement(String name)
                throws SAXException
Throws:
SAXException

main

public static void main(String[] args)