Example usage for org.apache.commons.configuration SubnodeConfiguration getKeys

List of usage examples for org.apache.commons.configuration SubnodeConfiguration getKeys

Introduction

In this page you can find the example usage for org.apache.commons.configuration SubnodeConfiguration getKeys.

Prototype

public Iterator getKeys(String prefix) 

Source Link

Document

Returns an iterator with all keys defined in this configuration that start with the given prefix.

Usage

From source file:edu.isi.wings.portal.classes.Config.java

@SuppressWarnings("rawtypes")
private ExeEngine getExeEngine(SubnodeConfiguration node) {
    String name = node.getString("name");
    String impl = node.getString("implementation");
    ExeEngine.Type type = ExeEngine.Type.valueOf(node.getString("type"));
    ExeEngine engine = new ExeEngine(name, impl, type);
    for (Iterator it = node.getKeys("properties"); it.hasNext();) {
        String key = (String) it.next();
        String value = node.getString(key);
        engine.addProperty(key.replace("properties.", ""), value);
    }//w  w w .  j  a va 2  s .  c om
    return engine;
}