com.boylesoftware.cb2.util
Class LocalResourceEntityResolver

java.lang.Object
  extended bycom.boylesoftware.cb2.util.LocalResourceEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver

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

This entity resolver allows to access local copies of DTDs referred from XML configuration files. The DTDs are stored in a class resources.

Version:
$Id: LocalResourceEntityResolver.java,v 1.1 2003/04/22 17:34:18 levahim Exp $
Author:
Lev Himmelfarb

Constructor Summary
LocalResourceEntityResolver(java.lang.Class baseClass, java.lang.String[] entities)
          Constructs a resolver.
 
Method Summary
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          The interface method implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalResourceEntityResolver

public LocalResourceEntityResolver(java.lang.Class baseClass,
                                   java.lang.String[] entities)
Constructs a resolver.

Parameters:
baseClass - class. which has the DTDs as its resources.
entities - list of known entities and their local resource paths. The even elements of the array are entity public identifiers, the odd elements are DTD URLs.
Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
The interface method implementation.

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Parameters:
publicId - public id of the entity to resolve.
systemId - system id of the entity to resolve.
Returns:
input source for the entity or null if the entity is unknown to this resolver and the system id should be used to resolve it.


Copyright © 2002,2003,2004 - Boyle Software, Inc.