org.objectweb.easybeans.util.xml
Class EmptyEntityResolver

java.lang.Object
  extended by org.objectweb.easybeans.util.xml.EmptyEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver

public class EmptyEntityResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver

This class is used when no validating is required. This avoids timeout when schema are looking up on internet.
It returns an empty content for every schema/DTD.

Author:
Florent Benoit

Constructor Summary
EmptyEntityResolver()
           
 
Method Summary
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          The Parser will call this method before opening any external entity except the top-level document entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyEntityResolver

public EmptyEntityResolver()
Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws org.xml.sax.SAXException,
                                             java.io.IOException
The Parser will call this method before opening any external entity except the top-level document entity.

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Parameters:
publicId - The public identifier of the external entity being referenced, or null if none was supplied.
systemId - The system identifier of the external entity being referenced.
Returns:
An InputSource object describing the new input source, or null to request that the parser open a regular URI connection to the system identifier.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
java.io.IOException - A Java-specific IO exception, possibly the result of creating a new InputStream or Reader for the InputSource.