CloseableIterator<FeatureTypeInfo> it =
catalog.list(FeatureTypeInfo.class, equal("store.id", store.getId()));
) {
while(it.hasNext()) {
FeatureTypeInfo ft = it.next();
FeatureType schema = ft.getFeatureType();
if (!(schema instanceof SimpleFeatureType)) {
LOG.warning("Skipping feature type: " + ft.getName() + ", only simple schema are supported");
continue;
}
FeatureEntry fe = new FeatureEntry();
fe.setTableName(ft.getName());
fe.setIdentifier(ft.getTitle());
fe.setDescription(ft.getAbstract());
try {
fe.setBounds(ft.boundingBox());
} catch (Exception e) {
throw new IOException(e);
}
fe.setSrid(srid(ft.getSRS()));
GeometryDescriptor geom = schema.getGeometryDescriptor();
if (geom != null) {
fe.setGeometryColumn(geom.getLocalName());
fe.setGeometryType(Geometries.getForBinding(
(Class<? extends com.vividsolutions.jts.geom.Geometry>) geom.getType().getBinding()));
}