Package org.exolab.castor.util
Class DTDResolver
java.lang.Object
org.exolab.castor.util.DTDResolver
- All Implemented Interfaces:
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
This 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.
- Version:
- $Revision: 7774 $ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $
- Author:
- Assaf Arkin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Holds information about a given DTD of XML Schema. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new DTD resolver.DTDResolver
(EntityResolver resolver) Constructs a new DTD resolver. -
Method Summary
Modifier and TypeMethodDescriptionReturns the base URL in use.resolveEntity
(String publicId, String systemId) Resolves public invalid input: '&' system ids to files stored within the JAR.void
setBaseURL
(URL baseUrl) Sets the base URL to use.
-
Constructor Details
-
DTDResolver
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. -
DTDResolver
public DTDResolver()Constructs a new DTD resolver.
-
-
Method Details
-
setBaseURL
Sets the base URL to use.- Parameters:
baseUrl
- Base URL.
-
getBaseURL
Returns the base URL in use.- Returns:
- The base URL.
-
resolveEntity
Resolves public invalid input: '&' system ids to files stored within the JAR.- Specified by:
resolveEntity
in interfaceEntityResolver
- Throws:
IOException
SAXException
- See Also:
-