nz.ac.waikato.mcennis.rat.parser
Class XMLParser

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.parser.AbstractParser
      extended by nz.ac.waikato.mcennis.rat.parser.XMLParser
All Implemented Interfaces:
Parser

public class XMLParser
extends AbstractParser

Class for parsing XML documents. Utilizes custom SAX parsers to handle the documents.


Constructor Summary
XMLParser()
          Creates a new instance of GraphParser
 
Method Summary
 boolean check(Parameter param)
           
 boolean check(Properties properties)
           
 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
 void parse(java.io.InputStream data, Crawler crawler, Properties site)
          Parse an input stream into its components, spidering using the given crawler
 void parse(java.io.InputStream data, Properties site)
          Parse an input stream into its components
 void set(ParsedObject o)
          Sets the ParsedObject of the Handler
 void setHandler(Handler h)
          Sets the handler to use when parsing XML documents
 
Methods inherited from class nz.ac.waikato.mcennis.rat.parser.AbstractParser
getName, getParameter, getParameter, init, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLParser

public XMLParser()
Creates a new instance of GraphParser

Method Detail

parse

public void parse(java.io.InputStream data,
                  Properties site)
           throws java.lang.Exception
Description copied from interface: Parser
Parse an input stream into its components

Specified by:
parse in interface Parser
Specified by:
parse in class AbstractParser
Parameters:
data - data stream to be read
Throws:
java.lang.Exception

duplicate

public Parser duplicate()
Description copied from interface: Parser
Create an exact copy of this object

Specified by:
duplicate in interface Parser
Specified by:
duplicate in class AbstractParser
Returns:
new Parser object

parse

public void parse(java.io.InputStream data,
                  Crawler crawler,
                  Properties site)
           throws java.lang.Exception
Description copied from interface: Parser
Parse an input stream into its components, spidering using the given crawler

Specified by:
parse in interface Parser
Specified by:
parse in class AbstractParser
Throws:
java.lang.Exception

get

public ParsedObject get()
Returns the parsed object of the handler

Specified by:
get in interface Parser
Specified by:
get in class AbstractParser
Returns:
handler's parsed object

setHandler

public void setHandler(Handler h)
Sets the handler to use when parsing XML documents

Parameters:
h - handler to use

getHandler

public Handler getHandler()
Returns a copy of the currently set handler

Returns:
handler

set

public void set(ParsedObject o)
Sets the ParsedObject of the Handler

Specified by:
set in interface Parser
Specified by:
set in class AbstractParser
Parameters:
o - object to be set

check

public boolean check(Properties properties)
Specified by:
check in interface Parser
Overrides:
check in class AbstractParser

check

public boolean check(Parameter param)
Specified by:
check in interface Parser
Overrides:
check in class AbstractParser

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads