stylesList = stylesElem.getElementsByTagName("style");
}
if ((stylesList == null) || (stylesList.getLength() == 0)) {
//no styles where defined, just add a default one
StyleDTO s = new StyleDTO();
s.setId("normal");
s.setFilename(new File(baseDir, "normal.sld"));
s.setDefault(true);
styles.put("normal", s);
}
int styleCount = stylesList.getLength();
Element styleElem;
for (int i = 0; i < styleCount; i++) {
styleElem = (Element) stylesList.item(i);
StyleDTO s = new StyleDTO();
s.setId(ReaderUtils.getAttribute(styleElem, "id", true));
s.setFilename(new File(baseDir,
ReaderUtils.getAttribute(styleElem, "filename", true)));
s.setDefault(ReaderUtils.getBooleanAttribute(styleElem, "default",
false, false));
styles.put(s.getId(), s);
LOGGER.config("Loaded style " + s.getId());
}
return styles;
}