public void updateSimple(AugeasNode parentNode, PropertyDefinitionSimple propDef, Property prop, int seq)
throws AugeasRhqException {
PropertySimple simpleProp = null;
AugeasNode node;
if (prop instanceof PropertyList) {
PropertyList lst = (PropertyList) prop;
List<Property> props = lst.getList();
simpleProp = (PropertySimple) props.get(seq - 1);
}
if (prop instanceof PropertyMap) {
PropertyMap map = (PropertyMap) prop;
simpleProp = (PropertySimple) map.get(propDef.getName());
}
List<AugeasNode> nodes = tree.matchRelative(parentNode, propDef.getName());
if (nodes.isEmpty()) {
node = tree.createNode(parentNode, propDef.getName(), null, 1);
} else
node = nodes.get(0);
node.setValue(simpleProp.getStringValue());
}