Package org.jconfig

Examples of org.jconfig.NestedConfiguration


     *
     * @param doc
     *            Description of the Parameter
     */
    public Configuration parse(Document doc, String configName) {
        Configuration configuration = new NestedConfiguration(configName);
        String currentCategory;
        getBaseConfigName(doc, configuration);
        getVariables(doc, configuration);
        getIncludeProperties(doc, configuration);
        Element root = doc.getDocumentElement();
        // first we get all nodes where the element is category
        for (Node child = root.getFirstChild(); child != null; child = child
                .getNextSibling()) {
            if (child.getNodeName().equals("category")) {
                NamedNodeMap curAtt = child.getAttributes();
                Node curNode = curAtt.getNamedItem("name");
                currentCategory = curNode.getNodeValue();
                NestedCategory category = new NestedCategory(currentCategory);
                getCategory(child, category, configName);
                configuration.setCategory(category);
            }
        }
        return configuration;
    }
View Full Code Here

TOP

Related Classes of org.jconfig.NestedConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.