org.apache.torque.engine.database.transform
Class DTDResolver

java.lang.Object
  extended byorg.apache.torque.engine.database.transform.DTDResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver

public class DTDResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver

A resolver to get the database.dtd file for the XML parser from the jar.

Version:
$Id: DTDResolver.java,v 1.9 2003/07/31 16:04:06 dlr Exp $
Author:
Martin Poeschl, Kurt Schrader, Quinton McCombs

Field Summary
private  org.xml.sax.InputSource databaseDTD
          InputSource for database.dtd.
private static org.apache.commons.logging.Log log
          Logging class from commons.logging
static java.lang.String WEB_SITE_DTD
          Where the DTD is located on the web.
 
Constructor Summary
DTDResolver()
          constructor
 
Method Summary
private  org.xml.sax.InputSource getInputSource(java.lang.String urlString)
          Retrieves a XML input source for the specified URL.
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          An implementation of the SAX EntityResolver interface to be called by the XML parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEB_SITE_DTD

public static final java.lang.String WEB_SITE_DTD
Where the DTD is located on the web.

See Also:
Constant Field Values

databaseDTD

private org.xml.sax.InputSource databaseDTD
InputSource for database.dtd.


log

private static org.apache.commons.logging.Log log
Logging class from commons.logging

Constructor Detail

DTDResolver

public DTDResolver()
            throws org.xml.sax.SAXException
constructor

Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws java.io.IOException
An implementation of the SAX EntityResolver interface to be called by the XML parser.

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Parameters:
publicId - The public identifier of the external entity
systemId - The system identifier of the external entity
Returns:
An InputSource for the database.dtd file.
Throws:
java.io.IOException

getInputSource

private org.xml.sax.InputSource getInputSource(java.lang.String urlString)
                                        throws java.io.IOException
Retrieves a XML input source for the specified URL.

Parameters:
urlString - The URL of the input source.
Returns:
InputSource for the URL.
Throws:
java.io.IOException


Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.