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

java.lang.Object
  extended by org.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 491216 2006-12-30 12:14:45Z tfischer $
Author:
Martin Poeschl, Kurt Schrader, Quinton McCombs

Field Summary
static java.lang.String WEB_SITE_DTD
          Where the DTD is located on the web.
static java.lang.String WEB_SITE_DTD_3_2
          Where the 3.2 DTD is located on the web.
 
Constructor Summary
DTDResolver()
          constructor
 
Method Summary
 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

WEB_SITE_DTD_3_2

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

See Also:
Constant Field Values
Constructor Detail

DTDResolver

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

Throws:
org.xml.sax.SAXException
Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws java.io.IOException,
                                             org.xml.sax.SAXException
An implementation of the SAX EntityResolver interface to be called by the XML parser. If the dtd is the current Torque DTD, the DTD is read from the generator jar. In all other cases, null is returned to indicate that the parser should open a regular connection to the systemId URI.

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 in the generator jar, or null.
Throws:
java.io.IOException
org.xml.sax.SAXException


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