final DCPDocument.DCP[] xbDcps = xbOperation.getDCPArray(); final DCP[] ocDcps = new DCP[xbDcps.length]; for (int j = 0; j < xbDcps.length; j++) {
/** * retrieves the desired description for a service. the retrieved information will not be held in cache! * @param processIDs one or more processIDs * @param serverID * @throws WPSClientException */ public ProcessDescriptionsDocument describeProcess(String[] processIDs, String serverID) throws WPSClientException { String url = connectURL; if (!useConnectURL) { CapabilitiesDocument caps = this.loggedServices.get(serverID); Operation[] operations = caps.getCapabilities().getOperationsMetadata().getOperationArray(); for (Operation operation : operations) { if (operation.getName().equals("DescribeProcess")) { url = operation.getDCPArray()[0].getHTTP().getGetArray()[0].getHref(); } } if (url == null) { throw new WPSClientException("Capabilities do not contain any information about the entry point for DescribeProcess operation."); } } return retrieveDescriptionViaGET(processIDs, url); }
net.opengis.ows.x11.DCPDocument.DCP[] xb_dcps = xb_operation.getDCPArray(); DCP[] oc_dcps = new DCP[xb_dcps.length]; for (int j = 0; j < xb_dcps.length; j++) {
final DCPDocument.DCP[] xbDcps = xbOperation.getDCPArray(); final DCP[] ocDcps = new DCP[xbDcps.length]; for (int j = 0; j < xbDcps.length; j++) {
/** * Executes a process at a WPS * * @param url url of server not the entry additionally defined in the caps. * @param execute Execute document * @return either an ExecuteResponseDocument or an InputStream if asked for RawData or an Exception Report */ private Object execute(String serverID, ExecuteDocument execute, boolean rawData) throws WPSClientException{ String url = connectURL; if (!useConnectURL) { CapabilitiesDocument caps = loggedServices.get(serverID); Operation[] operations = caps.getCapabilities().getOperationsMetadata().getOperationArray(); for (Operation operation : operations) { if (operation.getName().equals("Execute")) { url = operation.getDCPArray()[0].getHTTP().getPostArray()[0].getHref(); } } if (url == null) { throw new WPSClientException( "Capabilities do not contain any information about the entry point for Execute operation."); } } execute.getExecute().setVersion(SUPPORTED_VERSION); return retrieveExecuteResponseViaPOST(url, execute,rawData); }
/** * Enriches a capabilities skeleton by adding the endpoint URL to the operations meta data. * * @param skel * the skeleton to enrich * @param endpointUrl * the endpoint URL of the service * */ private static void initOperationsMetadata(CapabilitiesDocument skel, String endpointUrl) { if (skel.getCapabilities().getOperationsMetadata() != null) { String endpointUrlGet = endpointUrl + "?"; for (Operation op : skel.getCapabilities().getOperationsMetadata().getOperationArray()) { for (DCP dcp : op.getDCPArray()) { for (RequestMethodType get : dcp.getHTTP().getGetArray()) { get.setHref(endpointUrlGet); } for (RequestMethodType post : dcp.getHTTP().getPostArray()) { post.setHref(endpointUrl); } } } } }
private OwsOperation parseOperation(Operation operation) { if (operation == null) { return null; } Collection<OwsDomain> parameters = parseDomains(operation.getParameterArray()); Collection<OwsDomain> constraints = parseDomains(operation.getConstraintArray()); Collection<OwsMetadata> metadata = parseMetadata(operation.getMetadataArray()); Collection<OwsDCP> dcps = parseDCPs(operation.getDCPArray()); return new OwsOperation(operation.getName(), parameters, constraints, metadata, dcps); }