org.apache.jetspeed.rewriter.xml
Class SaxParserAdaptor
java.lang.Object
org.apache.jetspeed.rewriter.xml.SaxParserAdaptor
- All Implemented Interfaces:
- ParserAdaptor
public class SaxParserAdaptor
- extends java.lang.Object
- implements ParserAdaptor
SaxParserAdaptor
- Version:
- $Id: SaxParserAdaptor.java 516448 2007-03-09 16:25:47Z ate $
- Author:
- David Sean Taylor
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
Method Summary |
static void |
clearDtdCache()
|
static java.util.Map |
getDtds()
|
protected javax.xml.parsers.SAXParser |
getParser()
Get a Parser from the SAX Parser factory |
void |
parse(Rewriter rewriter,
java.io.Reader reader)
Parses a document from the reader, without actually rewriting URLs. |
void |
rewrite(Rewriter rewriter,
java.io.Reader reader,
java.io.Writer writer)
Parses and rewrites a document from the reader, rewriting URLs via the rewriter's events to the writer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
SaxParserAdaptor
public SaxParserAdaptor()
parse
public void parse(Rewriter rewriter,
java.io.Reader reader)
throws RewriterException
- Description copied from interface:
ParserAdaptor
- 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.
- Specified by:
parse
in interface ParserAdaptor
reader
- the input stream over the content to be parsed.
- Throws:
RewriterException
rewrite
public void rewrite(Rewriter rewriter,
java.io.Reader reader,
java.io.Writer writer)
throws RewriterException
- Description copied from interface:
ParserAdaptor
- 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.
- Specified by:
rewrite
in interface ParserAdaptor
reader
- the input stream over the content to be parsed.writer
- the output stream where content is rewritten to.
- Throws:
RewriterException
getParser
protected javax.xml.parsers.SAXParser getParser()
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
- Get a Parser from the SAX Parser factory
- Returns:
- A SAXParser
- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
getDtds
public static java.util.Map getDtds()
clearDtdCache
public static void clearDtdCache()
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.