*
* @throws ConfigurationException When an error occurs.
*/
protected FeatureTypeInfoDTO loadFeaturePt2(Element fTypeRoot)
throws ConfigurationException {
FeatureTypeInfoDTO ft = new FeatureTypeInfoDTO();
ft.setName(ReaderUtils.getChildText(fTypeRoot, "name", true));
ft.setTitle(ReaderUtils.getChildText(fTypeRoot, "title", true));
ft.setAbstract(ReaderUtils.getChildText(fTypeRoot, "abstract"));
String keywords = ReaderUtils.getChildText(fTypeRoot, "keywords");
if (keywords != null) {
List l = new LinkedList();
String[] ss = keywords.split(",");
for (int i = 0; i < ss.length; i++)
l.add(ss[i].trim());
ft.setKeywords(l);
}
ft.setDataStoreId(ReaderUtils.getAttribute(fTypeRoot, "datastore", true));
ft.setSRS(Integer.parseInt(ReaderUtils.getChildText(fTypeRoot, "SRS",
true)));
Element tmp = ReaderUtils.getChildElement(fTypeRoot, "styles");
if (tmp != null) {
ft.setDefaultStyle(ReaderUtils.getAttribute(tmp, "default", false));
}
// Modif C. Kolbowicz - 06/10/2004
Element legendURL = ReaderUtils.getChildElement(fTypeRoot, "LegendURL");
if (legendURL != null) {
LegendURLDTO legend = new LegendURLDTO();
legend.setWidth(Integer.parseInt(ReaderUtils.getAttribute(
legendURL, "width", true)));
legend.setHeight(Integer.parseInt(ReaderUtils.getAttribute(
legendURL, "height", true)));
legend.setFormat(ReaderUtils.getChildText(legendURL, "Format", true));
legend.setOnlineResource(ReaderUtils.getAttribute(
ReaderUtils.getChildElement(legendURL, "OnlineResource",
true), "xlink:href", true));
ft.setLegendURL(legend);
}
//-- Modif C. Kolbowicz - 06/10/2004
ft.setLatLongBBox(loadLatLongBBox(ReaderUtils.getChildElement(
fTypeRoot, "latLonBoundingBox")));
Element numDecimalsElem = ReaderUtils.getChildElement(fTypeRoot,
"numDecimals", false);
if (numDecimalsElem != null) {
ft.setNumDecimals(ReaderUtils.getIntAttribute(numDecimalsElem,
"value", false, 8));
}
ft.setDefinitionQuery(loadDefinitionQuery(fTypeRoot));
return ft;
}