* @return the layers
*/
private static Map getLayers(SourceBean layersConfigurationSB) {
Map layers;
List layerList;
Layer layer;
Properties attributes;
String attributeValue;
layers = new HashMap();
layerList = layersConfigurationSB.getAttributeAsList("LAYER");
for(int i = 0; i < layerList.size(); i++) {
SourceBean layerSB = (SourceBean)layerList.get(i);
layer = new Layer();
attributeValue = (String)layerSB.getAttribute("name");
layer.setName(attributeValue);
attributeValue = (String)layerSB.getAttribute("description");
layer.setDescription(attributeValue);
attributeValue = (String)layerSB.getAttribute("selected");
if(attributeValue != null){
layer.setSelected(attributeValue.equalsIgnoreCase("true"));
}
else {
layer.setSelected(false);
}
attributeValue = (String)layerSB.getAttribute("default_fill_color");
layer.setDefaultFillColor(attributeValue);
layers.put(layer.getName(), layer);
}
return layers;
}