org.apache.cocoon.components.parser
Class JaxpParser

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.xml.AbstractXMLProducer
          extended by org.apache.cocoon.components.parser.JaxpParser
All Implemented Interfaces:
Poolable, Recyclable, Disposable, Component, Composable, LogEnabled, Parameterizable, Parser, DOMFactory, XMLProducer, ErrorHandler
Direct Known Subclasses:
PooledJaxpParser

Deprecated. The Avalon XML Parser is now used inside Cocoon. This role will be removed in future releases.

public class JaxpParser
extends AbstractXMLProducer
implements Parser, ErrorHandler, Composable, Parameterizable, Disposable, Poolable

An XMLParser that is only dependant on JAXP 1.1 compliant parsers. The configuration can contain the following parameters :

Version:
CVS $Id: JaxpParser.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Berin Loritsch, Carsten Ziegeler, Sylvain Wallez

Field Summary
protected  DocumentBuilder docBuilder
          Deprecated. The DOM builder.
protected  DocumentBuilderFactory docFactory
          Deprecated. the Document Builder factory
protected  SAXParserFactory factory
          Deprecated. the SAX Parser factory
protected  ComponentManager manager
          Deprecated. the component manager
protected  boolean nsPrefixes
          Deprecated. do we want namespaces also as attributes ?
protected  XMLReader reader
          Deprecated. The SAX reader.
protected  Resolver resolver
          Deprecated. the Entity Resolver
protected  boolean reuseParsers
          Deprecated. do we want to reuse parsers ?
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.components.parser.Parser
ROLE
 
Constructor Summary
JaxpParser()
          Deprecated.  
 
Method Summary
 void compose(ComponentManager manager)
          Deprecated. Get the Entity Resolver from the component manager
 void dispose()
          Deprecated. Dispose
 void error(SAXParseException e)
          Deprecated. Receive notification of a recoverable error.
 void fatalError(SAXParseException e)
          Deprecated. Receive notification of a fatal error.
 Document newDocument()
          Deprecated. Create a new Document object.
 Document newDocument(String name)
          Deprecated. Create a new Document object with a specified DOCTYPE.
 Document newDocument(String name, String publicId, String systemId)
          Deprecated. Create a new Document object with a specified DOCTYPE, public ID and system ID.
 void parameterize(Parameters params)
          Deprecated. Configure
 void parse(InputSource in)
          Deprecated.  
 Document parseDocument(InputSource input)
          Deprecated. Parses a new Document object from the given InputSource.
protected  void setupDocumentBuilder()
          Deprecated. Creates a new DocumentBuilder if needed.
protected  void setupXMLReader()
          Deprecated. Creates a new XMLReader if needed.
 void warning(SAXParseException e)
          Deprecated. Receive notification of a warning.
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
recycle, setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.components.parser.Parser
setContentHandler, setLexicalHandler
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Field Detail

factory

protected SAXParserFactory factory
Deprecated. 
the SAX Parser factory


docFactory

protected DocumentBuilderFactory docFactory
Deprecated. 
the Document Builder factory


reader

protected XMLReader reader
Deprecated. 
The SAX reader. It is created lazily by setupXMLReader() and cleared if a parsing error occurs.


docBuilder

protected DocumentBuilder docBuilder
Deprecated. 
The DOM builder. It is created lazily by setupDocumentBuilder() and cleared if a parsing error occurs.


manager

protected ComponentManager manager
Deprecated. 
the component manager


resolver

protected Resolver resolver
Deprecated. 
the Entity Resolver


nsPrefixes

protected boolean nsPrefixes
Deprecated. 
do we want namespaces also as attributes ?


reuseParsers

protected boolean reuseParsers
Deprecated. 
do we want to reuse parsers ?

Constructor Detail

JaxpParser

public JaxpParser()
Deprecated. 
Method Detail

compose

public void compose(ComponentManager manager)
             throws ComponentException
Deprecated. 
Get the Entity Resolver from the component manager

Specified by:
compose in interface Composable
Throws:
ComponentException

dispose

public void dispose()
Deprecated. 
Dispose

Specified by:
dispose in interface Disposable

parameterize

public void parameterize(Parameters params)
                  throws ParameterException
Deprecated. 
Configure

Specified by:
parameterize in interface Parameterizable
Throws:
ParameterException

parse

public void parse(InputSource in)
           throws SAXException,
                  IOException
Deprecated. 
Specified by:
parse in interface Parser
Throws:
SAXException
IOException

newDocument

public Document newDocument()
Deprecated. 
Create a new Document object.

Specified by:
newDocument in interface DOMFactory

newDocument

public Document newDocument(String name)
Deprecated. 
Create a new Document object with a specified DOCTYPE.

Specified by:
newDocument in interface DOMFactory

newDocument

public Document newDocument(String name,
                            String publicId,
                            String systemId)
Deprecated. 
Create a new Document object with a specified DOCTYPE, public ID and system ID.

Specified by:
newDocument in interface DOMFactory

parseDocument

public Document parseDocument(InputSource input)
                       throws SAXException,
                              IOException
Deprecated. 
Parses a new Document object from the given InputSource.

Specified by:
parseDocument in interface Parser
Throws:
SAXException
IOException

setupXMLReader

protected void setupXMLReader()
                       throws SAXException
Deprecated. 
Creates a new XMLReader if needed.

Throws:
SAXException

setupDocumentBuilder

protected void setupDocumentBuilder()
Deprecated. 
Creates a new DocumentBuilder if needed.


error

public void error(SAXParseException e)
           throws SAXException
Deprecated. 
Receive notification of a recoverable error.

Specified by:
error in interface ErrorHandler
Throws:
SAXException

fatalError

public void fatalError(SAXParseException e)
                throws SAXException
Deprecated. 
Receive notification of a fatal error.

Specified by:
fatalError in interface ErrorHandler
Throws:
SAXException

warning

public void warning(SAXParseException e)
             throws SAXException
Deprecated. 
Receive notification of a warning.

Specified by:
warning in interface ErrorHandler
Throws:
SAXException


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.