Google

JBoss API: Class XmlFileLoader

org.jboss.metadata
Class XmlFileLoader

java.lang.Object
  |
  +--org.jboss.metadata.XmlFileLoader

public class XmlFileLoader
extends java.lang.Object

files, process them using DTDs and create ApplicationMetaData object for future using

Version:
$Revision: 1.15.2.7 $ Revisions: syntax error.
Author:
Bill Burke, Sebastien Alborini, Wolfgang Werner, Darius Davidavicius, Scott Stark
See Also:

Constructor Summary
XmlFileLoader()
           
XmlFileLoader(boolean validateDTDs)
           
 
Method Summary
 java.lang.ClassLoader getClassLoader()
          Gets the class loader
static boolean getDefaultValidateDTDs()
           
 org.w3c.dom.Document getDocument(java.io.InputStream is, java.lang.String inPath)
static org.w3c.dom.Document getDocument(java.net.URL url)
          Invokes getDocument(url, defaultValidateDTDs)
static org.w3c.dom.Document getDocument(java.net.URL url, boolean validateDTDs)
 org.w3c.dom.Document getDocumentFromURL(java.net.URL url)
 ApplicationMetaData getMetaData()
           
 boolean getValidateDTDs()
          Get the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.
 ApplicationMetaData load()
          load() This method creates the ApplicationMetaData.
 void setClassLoader(java.lang.ClassLoader cl)
          Set the class loader
static void setDefaultValidateDTDs(boolean validate)
           
 void setValidateDTDs(boolean validate)
          Set the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

public XmlFileLoader()

public XmlFileLoader(boolean validateDTDs)
Method Detail

getDefaultValidateDTDs

public static boolean getDefaultValidateDTDs()

setDefaultValidateDTDs

public static void setDefaultValidateDTDs(boolean validate)

getMetaData

public ApplicationMetaData getMetaData()

setClassLoader

public void setClassLoader(java.lang.ClassLoader cl)
Set the class loader
Parameters:
ClassLoader - cl - class loader

getClassLoader

public java.lang.ClassLoader getClassLoader()
Gets the class loader
Returns:
ClassLoader - the class loader

getValidateDTDs

public boolean getValidateDTDs()
Get the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.

setValidateDTDs

public void setValidateDTDs(boolean validate)
Set the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.

load

public ApplicationMetaData load()
                         throws java.lang.Exception
load() This method creates the ApplicationMetaData. The configuration files are found in the classLoader. the defaults if the user provides them

getDocument

public static org.w3c.dom.Document getDocument(java.net.URL url)
                                        throws DeploymentException
Invokes getDocument(url, defaultValidateDTDs)

getDocument

public static org.w3c.dom.Document getDocument(java.net.URL url,
                                               boolean validateDTDs)
                                        throws DeploymentException
Calls new XmlFileLoader(validateDTDs).getDocumentFromURL(url);

getDocumentFromURL

public org.w3c.dom.Document getDocumentFromURL(java.net.URL url)
                                        throws DeploymentException
Calls getDocument(url.openStream(), url.getPath());

getDocument

public org.w3c.dom.Document getDocument(java.io.InputStream is,
                                        java.lang.String inPath)
                                 throws DeploymentException
is enabled if validateDTDs is true and we install an EntityResolver and ErrorHandler to resolve J2EE DTDs and handle errors.
only for error reporting.
Returns:
Document


Copyright © 2000 The JBoss Organization. All Rights Reserved.