wt.replication.unit
Class ManifestContentParser
java.lang.Object
org.xml.sax.HandlerBase
wt.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
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 |
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
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
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