utils
Class GeoserverRequestUtils

java.lang.Object
  extended by utils.GeoserverRequestUtils

public class GeoserverRequestUtils
extends java.lang.Object

utils for creating requests to geoserver


Constructor Summary
GeoserverRequestUtils()
           
 
Method Summary
static play.libs.WS.WSRequestHolder buildAttributesUrl(java.lang.String url, java.lang.String layer, java.lang.String user, java.lang.String password)
          build WS object for getting layer attributes
static play.libs.WS.WSRequestHolder buildFeatureInfoBBoxUrl(java.lang.String url, java.lang.String layer, BBox bBox, java.lang.String srs, java.lang.String user, java.lang.String password)
          build WS object for getting features in bbox
static play.libs.WS.WSRequestHolder buildFeatureInfoUrl(java.lang.String url, java.lang.String layers, java.lang.String styles, BBox bBox, Coordinate point, Coordinate size, java.lang.String srs, java.lang.Boolean addBuffer, java.lang.String user, java.lang.String password)
          build WS object for getting features in point
static play.libs.WS.WSRequestHolder buildLegendUrl(WMSRequest wmsRequest, Layer layer)
          build WS object for getting layer`s legend
static play.libs.WS.WSRequestHolder buildRestLayerUrl(Layer layer)
          build WS object for getting layer information using geoserver rest API
static java.lang.String buildStyleUrl(Layer layer, java.lang.String styleName)
          build string for request sld style
static play.libs.WS.WSRequestHolder buildWFSUrl(WFSRequest wfsRequest, Layer layer)
          build WS object for wfs request
static play.libs.WS.WSRequestHolder buildWMSUrl(WMSRequest wmsRequest, Layer layer, java.lang.String style)
          build WS object for wms request
static play.libs.F.Promise<org.w3c.dom.Document> getLayerFeature(Layer layer, java.lang.String featureHref)
          build WS object for getting layer feature using geoserver rest API
static play.libs.F.Promise<java.lang.String> getLayerFeatureHref(Layer layer)
          build WS object for getting layer feature href using geoserver rest API
static play.libs.F.Promise<org.w3c.dom.Document> getStoreData(Layer layer, java.lang.String storeHref)
          build WS object for getting store data using geoserver rest API
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoserverRequestUtils

public GeoserverRequestUtils()
Method Detail

buildWFSUrl

public static play.libs.WS.WSRequestHolder buildWFSUrl(WFSRequest wfsRequest,
                                                       Layer layer)
build WS object for wfs request

Parameters:
wfsRequest - WFSRequest form
layer - Layer object for construct request
Returns:
WS.WSRequestHolder object
See Also:
WFSRequest, Layer, WS.WSRequestHolder

buildWMSUrl

public static play.libs.WS.WSRequestHolder buildWMSUrl(WMSRequest wmsRequest,
                                                       Layer layer,
                                                       java.lang.String style)
build WS object for wms request

Parameters:
wmsRequest - WMSRequest form
layer - Layer object for construct request
style - Style object for construct request
Returns:
WS.WSRequestHolder object
See Also:
WMSRequest, Layer, String, WS.WSRequestHolder

buildStyleUrl

public static java.lang.String buildStyleUrl(Layer layer,
                                             java.lang.String styleName)
build string for request sld style

Parameters:
layer - Layer object
styleName - style name
Returns:
string of style url
See Also:
Layer

buildLegendUrl

public static play.libs.WS.WSRequestHolder buildLegendUrl(WMSRequest wmsRequest,
                                                          Layer layer)
build WS object for getting layer`s legend

Parameters:
wmsRequest - WMSRequest form
layer - Layer object
Returns:
WS.WSRequestHolder object
See Also:
WMSRequest, Layer, WS.WSRequestHolder

buildFeatureInfoUrl

public static play.libs.WS.WSRequestHolder buildFeatureInfoUrl(java.lang.String url,
                                                               java.lang.String layers,
                                                               java.lang.String styles,
                                                               BBox bBox,
                                                               Coordinate point,
                                                               Coordinate size,
                                                               java.lang.String srs,
                                                               java.lang.Boolean addBuffer,
                                                               java.lang.String user,
                                                               java.lang.String password)
build WS object for getting features in point

Parameters:
url - base server url
layers - names of requested layers separated by comma
styles - names of styles separated by comma
bBox - boundary box of map
point - point for request
size - window size
srs - projection for request, for example EPSG:4326
addBuffer - it is true if request contains buffer parameter
user - user for authorization
password - password for authorization
Returns:
WS.WSRequestHolder object
See Also:
BBox, Coordinate, WS.WSRequestHolder

buildFeatureInfoBBoxUrl

public static play.libs.WS.WSRequestHolder buildFeatureInfoBBoxUrl(java.lang.String url,
                                                                   java.lang.String layer,
                                                                   BBox bBox,
                                                                   java.lang.String srs,
                                                                   java.lang.String user,
                                                                   java.lang.String password)
build WS object for getting features in bbox

Parameters:
url - base server url
layer - name of requested layer
bBox - boundary box for request
srs - projection for request, for example EPSG:4326
user - user for authorization
password - password for authorization
Returns:
WS.WSRequestHolder object
See Also:
BBox, WS.WSRequestHolder

buildAttributesUrl

public static play.libs.WS.WSRequestHolder buildAttributesUrl(java.lang.String url,
                                                              java.lang.String layer,
                                                              java.lang.String user,
                                                              java.lang.String password)
build WS object for getting layer attributes

Parameters:
url - base server url
layer - name of requested layer
user - user for authorization
password - password for authorization
Returns:
WS.WSRequestHolder object

buildRestLayerUrl

public static play.libs.WS.WSRequestHolder buildRestLayerUrl(Layer layer)
build WS object for getting layer information using geoserver rest API

Parameters:
layer - Layer object
Returns:
WS.WSRequestHolder object
See Also:
Layer, WS.WSRequestHolder

getLayerFeatureHref

public static play.libs.F.Promise<java.lang.String> getLayerFeatureHref(Layer layer)
                                                                 throws java.lang.Exception
build WS object for getting layer feature href using geoserver rest API

Parameters:
layer - Layer object
Returns:
F.Promise
Throws:
java.lang.Exception - if resource href is undefined
See Also:
F.Promise, Layer

getLayerFeature

public static play.libs.F.Promise<org.w3c.dom.Document> getLayerFeature(Layer layer,
                                                                        java.lang.String featureHref)
                                                                 throws java.lang.Exception
build WS object for getting layer feature using geoserver rest API

Parameters:
layer - Layer object
featureHref - feature href
Returns:
promise getting layer feature
Throws:
java.lang.Exception - if information about layers`s server is null
See Also:
F.Promise, Document, Layer

getStoreData

public static play.libs.F.Promise<org.w3c.dom.Document> getStoreData(Layer layer,
                                                                     java.lang.String storeHref)
                                                              throws java.lang.Exception
build WS object for getting store data using geoserver rest API

Parameters:
layer - Layer object
storeHref - store href
Returns:
promise getting store data
Throws:
java.lang.Exception - if information about layers`s server is null