use of org.n52.shetland.ogc.ows.OwsHttp in project arctic-sea by 52North.
the class OwsEncoderv110 method encodeOwsDCP.
private void encodeOwsDCP(OwsDCP dcp, DCP xdcp) {
if (dcp.isHTTP()) {
HTTP xhttp = xdcp.addNewHTTP();
OwsHttp http = dcp.asHTTP();
SortedSet<OwsRequestMethod> requestMethods = http.getRequestMethods();
requestMethods.forEach(method -> {
RequestMethodType xmethod;
switch(method.getHttpMethod()) {
case HTTPMethods.GET:
xmethod = xhttp.addNewGet();
break;
case HTTPMethods.POST:
xmethod = xhttp.addNewPost();
break;
default:
return;
}
encodeOnlineResource(method, xmethod);
method.getConstraints().forEach(x -> encodeOwsDomain(x, xmethod.addNewConstraint()));
});
}
}
Aggregations