org.apache.jetspeed.rewriter
Interface ParserAdaptor

All Known Implementing Classes:
NeckoHTMLParserAdapter, NekoParserAdaptor, SaxParserAdaptor, SwingParserAdaptor

public interface ParserAdaptor

Interface for HTML Parser Adaptors. Adaptors normalize the interface over HTML and XML adaptor implementations.

Version:
$Id: ParserAdaptor.java 516448 2007-03-09 16:25:47Z ate $
Author:
David Sean Taylor

Method Summary
 void parse(Rewriter rewriter, Reader reader)
          Parses a document from the reader, without actually rewriting URLs.
 void rewrite(Rewriter rewriter, Reader reader, Writer writer)
          Parses and rewrites a document from the reader, rewriting URLs via the rewriter's events to the writer.
 

Method Detail

parse

void parse(Rewriter rewriter,
           Reader reader)
           throws RewriterException
Parses a document from the reader, without actually rewriting URLs. During parsing the events are called back on the given rewriter to handle the normalized events.

Parameters:
reader - the input stream over the content to be parsed.
Throws:
RewriteException - when a parsing error occurs or unexpected content is found.
RewriterException

rewrite

void rewrite(Rewriter rewriter,
             Reader reader,
             Writer writer)
             throws RewriterException
Parses and rewrites a document from the reader, rewriting URLs via the rewriter's events to the writer. During parsing the rewriter events are called on the given rewriter to handle the rewriting.

Parameters:
reader - the input stream over the content to be parsed.
writer - the output stream where content is rewritten to.
Throws:
RewriteException - when a parsing error occurs or unexpected content is found.
RewriterException


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.