use of org.geosdi.geoplatform.connector.geoserver.model.layergroups.GPGeoserverLayerGroupBody in project geo-platform by geosdi.
the class GPGeoserverLayerGroupsConnectorStoreV22XTest method toBody.
/**
* @return {@link GPGeoserverLayerGroupBody}
*/
GPGeoserverLayerGroupBody toBody(String theName, String theTitle) {
GPGeoserverLayerGroupBody layerGroupBody = new GPGeoserverLayerGroupBody();
layerGroupBody.setName(theName);
layerGroupBody.setTitle(theTitle);
layerGroupBody.setMode(CONTAINER);
// layerGroupBody.setWorkspace(new GeoserverCreateWorkspaceBody("topp"));
layerGroupBody.setBounds(new GPGeoserverLatLonBoundingBox() {
{
super.setMaxx(-73.907005);
super.setMaxy(40.882078);
super.setMinx(-74.047185);
super.setMiny(40.679648);
super.setCrs("EPSG:4326");
}
});
GPGeoserverLayerGroupPublishables layerGroupBodyPublishables = new GPGeoserverLayerGroupPublishables();
List<GPGeoserverLayerPublished> layers = Lists.newArrayList();
layers.add(new GPGeoserverLayerPublished() {
{
super.setLayerName("tiger:giant_polygon");
}
});
// layers.add(new GPGeoserverLayerPublished() {
// {
// super.setLayerName("topp:states");
// }
// });
layers.add(new GPGeoserverLayerPublished() {
{
super.setLayerName("tiger:poly_landmarks");
}
});
layerGroupBodyPublishables.setLayers(layers);
layerGroupBody.setLayers(layerGroupBodyPublishables);
return layerGroupBody;
}
use of org.geosdi.geoplatform.connector.geoserver.model.layergroups.GPGeoserverLayerGroupBody in project geo-platform by geosdi.
the class GPGeoserverCreateLayerGroupRequest method prepareHttpEntity.
/**
* @return {@link HttpEntity}
*/
@Override
protected HttpEntity prepareHttpEntity() throws Exception {
GPGeoserverLayerGroupBody layerGroupBody = this.body.get();
checkArgument(layerGroupBody != null, "The Parameter layerGroupBody must not be null.");
String layerGroupBodyString = jacksonSupport.getDefaultMapper().writeValueAsString(layerGroupBody);
logger.debug("#############################LAYER_GROUP_BODY : \n{}\n", layerGroupBodyString);
return new StringEntity(layerGroupBodyString, APPLICATION_JSON);
}
use of org.geosdi.geoplatform.connector.geoserver.model.layergroups.GPGeoserverLayerGroupBody in project geo-platform by geosdi.
the class GPGeoserverCreateWorkspaceLayerGroupRequest method prepareHttpEntity.
/**
* @return {@link HttpEntity}
*/
@Override
protected HttpEntity prepareHttpEntity() throws Exception {
GPGeoserverLayerGroupBody layerGroupBody = this.body.get();
checkArgument(layerGroupBody != null, "The Parameter layerGroupBody must not be null.");
String layerGroupBodyString = jacksonSupport.getDefaultMapper().writeValueAsString(layerGroupBody);
logger.debug("#############################LAYER_GROUP_BODY : \n{}\n", layerGroupBodyString);
return new StringEntity(layerGroupBodyString, APPLICATION_JSON);
}
use of org.geosdi.geoplatform.connector.geoserver.model.layergroups.GPGeoserverLayerGroupBody in project geo-platform by geosdi.
the class GPGeoserverBaseUpdateLayerGroupRequest method prepareHttpEntity.
/**
* @return {@link HttpEntity}
*/
@Override
protected HttpEntity prepareHttpEntity() throws Exception {
GPGeoserverLayerGroupBody layerGroupBody = this.body.get();
checkArgument(layerGroupBody != null, "The Parameter layerGroupBody must not be null");
String layerGroupBodyString = jacksonSupport.getDefaultMapper().writeValueAsString(layerGroupBody);
logger.debug("#############################LAYER_GROUP_BODY : \n{}\n", layerGroupBodyString);
return new StringEntity(layerGroupBodyString, APPLICATION_JSON);
}
use of org.geosdi.geoplatform.connector.geoserver.model.layergroups.GPGeoserverLayerGroupBody in project geo-platform by geosdi.
the class GPGeoserverLayerGroupsConnectorStoreV220XTest method toBody.
/**
* @return {@link GPGeoserverLayerGroupBody}
*/
GPGeoserverLayerGroupBody toBody(String theName, String theTitle) {
GPGeoserverLayerGroupBody layerGroupBody = new GPGeoserverLayerGroupBody();
layerGroupBody.setName(theName);
layerGroupBody.setTitle(theTitle);
layerGroupBody.setMode(CONTAINER);
// layerGroupBody.setWorkspace(new GeoserverCreateWorkspaceBody("topp"));
layerGroupBody.setBounds(new GPGeoserverLatLonBoundingBox() {
{
super.setMaxx(-73.907005);
super.setMaxy(40.882078);
super.setMinx(-74.047185);
super.setMiny(40.679648);
super.setCrs("EPSG:4326");
}
});
GPGeoserverLayerGroupPublishables layerGroupBodyPublishables = new GPGeoserverLayerGroupPublishables();
List<GPGeoserverLayerPublished> layers = Lists.newArrayList();
layers.add(new GPGeoserverLayerPublished() {
{
super.setLayerName("tiger:giant_polygon");
}
});
// layers.add(new GPGeoserverLayerPublished() {
// {
// super.setLayerName("topp:states");
// }
// });
layers.add(new GPGeoserverLayerPublished() {
{
super.setLayerName("tiger:poly_landmarks");
}
});
layerGroupBodyPublishables.setLayers(layers);
layerGroupBody.setLayers(layerGroupBodyPublishables);
return layerGroupBody;
}
Aggregations