wt.replication.unit
Class ManifestContentParser

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

public class ManifestContentParser
extends HandlerBase
implements Runnable, Enumeration

class to parse and retrieve content, metadata elements of the unit manifest XML file. Uses SAX parser. elements are obtained through an Enumeratin interface. Implements producer/consumer using piped streams


Field Summary
protected  boolean closed
           
private  boolean contentMode
           
private  UnitContentSelectedData inData
           
protected  ObjectInputStream is
           
protected  ObjectOutputStream os
           
private  UnitContentSelectedData outData
           
protected  org.apache.xerces.parsers.SAXParser parser
           
protected  InputSource source
           
private  String url
           
protected  Vector urlProperties
           
private static boolean VERBOSE
           
 
Constructor Summary
ManifestContentParser(InputSource source)
          constructor takes org.xml.sax.InputSource and parses the document.
ManifestContentParser(InputStream is)
          constructor takes xml input stream
ManifestContentParser(String filename)
          constructor takes xml filepath
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(String name)
           
 boolean hasMoreElements()
           
static void main(String[] args)
           
 Object nextElement()
           
 void run()
           
 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

urlProperties

protected Vector urlProperties

source

protected InputSource source

is

protected ObjectInputStream is

os

protected ObjectOutputStream os

closed

protected boolean closed

url

private String url

contentMode

private boolean contentMode

outData

private UnitContentSelectedData outData

VERBOSE

private static boolean VERBOSE

inData

private UnitContentSelectedData inData
Constructor Detail

ManifestContentParser

public ManifestContentParser(String filename)
constructor takes xml filepath


ManifestContentParser

public ManifestContentParser(InputStream is)
constructor takes xml input stream


ManifestContentParser

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

Method Detail

run

public void run()
Specified by:
run in interface Runnable

startElement

public void startElement(String name,
                         AttributeList atts)
                  throws SAXException
Specified by:
startElement in interface DocumentHandler
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface DocumentHandler
Throws:
SAXException

endElement

public void endElement(String name)
                throws SAXException
Specified by:
endElement in interface DocumentHandler
Throws:
SAXException

main

public static void main(String[] args)

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface Enumeration

nextElement

public Object nextElement()
Specified by:
nextElement in interface Enumeration