org.knowceans.citeseer.fetcher
Class CsxParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.knowceans.citeseer.fetcher.CsxParser
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
public class CsxParser
- extends org.xml.sax.helpers.DefaultHandler
CsxParser parses the xml files to extract document information.
- Version:
- draft (quickly written but functional)
- Author:
- gregor heinrich (gregor :: arbylon . net)
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
|
static void |
main(java.lang.String[] args)
|
java.util.List<CsxDocument> |
parse(java.lang.String file)
parses an xml document |
void |
startDocument()
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CsxParser
public CsxParser()
main
public static void main(java.lang.String[] args)
parse
public java.util.List<CsxDocument> parse(java.lang.String file)
throws org.xml.sax.SAXException,
java.io.IOException
- parses an xml document
- Parameters:
file
-
- Throws:
java.io.IOException
org.xml.sax.SAXException
startDocument
public void startDocument()
throws org.xml.sax.SAXException
- Specified by:
startDocument
in interface org.xml.sax.ContentHandler
- Overrides:
startDocument
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
startElement
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- Specified by:
startElement
in interface org.xml.sax.ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
characters
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
characters
in interface org.xml.sax.ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
endElement
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
- Specified by:
endElement
in interface org.xml.sax.ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
endDocument
public void endDocument()
throws org.xml.sax.SAXException
- Specified by:
endDocument
in interface org.xml.sax.ContentHandler
- Overrides:
endDocument
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException