org.oddjob.arooa.xml
Class XMLConfiguration

java.lang.Object
  extended by org.oddjob.arooa.xml.XMLConfiguration
All Implemented Interfaces:
ArooaConfiguration

public class XMLConfiguration
extends Object
implements ArooaConfiguration

An ArooaConfiguration that wraps some XML data and allows it to be parsed.

Author:
rob

Constructor Summary
XMLConfiguration(File file)
          Constructor for a file.
XMLConfiguration(InputSource inputSource)
          Constructor for an InputSource.
XMLConfiguration(String resource, ClassLoader maybeClassLoader)
          Constructor for a ClassLoader resource.
XMLConfiguration(String systemId, InputStream in)
          Constructor for an InputStream.
XMLConfiguration(String systemId, String xml)
          Constructor for Text.
 
Method Summary
 String getSavedXml()
          Get the resultant XML from calling ConfigurationHandle.save().
 ConfigurationHandle parse(ArooaContext parentContext)
          Parse the encapsulated configuration.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLConfiguration

public XMLConfiguration(File file)
Constructor for a file.

Parameters:
file -

XMLConfiguration

public XMLConfiguration(String systemId,
                        String xml)
Constructor for Text.

Parameters:
systemId -
xml -

XMLConfiguration

public XMLConfiguration(String resource,
                        ClassLoader maybeClassLoader)
Constructor for a ClassLoader resource. Note that, like the underlying ClassLoader.getResourceAsStream, the resource does not have a '/' before the package name.

E.g. new XMLConfiguration("org/oddjob/stuff/config.xml");

Parameters:
resource -

XMLConfiguration

public XMLConfiguration(String systemId,
                        InputStream in)
Constructor for an InputStream.

Parameters:
systemId -
in -

XMLConfiguration

public XMLConfiguration(InputSource inputSource)
Constructor for an InputSource.

Parameters:
inputSource -
Method Detail

parse

public ConfigurationHandle parse(ArooaContext parentContext)
                          throws ArooaParseException
Description copied from interface: ArooaConfiguration
Parse the encapsulated configuration.

Specified by:
parse in interface ArooaConfiguration
Parameters:
parentContext - The parent context to use.
Returns:
A ConfigurationHandle.
Throws:
ArooaParseException

getSavedXml

public String getSavedXml()
Get the resultant XML from calling ConfigurationHandle.save().

Returns:

toString

public String toString()
Overrides:
toString in class Object