Example usage for org.apache.commons.configuration HierarchicalConfiguration getProperty

List of usage examples for org.apache.commons.configuration HierarchicalConfiguration getProperty

Introduction

In this page you can find the example usage for org.apache.commons.configuration HierarchicalConfiguration getProperty.

Prototype

public Object getProperty(String key) 

Source Link

Document

Fetches the specified property.

Usage

From source file:org.onosproject.driver.XmlConfigParser.java

public static String parseSwitchId(HierarchicalConfiguration cfg) {
    HierarchicalConfiguration field = cfg
            .configurationAt("data.capable-switch." + "logical-switches." + "switch");
    return field.getProperty("id").toString();
}

From source file:org.onosproject.driver.XmlConfigParser.java

public static String parseCapableSwitchId(HierarchicalConfiguration cfg) {
    HierarchicalConfiguration field = cfg.configurationAt("data.capable-switch");
    return field.getProperty("id").toString();
}

From source file:org.onosproject.drivers.utilities.YangXmlUtils.java

private void addProperties(HierarchicalConfiguration cfg, HierarchicalConfiguration complete) {
    cfg.getKeys().forEachRemaining(key -> {
        String property = (String) cfg.getProperty(key);
        if (!property.equals("")) {
            complete.setProperty(key, property);
        }/*from  w w w.j av  a 2s  . c  o m*/
    });
}