|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.dna.impl.ConfigurationUtil
Class containing utility methods to work with Configuration objects.
Field Summary | |
static java.lang.String |
PATH_SEPARATOR
Constant defining separator for paths in document. |
static java.lang.String |
ROOT_PATH
Constant defining root path of document. |
Constructor Summary | |
ConfigurationUtil()
|
Method Summary | |
static Configuration |
buildFromXML(org.xml.sax.InputSource input)
Create a configuration object from specified XML InputSource. |
static boolean |
equals(Configuration configuration1,
Configuration configuration2)
Test if two configuration objects are equal. |
static void |
serializeToResult(javax.xml.transform.Result result,
Configuration configuration)
Serialize Configuration object to sepcified Result object. |
static Configuration |
toConfiguration(org.w3c.dom.Element element)
Convert specified Element into a configuration object. |
static org.w3c.dom.Element |
toElement(Configuration configuration)
Convert specified Configuration object into a Element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PATH_SEPARATOR
public static final java.lang.String ROOT_PATH
Constructor Detail |
public ConfigurationUtil()
Method Detail |
public static void serializeToResult(javax.xml.transform.Result result, Configuration configuration) throws java.lang.Exception
javax.xml.transform.stream.StreamResult
in code
such as;
ConfigurationUtil. serializeToResult( new StreamResult( System.out ), configuration );
The developer can also output to SAX stream or DOM trees
via SAXResult
and
javax.xml.transform.dom.DOMResult
.
result
- the result object to serialize configuration toconfiguration
- the configuration
java.lang.Exception
- if unable to serialize configurationpublic static Configuration buildFromXML(org.xml.sax.InputSource input) throws java.lang.Exception
input
- the InputSource
java.lang.Exception
- if unable to create configuration object
from inputpublic static Configuration toConfiguration(org.w3c.dom.Element element)
element
- the Element
public static org.w3c.dom.Element toElement(Configuration configuration)
configuration
- the Configuration
public static boolean equals(Configuration configuration1, Configuration configuration2)
configuration1
- a configuration objectconfiguration2
- a configuration object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |