net.ontopia.xml
Class ConfiguredXMLReaderFactory

java.lang.Object
  extended by net.ontopia.xml.ConfiguredXMLReaderFactory
All Implemented Interfaces:
XMLReaderFactoryIF

public class ConfiguredXMLReaderFactory
extends java.lang.Object
implements XMLReaderFactoryIF

INTERNAL: A factory for creating configured SAX2 XMLReaders.

The XML readers created by this factory will have their error handler, entity resolver and dtd handler properties set to the values defined on the factory. If the property on the factory is null the property on the XML reader will not be set at all.


Field Summary
protected  org.xml.sax.DTDHandler dtd_handler
           
protected  org.xml.sax.EntityResolver entity_resolver
           
protected  org.xml.sax.ErrorHandler error_handler
           
protected  java.util.Map features
           
protected  java.util.Map properties
           
protected  XMLReaderFactoryIF xrfactory
           
 
Constructor Summary
ConfiguredXMLReaderFactory()
           
ConfiguredXMLReaderFactory(XMLReaderFactoryIF xrfactory)
           
 
Method Summary
 org.xml.sax.XMLReader createXMLReader()
          INTERNAL: Creates a new SAX2 XMLReader object using the nested factory and configures the object created before returning it.
 org.xml.sax.DTDHandler getDTDHandler()
          INTERNAL: Gets the DTD handler that all XMLReaders should have set when created.
 org.xml.sax.EntityResolver getEntityResolver()
          INTERNAL: Gets the entity resolver that all XMLReaders should have set when created.
 org.xml.sax.ErrorHandler getErrorHandler()
          INTERNAL: Gets the error handler that all XMLReaders should have set when created.
 boolean getFeature(java.lang.String uri)
          INTERNAL: Returns the value of a SAX 2.0 feature as it will be set in new XMLReaders created by this factory.
 java.lang.Object getProperty(java.lang.String uri)
          INTERNAL: Returns the value of a SAX 2.0 property as it will be set in new XMLReaders created by this factory.
 void setDTDHandler(org.xml.sax.DTDHandler dtd_handler)
          INTERNAL: Sets the DTD handler that all XMLReaders should have set when created.
 void setEntityResolver(org.xml.sax.EntityResolver entity_resolver)
          INTERNAL: Sets the entity resolver that all XMLReaders should have set when created.
 void setErrorHandler(org.xml.sax.ErrorHandler error_handler)
          INTERNAL: Sets the error handler that all XMLReaders should have set when created.
 void setFeature(java.lang.String uri, boolean state)
          INTERNAL: Sets a SAX 2.0 feature to the value all XMLReaders should have when created by this factory.
 void setProperty(java.lang.String uri, java.lang.Object value)
          INTERNAL: Sets a SAX 2.0 property to the value all XMLReaders should have when created by this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xrfactory

protected XMLReaderFactoryIF xrfactory

error_handler

protected org.xml.sax.ErrorHandler error_handler

entity_resolver

protected org.xml.sax.EntityResolver entity_resolver

dtd_handler

protected org.xml.sax.DTDHandler dtd_handler

features

protected java.util.Map features

properties

protected java.util.Map properties
Constructor Detail

ConfiguredXMLReaderFactory

public ConfiguredXMLReaderFactory()

ConfiguredXMLReaderFactory

public ConfiguredXMLReaderFactory(XMLReaderFactoryIF xrfactory)
Method Detail

getErrorHandler

public org.xml.sax.ErrorHandler getErrorHandler()
INTERNAL: Gets the error handler that all XMLReaders should have set when created.


setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler error_handler)
INTERNAL: Sets the error handler that all XMLReaders should have set when created.


getEntityResolver

public org.xml.sax.EntityResolver getEntityResolver()
INTERNAL: Gets the entity resolver that all XMLReaders should have set when created.


setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver entity_resolver)
INTERNAL: Sets the entity resolver that all XMLReaders should have set when created.


getDTDHandler

public org.xml.sax.DTDHandler getDTDHandler()
INTERNAL: Gets the DTD handler that all XMLReaders should have set when created.


setDTDHandler

public void setDTDHandler(org.xml.sax.DTDHandler dtd_handler)
INTERNAL: Sets the DTD handler that all XMLReaders should have set when created.


getFeature

public boolean getFeature(java.lang.String uri)
                   throws org.xml.sax.SAXNotRecognizedException
INTERNAL: Returns the value of a SAX 2.0 feature as it will be set in new XMLReaders created by this factory.

Throws:
org.xml.sax.SAXNotRecognizedException - Thrown when asked for a feature that has not been set.
Since:
1.2

setFeature

public void setFeature(java.lang.String uri,
                       boolean state)
INTERNAL: Sets a SAX 2.0 feature to the value all XMLReaders should have when created by this factory.

Since:
1.2

getProperty

public java.lang.Object getProperty(java.lang.String uri)
INTERNAL: Returns the value of a SAX 2.0 property as it will be set in new XMLReaders created by this factory.

Returns:
The value of the property, or null if it has not been set.
Since:
1.2

setProperty

public void setProperty(java.lang.String uri,
                        java.lang.Object value)
INTERNAL: Sets a SAX 2.0 property to the value all XMLReaders should have when created by this factory.

Since:
1.2

createXMLReader

public org.xml.sax.XMLReader createXMLReader()
                                      throws org.xml.sax.SAXException
INTERNAL: Creates a new SAX2 XMLReader object using the nested factory and configures the object created before returning it.

Specified by:
createXMLReader in interface XMLReaderFactoryIF
Throws:
org.xml.sax.SAXException - Thrown if there are any problems either creating the reader or configuring it.


Copyright © 2000-2012 Ontopia.