org.objectweb.easybeans.persistence.xml
Class JPersistenceUnitInfoLoader

java.lang.Object
  extended by org.objectweb.easybeans.persistence.xml.JPersistenceUnitInfoLoader

public final class JPersistenceUnitInfoLoader
extends java.lang.Object

Class used to fill PersistenceUnitInfo implementation class by loading an XML.

Author:
Florent Benoit

Nested Class Summary
static class JPersistenceUnitInfoLoader.PersistenceEntityResolver
          Entity resolver allowing to find schema within the classloader.
static class JPersistenceUnitInfoLoader.XMLUtils
          Class with some useful methods on XML document.
 
Field Summary
private static JLog logger
          Logger.
private static boolean validating
          Validating with schema ?
 
Constructor Summary
private JPersistenceUnitInfoLoader()
          Utility class, no public constructor.
 
Method Summary
private static org.w3c.dom.Document getDocument(java.net.URL url)
          Builds a new Document for a given xml file.
static JPersistenceUnitInfo[] loadPersistenceUnitInfoImpl(java.net.URL url)
          Load the persistence.xml file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static JLog logger
Logger.


validating

private static boolean validating
Validating with schema ?

Constructor Detail

JPersistenceUnitInfoLoader

private JPersistenceUnitInfoLoader()
Utility class, no public constructor.

Method Detail

loadPersistenceUnitInfoImpl

public static JPersistenceUnitInfo[] loadPersistenceUnitInfoImpl(java.net.URL url)
                                                          throws JPersistenceUnitInfoException
Load the persistence.xml file.

Parameters:
url - the URL of the the Reader of the XML file.
Returns:
an application object.
Throws:
JPersistenceUnitInfoException - if parsing of XML file fails.

getDocument

private static org.w3c.dom.Document getDocument(java.net.URL url)
                                         throws JPersistenceUnitInfoException
Builds a new Document for a given xml file.

Parameters:
url - the URL of the the XML file.
Returns:
an application object.
Throws:
JPersistenceUnitInfoException - if creating of builder fails.