final OperationDocument.Operation xbOperation = xbOperations[i]; final String ocOperationName = xbOperation.getName();
/** * 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); }
OperationDocument.Operation xb_operation = xb_operations[i]; String oc_operationName = xb_operation.getName();
for (int i = 0; i < xbOperations.length; i++) { final OperationDocument.Operation xbOperation = xbOperations[i]; final String ocOperationName = xbOperation.getName();
/** * 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); }
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); }