站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.4 正式版 API 英文文档

DTDEntityResolver (Hibernate API Documentation) - Hibernate 3.2.4 正式版 API 英文文档


org.hibernate.util
Class DTDEntityResolver

java.lang.Object
  extended byorg.hibernate.util.DTDEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver, Serializable

public class DTDEntityResolver
extends Object
implements org.xml.sax.EntityResolver, Serializable

An EntityResolver implementation which attempts to resolve various systemId URLs to local classpath lookups

  1. Any systemId URL beginning with http://hibernate.sourceforge.net/ is searched for as a classpath resource in the classloader which loaded the Hibernate classes.
  2. Any systemId URL using classpath as the scheme (i.e. starting with classpath:// is searched for as a classpath resource using first the current thread context classloader and then the classloader which loaded the Hibernate classes.

Any entity references which cannot be resolved in relation to the above rules result in returning null, which should force the SAX reader to handle the entity reference in its default manner.

See Also:
Serialized Form

Constructor Summary
DTDEntityResolver()
           
 
Method Summary
 org.xml.sax.InputSource resolveEntity(String publicId, String systemId)
           
protected  InputStream resolveInHibernateNamespace(String path)
           
protected  InputStream resolveInLocalNamespace(String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTDEntityResolver

public DTDEntityResolver()
Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(String publicId,
                                             String systemId)
Specified by:
resolveEntity in interface org.xml.sax.EntityResolver

resolveInHibernateNamespace

protected InputStream resolveInHibernateNamespace(String path)

resolveInLocalNamespace

protected InputStream resolveInLocalNamespace(String path)