org.codehaus.spice.configkit
Class ResolverFactory
java.lang.Object
|
+--org.codehaus.spice.configkit.ResolverFactory
- public final class ResolverFactory
- extends Object
This is a utility class for creating an EntityResolver that can resolve all
entitys contained within ClassLoader. The entitys are discovered by looking
in a catalog file META-INF/spice/catalog.xml
. The format of the
catalog file is;
<catalog version="1.0">
<entity publicId="-//PHOENIX/Assembly DTD Version 1.0//EN"
resource="org/apache/avalon/phoenix/tools/assembly.dtd"/>
<entity systemId="http://jakarta.apache.org/phoenix/assembly_1_0.dtd"
resource="org/apache/avalon/phoenix/tools/assembly.dtd"/>
<entity publicId=""-//PHOENIX/Mx Info DTD Version 1.0//EN""
systemId="http://jakarta.apache.org/phoenix/mxinfo_1_0.dtd"
resource="org/apache/avalon/phoenix/tools/mxinfo.dtd"/>
</catalog>
Note that at least one of publicId
or systemId
must be specified and resource
must always be specified.
- Version:
- $Revision: 1.1 $ $Date: 2003/12/03 03:19:28 $
- Author:
- Peter Donald
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResolverFactory
public ResolverFactory()
createResolver
public static final org.xml.sax.EntityResolver createResolver(ClassLoader classLoader)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
IOException
- Parameters:
classLoader
- the ClassLoader to scan for catalog files
- Returns:
- an Entity Resolver that will resolver all the entitys defined in
catalog and loadable from ClassLoader
- Throws:
org.xml.sax.SAXException
- if unable to parse a Catalog file
IOException
- if unable to load a Catalog file
javax.xml.parsers.ParserConfigurationException
Copyright © 2003 Codehaus. All Rights Reserved.