|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnz.ac.waikato.mcennis.rat.parser.XMLParser
public class XMLParser
Class for parsing XML documents. Utilizes custom SAX parsers to handle the documents.
Constructor Summary | |
---|---|
XMLParser()
Creates a new instance of GraphParser |
Method Summary | |
---|---|
Parser |
duplicate()
Create an exact copy of this object |
ParsedObject |
get()
Returns the parsed object of the handler |
Handler |
getHandler()
Returns a copy of the currently set handler |
java.lang.String |
getName()
|
void |
parse(java.io.InputStream data)
Parse an input stream into its components |
void |
parse(java.io.InputStream data,
Crawler crawler)
Parse an input stream into its components, spidering using the given crawler |
void |
set(ParsedObject o)
Sets the ParsedObject of the Handler |
void |
setHandler(Handler h)
Sets the handler to use when parsing XML documents |
void |
setName(java.lang.String name)
Give this parser an id that should be globally unique |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLParser()
Method Detail |
---|
public void parse(java.io.InputStream data) throws java.lang.Exception
Parser
parse
in interface Parser
data
- data stream to be read
java.lang.Exception
public Parser duplicate()
Parser
duplicate
in interface Parser
public void parse(java.io.InputStream data, Crawler crawler) throws java.lang.Exception
Parser
parse
in interface Parser
java.lang.Exception
public ParsedObject get()
get
in interface Parser
public void setHandler(Handler h)
h
- handler to usepublic Handler getHandler()
public void set(ParsedObject o)
set
in interface Parser
o
- object to be setpublic void setName(java.lang.String name)
Parser
setName
in interface Parser
name
- id for this parserpublic java.lang.String getName()
getName
in interface Parser
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |