org.mmbase.util
Class XMLEntityResolver

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

public class XMLEntityResolver
extends Object
implements EntityResolver

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

Version:
$Id: XMLEntityResolver.java,v 1.59 2006/01/17 12:25:21 michiel Exp $
Author:
Gerard van Enk, Michiel Meeuwissen
Warning: Will be renamed to:
EntityResolver
Warning: Will be moved to:
org.mmbase.util.xml

Field Summary
static String DOMAIN
           
static String DTD_SUBPATH
           
static String XMLNS_SUBPATH
           
 
Constructor Summary
XMLEntityResolver()
          empty constructor
XMLEntityResolver(boolean v)
           
XMLEntityResolver(boolean v, Class base)
           
 
Method Summary
 String getDTDPath()
           
 boolean hasDTD()
           
static void registerPublicID(String publicID, String dtd, Class c)
          Register a given publicID, binding it to a resource determined by a given class and resource filename
static void registerSystemID(String systemID, String xsd, Class c)
          It seems that in XSD's you don't have public id's.
 InputSource resolveEntity(String publicId, String systemId)
          Takes the systemId and returns the local location of the dtd/xsd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOMAIN

public static final String DOMAIN
See Also:
Constant Field Values

DTD_SUBPATH

public static final String DTD_SUBPATH
See Also:
Constant Field Values

XMLNS_SUBPATH

public static final String XMLNS_SUBPATH
See Also:
Constant Field Values
Constructor Detail

XMLEntityResolver

public XMLEntityResolver()
empty constructor


XMLEntityResolver

public XMLEntityResolver(boolean v)

XMLEntityResolver

public XMLEntityResolver(boolean v,
                         Class base)
Method Detail

registerPublicID

public static void registerPublicID(String publicID,
                                    String dtd,
                                    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.
Since:
MMBase-1.7

registerSystemID

public static void registerSystemID(String systemID,
                                    String xsd,
                                    Class c)
It seems that in XSD's you don't have public id's. So, this makes it possible to use system id.

Since:
MMBase-1.8
To Do:
EXPERIMENTAL

resolveEntity

public InputSource resolveEntity(String publicId,
                                 String systemId)
Takes the systemId and returns the local location of the dtd/xsd

Specified by:
resolveEntity in interface EntityResolver

hasDTD

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

getDTDPath

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


MMBase build 1.8.1.20060716