org.exolab.castor.util
Class DTDResolver
java.lang.Object
org.exolab.castor.util.DTDResolver
- EntityResolver
public class DTDResolver
extends java.lang.Object
implements EntityResolver
Entity resolver for various DTD/schema. Holds information and performs
resolving on a variety of DTD and schema, both those defined by Castor and
those used by Castor and cached by it.
The following DTD and XML schema are supported:
- Castor mapping DTD/Schema
- Castor JDO configuration DTD/Schema
- XML Schema DTDs
Thie resolver can resolve both public and system identifiers, and will return
an input stream into a cached resource in the Castor JAR.
This resolver can be used as wrapper to another entity resolver. For example,
if a resolver is used for external entities in the mapping file, construct a
new resolver using the
DTDResolver(EntityResolver)
constructor.
$Revision: 6225 $ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $(package private) static class | DTDResolver.DTDInfo - Holds information about a given DTD of XML Schema.
|
DTDResolver() - Constructs a new DTD resolver.
|
DTDResolver(EntityResolver resolver) - Constructs a new DTD resolver.
|
URL | getBaseURL() - Returns the base URL in use.
|
InputSource | resolveEntity(String publicId, String systemId) - Resolves public & system ids to files stored within the JAR.
|
void | setBaseURL(URL baseUrl) - Sets the base URL to use.
|
DTDResolver
public DTDResolver()
Constructs a new DTD resolver.
DTDResolver
public DTDResolver(EntityResolver resolver)
Constructs a new DTD resolver. This resolver wraps another resolver and
will delegate all resolving not related to the Castor mapping files to
that resolver. The wrapper resolver will typically be used for entities
appearing in the actual mapping file.
getBaseURL
public URL getBaseURL()
Returns the base URL in use.
resolveEntity
public InputSource resolveEntity(String publicId,
String systemId)
throws IOException,
SAXException
Resolves public & system ids to files stored within the JAR.
org.xml.sax.EntityResolver.resolveEntity(java.lang.String,
java.lang.String)
setBaseURL
public void setBaseURL(URL baseUrl)
Sets the base URL to use.
Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com