org.apache.stylebook.parsers
Class CachingParser

java.lang.Object
  extended by org.apache.stylebook.AbstractComponent
      extended by org.apache.stylebook.parsers.AbstractParser
          extended by org.apache.stylebook.parsers.CachingParser
All Implemented Interfaces:
Component, Parser

public class CachingParser
extends AbstractParser
implements Parser

Version:
CVS $Revision: 313202 $ $Date: 1999-11-30 12:28:55 +0000 (Tue, 30 Nov 1999) $
Author:
Pierpaolo Fumagalli, Copyright 1999 © The Apache Software Foundation. All rights reserved.

Field Summary
 
Fields inherited from class org.apache.stylebook.AbstractComponent
engine, params
 
Constructor Summary
CachingParser()
           
 
Method Summary
 Document create()
          Create a new empty DOM Document object.
 void init(Engine e, Parameters p)
          Initialize this component instance.
 Document parse(InputSource in)
          Parse the specified InputSource.
 
Methods inherited from class org.apache.stylebook.parsers.AbstractParser
parse
 
Methods inherited from class org.apache.stylebook.AbstractComponent
debug, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.stylebook.Parser
parse
 

Constructor Detail

CachingParser

public CachingParser()
Method Detail

init

public void init(Engine e,
                 Parameters p)
          throws InitializationException
Initialize this component instance.

Specified by:
init in interface Component
Overrides:
init in class AbstractComponent
Parameters:
e - The Engine owning this Component instance
p - This component initialization Parameters
Throws:
InitializationException - If this Component instance cannot be initialized.

create

public Document create()
Create a new empty DOM Document object.

Specified by:
create in interface Parser
Returns:
A non-null DOM Document object.
Throws:
DocumentException - If the new Document cannot be created.

parse

public Document parse(InputSource in)
               throws IOException,
                      CreationException
Parse the specified InputSource.

Specified by:
parse in interface Parser
Parameters:
in - The InputSource to parse.
Returns:
A non-null DOM Document object.
Throws:
IOException - If an I/O error occourred accessing the specified System-ID.
CreationException - If an error occourred parsing the document.