org.greenstone.fedora.installer
Class GSearchInstaller.IgnoreDTDEntityResolver

java.lang.Object
  extended by org.greenstone.fedora.installer.GSearchInstaller.IgnoreDTDEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver
Enclosing class:
GSearchInstaller

static class GSearchInstaller.IgnoreDTDEntityResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver

This EntityResolver allows the XML parser to ignore validating against the DTD specified in the XML since it is pointing to the wrong location. After parsing, we will put the DTD back in. (Package class, only used here.) See http://forum.java.sun.com/thread.jspa?threadID=284209&forumID=34


Field Summary
 java.lang.String systemID
           
 
Constructor Summary
GSearchInstaller.IgnoreDTDEntityResolver(java.lang.String systemID)
          Constructor that 'resolves' (by ignoring) DTDs for the given systemID.
 
Method Summary
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          If the systemId matches the one this IgnoreDTDEntityResolver was created for, then the specified DTD is skipped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

systemID

public final java.lang.String systemID
Constructor Detail

GSearchInstaller.IgnoreDTDEntityResolver

public GSearchInstaller.IgnoreDTDEntityResolver(java.lang.String systemID)
Constructor that 'resolves' (by ignoring) DTDs for the given systemID.

Parameters:
systemID - is the DTD path to be ignored, given in the XML file as a SYSTEM property.
Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws org.xml.sax.SAXException,
                                             java.io.IOException
If the systemId matches the one this IgnoreDTDEntityResolver was created for, then the specified DTD is skipped.

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Parameters:
publicId - the public ID in the DOCTYPE (not used here).
systemId - is the SYSTEM id in the DOCTYPE that specifies the DTD which is to be checked against this IgnoreDTDEntityResolver object's systemID.
Throws:
org.xml.sax.SAXException
java.io.IOException