edu.harvard.hul.ois.jhove.module.html
Class DTDMapper

java.lang.Object
  extended by edu.harvard.hul.ois.jhove.module.html.DTDMapper

public class DTDMapper
extends java.lang.Object

Class to map public DTD ID's to files which are included with this HTML module. This class is used by the XML module, due to the intermodulary nature of XHTML.

Author:
Gary McGath

Constructor Summary
DTDMapper()
           
 
Method Summary
static java.lang.String getXHTMLVersion(java.lang.String publicID)
          Returns the XHTML version associated with the DTD's public ID.
static boolean isXHTMLDTD(java.lang.String publicID)
          Returns TRUE if the parameter is the public ID of a known XHTML DTD.
static org.xml.sax.InputSource publicIDToFile(java.lang.String publicID)
          Attempts to convert a public ID to a matching DTD or Entity resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTDMapper

public DTDMapper()
Method Detail

publicIDToFile

public static org.xml.sax.InputSource publicIDToFile(java.lang.String publicID)
Attempts to convert a public ID to a matching DTD or Entity resource. Returns an InputStream for that resource if there is a match. Otherwise returns null.

Parameters:
publicID - The PUBLIC ID associated with a DTD or entity document

isXHTMLDTD

public static boolean isXHTMLDTD(java.lang.String publicID)
Returns TRUE if the parameter is the public ID of a known XHTML DTD.


getXHTMLVersion

public static java.lang.String getXHTMLVersion(java.lang.String publicID)
Returns the XHTML version associated with the DTD's public ID. Returns null if it isn't a known XHTML public ID.