|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.io.XMLEntityResolver
A flexable entity resolver for use with parsing XML files. This implements:
A list of class loaders maybe associated with this object. If so
an attempt will be made to resolve file:
URLs from
the class path.
org.enhydra.apache.xerces.readers.XCatalog
Field Summary | |
static String |
CLASSPATH_PROTOCOL
Protocol to use in specifying a URL pointing to the CLASSPATH or a file on the file system. |
static String |
CLASSPATH_PROTOCOL_PREFIX
Protocol prefix. |
static String |
DEFAULT_ENTITY_CATALOG
URL for Enhydra default entity catalog. |
static String |
LUTRIS_ENTITY_CATALOG
URL for Lutrus Enhydra default entity catalog. |
Constructor Summary | |
XMLEntityResolver()
|
Method Summary | |
void |
addClassLoader(ClassLoader classLoader)
Add a classloader to the end of the order list of classloaders to search for entities. |
Enumeration |
getClassLoaders()
Get an enumeration of the class loaders. |
PrintWriter |
getDebugWriter()
Get the debug writer. |
String |
getPublicMapping(String publicId,
String systemId)
Returns a public identifier mapping. |
String |
getSystemMapping(String systemId)
Returns a system identifier alias. |
void |
loadCatalog(InputSource source)
Loads a catalog specified by the given input source and appends the contents to the catalog object. |
InputSource |
resolveEntity(String publicId,
String systemId)
|
void |
setDebugWriter(PrintWriter writer)
Set a writer used to output debug messages. |
void |
setDefaultResolving()
Load the default entity catalog and enable loading entities from the classloader for the classloader that loaded this class. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final String CLASSPATH_PROTOCOL
public static final String CLASSPATH_PROTOCOL_PREFIX
classloader.getResourceAsStream(String)
.public static final String DEFAULT_ENTITY_CATALOG
setDefaultResolving()
public static final String LUTRIS_ENTITY_CATALOG
setDefaultResolving()
Constructor Detail |
public XMLEntityResolver()
Method Detail |
public void setDebugWriter(PrintWriter writer)
public PrintWriter getDebugWriter()
public void loadCatalog(InputSource source) throws SAXException, IOException
source
- The catalog source.SAXException
- Throws exception on SAX error.IOException
- Throws exception on i/o error.public void setDefaultResolving() throws SAXException, IOException
public String getPublicMapping(String publicId, String systemId)
publicId
- The public identifier, or "key".public String getSystemMapping(String systemId)
systemId
- The system identifier "key".public void addClassLoader(ClassLoader classLoader)
public Enumeration getClassLoaders()
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
resolveEntity
in interface EntityResolver
EntityResolver
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |