org.ow2.util.xmlconfig.source
Class XMLConfigurationSource

java.lang.Object
  extended by org.ow2.util.xmlconfig.source.XMLConfigurationSource
All Implemented Interfaces:
IConfigurationSource

public class XMLConfigurationSource
extends java.lang.Object
implements IConfigurationSource

This IConfigurationSource wraps an URL.

Author:
Guillaume Sauthier

Constructor Summary
XMLConfigurationSource(java.net.URL xmlConfigurationSource)
          Constructs a new IConfigurationSource based on URL.
 
Method Summary
 org.w3c.dom.Document getDocument(boolean validating)
          Parse the configuration source's content.
 java.lang.String getName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLConfigurationSource

public XMLConfigurationSource(java.net.URL xmlConfigurationSource)
Constructs a new IConfigurationSource based on URL.

Parameters:
xmlConfigurationSource - URL pointing to an XML configuration file.
Method Detail

getDocument

public org.w3c.dom.Document getDocument(boolean validating)
                                 throws org.ow2.util.xml.DocumentParserException
Parse the configuration source's content.

Specified by:
getDocument in interface IConfigurationSource
Parameters:
validating - is the parser validating ?
Returns:
the parsed Document
Throws:
org.ow2.util.xml.DocumentParserException - if the document cannot be parsed or is not valid.

getName

public java.lang.String getName()
Specified by:
getName in interface IConfigurationSource
Returns:
the name of the source (useful for textual representation).


Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.