org.mmbase.util
Class XMLEntityResolver

java.lang.Object
  extended byorg.mmbase.util.XMLEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver

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

Take the systemId and converts it into a local file, using the MMBase config path

Version:
$Id: XMLEntityResolver.java,v 1.37 2003/07/21 12:19:06 pierre Exp $
Author:
Gerard van Enk, Michiel Meeuwissen
To Do:
remove manual Transactionhandler Public ID registration

Constructor Summary
XMLEntityResolver()
          empty constructor
XMLEntityResolver(boolean v)
           
XMLEntityResolver(boolean v, java.lang.Class base)
           
 
Method Summary
 java.lang.String getDTDPath()
           
 boolean hasDTD()
           
static void registerPublicID(java.lang.String publicID, java.lang.String dtd, java.lang.Class c)
          Register a given publicID, binding it to a resource determined by a given class and resource filename
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          takes the systemId and returns the local location of the dtd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLEntityResolver

public XMLEntityResolver()
empty constructor


XMLEntityResolver

public XMLEntityResolver(boolean v)

XMLEntityResolver

public XMLEntityResolver(boolean v,
                         java.lang.Class base)
Method Detail

registerPublicID

public static void registerPublicID(java.lang.String publicID,
                                    java.lang.String dtd,
                                    java.lang.Class c)
Register a given publicID, binding it to a resource determined by a given class and resource filename

Parameters:
publicID - the Public ID to register
dtd - the name of the resourcefile
c - the class indicating the location of the resource in the pacakage structure. The resource is to be found in the 'resources' package under the package of the class.

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws org.xml.sax.SAXException,
                                             java.io.IOException
takes the systemId and returns the local location of the dtd

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Throws:
org.xml.sax.SAXException
java.io.IOException

hasDTD

public boolean hasDTD()
Returns:
whether the resolver has determiend a DTD

getDTDPath

public java.lang.String getDTDPath()
Returns:
The actually used path to the DTD


MMBase build 1.7.1.20041002