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

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

public class ISMIRBibtexParser
extends java.lang.Object
implements Parser

This class parses bibtex files generated by a custom group of perl scripts that take as input the comma seperated files from www.ismir.net, then reads the xml version of the papers (pdftohtml) to determine which ismir papers reference which other papers. These documents have a strict format which makes for easy parsing. In particular, unlike traditional bibtex, these files have a specific order of fields as well as the non-standard fields of references and file. IDs are assumed to be integers (not standard), all fields are encased in double quotes that extend for a single line, and references are a set of integers seperated by commas. This script loads this format into RAT and establishes two modes (types) of actors: Author and Paper. There are two relations (kinds) of link: References (Paper to Paper) and AuthorOf (Author to Paper).


Constructor Summary
ISMIRBibtexParser()
           
 
Method Summary
 Parser duplicate()
          Create an exact copy of this object
 ParsedObject get()
          Get the object created by this parser
 java.lang.String getName()
           
 void parse(java.io.InputStream data)
          Parse the modified bibtex file.
 void parse(java.io.InputStream data, Crawler crawler)
          Identical to parse - no spidering is done
 void set(ParsedObject o)
          Set the parsed object to be loaded
 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

ISMIRBibtexParser

public ISMIRBibtexParser()
Method Detail

parse

public void parse(java.io.InputStream data)
           throws java.lang.Exception
Parse the modified bibtex file. The file is modified in that an ordering of the fields is assumed, all listed fields are assumed to be present (numeric id as identifier, followed by

Specified by:
parse in interface Parser
Parameters:
data -
Throws:
java.lang.Exception

parse

public void parse(java.io.InputStream data,
                  Crawler crawler)
           throws java.lang.Exception
Identical to parse - no spidering is done

Specified by:
parse in interface Parser
Parameters:
data - data to be parsed
crawler - ignored
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
Returns:
new Parser object

get

public ParsedObject get()
Description copied from interface: Parser
Get the object created by this parser

Specified by:
get in interface Parser
Returns:
parsed object

set

public void set(ParsedObject o)
Description copied from interface: Parser
Set the parsed object to be loaded

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

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