org.codehaus.mojo.hibernate2
Class HibernateEntityResolver

java.lang.Object
  extended by org.codehaus.mojo.hibernate2.HibernateEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver

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

A class to resolve external entity definitions for j2ee artifacts. Based on the J2EEEntityResolver from the J2EE plugin

Version:
$Id: HibernateEntityResolver.java 738 2005-10-09 20:49:59Z trygvis $
Author:
eric pugh

Field Summary
static java.lang.String[] HIBERNATE_DTDS
          list of j2ee dtds that are being made available
static java.lang.String[] HIBERNATE_RESOURCES
           
 
Constructor Summary
HibernateEntityResolver()
          Creates a new instance of EntityResolver
 
Method Summary
protected  java.util.Map getIdToResource()
          Getter for publicId to resource name map.
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          resolve the entity given by the provided Ids
protected  void setIdToResource(java.util.Map idToResource)
          Setter for publicId to resource name map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIBERNATE_DTDS

public static final java.lang.String[] HIBERNATE_DTDS
list of j2ee dtds that are being made available


HIBERNATE_RESOURCES

public static final java.lang.String[] HIBERNATE_RESOURCES
Constructor Detail

HibernateEntityResolver

public HibernateEntityResolver()
Creates a new instance of EntityResolver

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
resolve the entity given by the provided Ids

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Parameters:
publicId - the public id of the entity
systemId - the 'system location' (typically a URL) of the entity
Returns:
an input source for retrieval of the entity
Throws:
java.io.IOException - when an I/O error occurs retrieving the entity
org.xml.sax.SAXException - if there are any problems

getIdToResource

protected java.util.Map getIdToResource()
Getter for publicId to resource name map.

Returns:
Value of property idToResource.

setIdToResource

protected void setIdToResource(java.util.Map idToResource)
Setter for publicId to resource name map.

Parameters:
idToResource - New value of property idToResource.


Copyright © 2010. All Rights Reserved.