idl.tmt.documentparsing
Interface DocumentParser

All Known Implementing Classes:
HTMLDocumentParser, TextDocumentParser

public interface DocumentParser

Interface which provides parsing capabilities. Classes implementing this interface should be specialized to parse a specific type of document, such as HTML, TXT, .DOC, .PDF, etc. Created on Jan 23, 2004

Author:
jelsas

Method Summary
 void addParsingListener(ParsingListener listener)
          Registers a new ParsingListener for this document parser
 void parseDocument(int docID, java.io.Reader documentReader)
          Initiates the parsing of a document.
 void removeParsingListener(ParsingListener listener)
          Removes a parsing listener from this document parser
 void setParameter(java.lang.String name, java.lang.Object value)
          Sets a parameter for this DocumentParser.
 

Method Detail

setParameter

public void setParameter(java.lang.String name,
                         java.lang.Object value)
                  throws InvalidParameterException
Sets a parameter for this DocumentParser. Throws an exception if this parser does not support the provided parameter.
Parameters:
name -  
value -  
Throws:
InvalidParameterException - if the parameter is not supported or is specified incorrectly

addParsingListener

public void addParsingListener(ParsingListener listener)
Registers a new ParsingListener for this document parser
Parameters:
listener - The listener to be registered

removeParsingListener

public void removeParsingListener(ParsingListener listener)
Removes a parsing listener from this document parser
Parameters:
listener - the listener to be removed.

parseDocument

public void parseDocument(int docID,
                          java.io.Reader documentReader)
                   throws java.io.IOException
Initiates the parsing of a document.
Parameters:
docID - The numeric ID of this document
document - The Reader for the document to be parsed