use of org.geosdi.geoplatform.gui.client.command.filter.basic.FilterDescribeFeatureResponse in project geo-platform by geosdi.
the class FilterDescribeFeatureCommand method execute.
@Override
public FilterDescribeFeatureResponse execute(FilterDescribeFeatureRequest request, HttpServletRequest httpServletRequest) {
try {
logger.debug("##################### Executing {} Command", this.getClass().getSimpleName());
List<GPLayerAttributes> attributeList = Lists.newArrayList();
try {
List<LayerAttribute> result = this.geoPlatformPublishClient.describeFeatureType(request.getLayerName()).getLayerAttributes();
for (LayerAttribute layerAttribute : result) {
GPLayerAttributes gpLayerAttributes = new GPLayerAttributes();
gpLayerAttributes.setAttributeType(layerAttribute.getType());
gpLayerAttributes.setAttributeValue(layerAttribute.getValue());
attributeList.add(gpLayerAttributes);
}
} catch (ResourceNotFoundFault rnff) {
throw new GeoPlatformException(rnff.getMessage());
}
logger.debug("#################### Found {} ", attributeList);
return new FilterDescribeFeatureResponse(Lists.<GPLayerAttributes>newArrayList(attributeList));
} catch (Exception ex) {
ex.printStackTrace();
throw new GeoPlatformException(ex.getMessage());
}
}
use of org.geosdi.geoplatform.gui.client.command.filter.basic.FilterDescribeFeatureResponse in project geo-platform by geosdi.
the class CASFilterDescribeFeatureCommand method execute.
@Override
public FilterDescribeFeatureResponse execute(FilterDescribeFeatureRequest request, HttpServletRequest httpServletRequest) {
logger.debug("##################### Executing {} Command", this.getClass().getSimpleName());
List<GPLayerAttributes> attributeList = Lists.<GPLayerAttributes>newArrayList();
try {
List<LayerAttribute> result = this.casPublisherService.describeFeatureType(request.getLayerName()).getLayerAttributes();
for (LayerAttribute layerAttribute : result) {
GPLayerAttributes gpLayerAttributes = new GPLayerAttributes();
gpLayerAttributes.setAttributeType(layerAttribute.getType());
gpLayerAttributes.setAttributeValue(layerAttribute.getValue());
attributeList.add(gpLayerAttributes);
}
} catch (ResourceNotFoundFault rnff) {
throw new GeoPlatformException(rnff.getMessage());
}
logger.debug("#################### Found {} ", attributeList);
return new FilterDescribeFeatureResponse(Lists.newArrayList(attributeList));
}
Aggregations