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

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

public class NullParser
extends java.lang.Object
implements Parser

Intentionally a do-nothing parser.


Field Summary
 java.lang.String content
           
 
Constructor Summary
NullParser()
          Creates a new instance of NullParser
 
Method Summary
 Parser duplicate()
          Create an exact copy of this object
 ParsedObject get()
          Intentionally a no-op
 java.lang.String getName()
           
 void parse(java.io.InputStream data)
          Reads the content into a String, otherwise a no-op
 void parse(java.io.InputStream data, Crawler crawler)
          Identical to parse
 void set(ParsedObject o)
          Intentionally a no-op
 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
 

Field Detail

content

public java.lang.String content
Constructor Detail

NullParser

public NullParser()
Creates a new instance of NullParser

Method Detail

parse

public void parse(java.io.InputStream data)
Reads the content into a String, otherwise a no-op

Specified by:
parse in interface Parser
Parameters:
data - read into a string

duplicate

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

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

parse

public void parse(java.io.InputStream data,
                  Crawler crawler)
Identical to parse

Specified by:
parse in interface Parser
Parameters:
data - read into string
crawler - ignored

get

public ParsedObject get()
Intentionally a no-op

Specified by:
get in interface Parser
Returns:
null

set

public void set(ParsedObject o)
Intentionally a no-op

Specified by:
set in interface Parser
Parameters:
o - ignored

setName

public void setName(java.lang.String name)
Description copied from interface: Parser
Give this parser an id that should be globally unique

Specified by:
setName in interface Parser
Parameters:
name - id for this parser

getName

public java.lang.String getName()
Specified by:
getName in interface Parser