本文整理了Java中org.geoserver.ows.Request.getVersion
方法的一些代码示例,展示了Request.getVersion
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getVersion
方法的具体详情如下:
包路径:org.geoserver.ows.Request
类名称:Request
方法名:getVersion
[英]The service version
[中]服务版本
代码示例来源:origin: geoserver/geoserver
public String toString() {
return getService() + " " + getVersion() + " " + getRequest();
}
代码示例来源:origin: geoserver/geoserver
if (req.getVersion() == null) {
req.setVersion(
normalizeVersion(
if (req.getVersion() == null) {
} else {
if (!req.getVersion().matches("[0-99].[0-99].[0-99]")) {
throw new ServiceException(
"Invalid version: " + req.getVersion(),
"InvalidParameterValue",
"version");
Version version = new Version(req.getVersion());
"Invalid version: " + req.getVersion(),
"InvalidParameterValue",
"version");
代码示例来源:origin: geoserver/geoserver
Service serviceDescriptor = findService(service, req.getVersion(), req.getNamespace());
if (serviceDescriptor == null) {
findService(req.getContext(), req.getVersion(), req.getNamespace());
if (serviceDescriptor != null) {
代码示例来源:origin: org.geoserver.community/gs-wfs3
/**
* Returns the WFS3 featureId, or null if it's missing or the request is not a WFS3 one
*
* @return
*/
private String getWFS3FeatureId() {
Request dr = Dispatcher.REQUEST.get();
String featureId = null;
if (dr != null && (new Version(dr.getVersion()).getMajor().equals(3))) {
Object featureIdValue = dr.getKvp().get("featureId");
if (featureIdValue instanceof List) {
featureId = (String) ((List) featureIdValue).get(0);
}
}
return featureId;
}
代码示例来源:origin: org.geoserver/gs-wfs
private void handleDefault(
ServiceException exception, Request request, String charset, boolean verbose) {
if ("1.0.0".equals(request.getVersion())) {
handle1_0(exception, request.getHttpResponse());
} else {
super.handleServiceException(exception, request);
}
}
代码示例来源:origin: org.geoserver.csw/gs-csw-core
/**
* Generate download links for the specified info object.
*
* @param info
*/
public CloseableIterator<String> generateDownloadLinks(CatalogInfo info) {
Request request = Dispatcher.REQUEST.get();
String baseURL = null;
// Retrieve the baseURL (something like: http://host:port/geoserver/...)
try {
if (baseURL == null) {
baseURL = ResponseUtils.baseURL(request.getHttpRequest());
}
baseURL = ResponseUtils.buildURL(baseURL, "/", null, URLType.SERVICE);
} catch (Exception e) {
}
if (baseURL == null) {
throw new IllegalArgumentException("baseURL is required to create download links");
}
baseURL += LINK;
baseURL = baseURL.replace("${version}", request.getVersion());
if (info instanceof CoverageInfo) {
return linksFromCoverage(baseURL, (CoverageInfo) info);
} else {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.warning("Download link for vectors isn't supported." + " Returning null");
}
}
return null;
}
代码示例来源:origin: org.geoserver/gs-wms
Version version = WMS.negotiateVersion(request.getVersion());
if (version == WMS.VERSION_1_1_1) {
代码示例来源:origin: org.geoserver.community/gs-nsg-wfs-profile
@Override
public Operation operationDispatched(Request request, Operation operation) {
String version = request.getVersion();
String method = request.getRequest();
long timeout = getTimeoutMilliseconds(operation);
if ("WFS".equalsIgnoreCase(request.getService())
&& (version == null || V_20.compareTo(new Version(version)) <= 0)
&& method != null
&& (method.equalsIgnoreCase("GetFeature")
|| method.equalsIgnoreCase("GetFeatureWithLock")
|| method.equalsIgnoreCase("GetPropertyValue"))
&& timeout > 0
&& operation.getParameters().length > 0
&& operation.getParameters()[0] instanceof BaseRequestType) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine("Starting to track NSG timeout on this request");
}
// start tracking time
TimeoutVerifier timeoutVerifier =
new TimeoutVerifier((BaseRequestType) operation.getParameters()[0], timeout);
// need to wrap the http response and its output stream
request.setHttpResponse(
new TimeoutCancellingResponse(request.getHttpResponse(), timeoutVerifier));
// set in the thread local for later use
TIMEOUT_VERIFIER.set(timeoutVerifier);
}
return operation;
}
代码示例来源:origin: org.geoserver/gs-wfs
json.object()
.key("version")
.value(request.getVersion())
.key("exceptions")
.array()
内容来源于网络,如有侵权,请联系作者删除!