コード例 #1
0
 /**
  * Gets the parameters of the GetCapabilities capability answer.
  *
  * @return The operation type representing the GetCapabilities operation.
  */
 private OperationType getCapOperation(WMSResponse wmsResponse) {
   OperationType opCap = new OperationType();
   opCap.getFormat().add("text/xml");
   Get getCap = new Get();
   getCap.setOnlineResource(
       buildOnlineResource(wmsResponse, WMSProperties.CAP_GET, "GetCapabilities"));
   Post postCap = new Post();
   postCap.setOnlineResource(
       buildOnlineResource(wmsResponse, WMSProperties.CAP_POST, "GetCapabilities"));
   HTTP httpCap = new HTTP();
   httpCap.setGet(getCap);
   httpCap.setPost(postCap);
   DCPType dcpTypeCap = new DCPType();
   dcpTypeCap.setHTTP(httpCap);
   opCap.getDCPType().add(dcpTypeCap);
   return opCap;
 }
コード例 #2
0
 /**
  * Gets the parameters of the GetMap capability answer.
  *
  * @return The operation type representing the getMap operation.
  */
 private OperationType getMapOperation(WMSResponse wmsResponse) {
   OperationType opMap = new OperationType();
   for (ImageFormats im : ImageFormats.values()) {
     opMap.getFormat().add(im.toString());
   }
   Get get = new Get();
   get.setOnlineResource(buildOnlineResource(wmsResponse, WMSProperties.MAP_GET, "GetMap"));
   Post post = new Post();
   post.setOnlineResource(buildOnlineResource(wmsResponse, WMSProperties.MAP_POST, "GetMap"));
   // We feed the http object
   HTTP http = new HTTP();
   http.setGet(get);
   http.setPost(post);
   DCPType dcpType = new DCPType();
   dcpType.setHTTP(http);
   opMap.getDCPType().add(dcpType);
   return opMap;
 }
コード例 #3
0
 private OperationType getFeatureOperation(WMSResponse wmsResponse) {
   OperationType opFeature = new OperationType();
   opFeature.getFormat().add("text/xml");
   // GET
   Get getFeature = new Get();
   getFeature.setOnlineResource(
       buildOnlineResource(wmsResponse, WMSProperties.FEATURE_GET, "GetFeatureInfo"));
   // POST
   Post postFeature = new Post();
   postFeature.setOnlineResource(
       buildOnlineResource(wmsResponse, WMSProperties.FEATURE_POST, "GetFeatureInfo"));
   // Both in HTTP
   HTTP httpFeature = new HTTP();
   httpFeature.setGet(getFeature);
   httpFeature.setPost(postFeature);
   DCPType dcpTypeFeature = new DCPType();
   dcpTypeFeature.setHTTP(httpFeature);
   opFeature.getDCPType().add(dcpTypeFeature);
   return opFeature;
 }