org.oreodata.xml
Class ClasspathEntityResolver

java.lang.Object
  |
  +--org.oreodata.xml.ClasspathEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver

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

Resolve entities from the classpath. This allows us to jar up an xml document with more than one file comprising its "physical structure".

Author:
Jonathan Revusky

Constructor Summary
ClasspathEntityResolver()
           
ClasspathEntityResolver(java.lang.ClassLoader cl)
           
 
Method Summary
 org.xml.sax.InputSource resolveEntity(java.lang.String publicID, java.lang.String systemID)
          Tries to resolve an entity relative to the classloader's search path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathEntityResolver

public ClasspathEntityResolver(java.lang.ClassLoader cl)

ClasspathEntityResolver

public ClasspathEntityResolver()
Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicID,
                                             java.lang.String systemID)
Tries to resolve an entity relative to the classloader's search path. It first tries relative to the top-level document's location and then tries relative to the top-level location.

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver