KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > contineo > core > config > DBMSConfigurator


1 /*
2  * DBMSConfigurator.java
3  *
4  * Created on 16. Januar 2004, 23:03
5  */

6
7 package org.contineo.core.config;
8
9 import org.contineo.core.XMLBean;
10 /**
11  *
12  * @author Michael Scholz
13  */

14 public class DBMSConfigurator {
15
16     /**
17      *
18      * @uml.property name="xml"
19      * @uml.associationEnd
20      * @uml.property name="xml" multiplicity="(1 1)"
21      */

22     private XMLBean xml;
23
24     
25     /** Creates a new instance of DBMSConfigurator */
26     public DBMSConfigurator() {
27         ClassLoader JavaDoc loader = Thread.currentThread().getContextClassLoader();
28         xml = new XMLBean(loader.getResource("dbms.xml"));
29     }
30     
31     public String JavaDoc getAttribute(String JavaDoc name, String JavaDoc attr) {
32         return xml.getAttributeValue(xml.getChild("db","name",name), attr);
33     }
34 }
35
Popular Tags