* Creates a vector layer with associated FeatureType in the internal MemoryDataStore with the
* given type and two attributes: name:String and geom:geometryType
*/
public MapLayerInfo addFeatureTypeLayer(final String name,
Class<? extends Geometry> geometryType) throws IOException {
org.geoserver.catalog.FeatureTypeInfo featureTypeInfo = new FeatureTypeInfoImpl(catalog);
featureTypeInfo.setName(name);
featureTypeInfo.setNativeName(name);
featureTypeInfo.setEnabled(true);
final DefaultGeographicCRS wgs84 = DefaultGeographicCRS.WGS84;
ReferencedEnvelope bbox = new ReferencedEnvelope(-180, 180, -90, 90, wgs84);
featureTypeInfo.setLatLonBoundingBox(bbox);
featureTypeInfo.setNamespace(namespaceInfo);
featureTypeInfo.setNativeBoundingBox(bbox);
featureTypeInfo.setNativeCRS(wgs84);
featureTypeInfo.setSRS("EPSG:4326");
featureTypeInfo.setProjectionPolicy(ProjectionPolicy.FORCE_DECLARED);
featureTypeInfo.setStore(dataStoreInfo);
catalog.add(featureTypeInfo);
LayerInfo layerInfo = new LayerInfoImpl();
layerInfo.setResource(featureTypeInfo);
layerInfo.setName(name);