org.spaceroots.rkcheck
Class EmbeddedCatalogResolver
java.lang.Object
org.spaceroots.rkcheck.EmbeddedCatalogResolver
- All Implemented Interfaces:
- org.xml.sax.EntityResolver
- public class EmbeddedCatalogResolver
- extends java.lang.Object
- implements org.xml.sax.EntityResolver
This class implements a resolver for external entities that are
cached locally in the same jar file as the application.
- Version:
- $Id: EmbeddedCatalogResolver.java,v 1.1 2004/05/23 13:30:17 luc Exp $
- Author:
- L. Maisonobe
|
Constructor Summary |
EmbeddedCatalogResolver(java.lang.String catalog,
javax.xml.parsers.DocumentBuilder builder)
Simple constructor.
|
|
Method Summary |
java.lang.String |
getResourceName(java.lang.String publicId)
Get the resource associated with a public identifier |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EmbeddedCatalogResolver
public EmbeddedCatalogResolver(java.lang.String catalog,
javax.xml.parsers.DocumentBuilder builder)
- Simple constructor.
Build an empty resolver.
- Parameters:
catalog - catalog path (inside the jar)builder - document builder (as a side effect, the builder
will use the instance as its entity resolver)
getResourceName
public java.lang.String getResourceName(java.lang.String publicId)
throws java.io.IOException,
org.xml.sax.SAXException
- Get the resource associated with a public identifier
- Parameters:
publicId - public identifier
- Returns:
- the resource name or null if the identifier is unknown
- Throws:
java.io.IOException - if parsing the catalog throws one
org.xml.sax.SAXException - if parsing the catalog throws one
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException
- Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
- Throws:
org.xml.sax.SAXException
Copyright © 2002-2004 Luc Maisonobe. All Rights Reserved.