01: package org.contineo.util.config;
02:
03: import org.contineo.util.config.XMLBean;
04: import org.jdom.Element;
05:
06: /**
07: * @author Michael Scholz
08: */
09: public class DBMSConfigurator {
10:
11: private XMLBean xml;
12:
13: /** Creates a new instance of DBMSConfigurator */
14: public DBMSConfigurator() {
15: ClassLoader loader = Thread.currentThread()
16: .getContextClassLoader();
17: xml = new XMLBean(loader
18: .getResource("org/contineo/core/dbms.xml"));
19: }
20:
21: public String getAttribute(String name, String attr) {
22: Element element = xml.getChild("db", "name", name);
23: return xml.getAttributeValue(element, attr);
24: }
25: }
|