Examples of OutputDefinitionType


Examples of net.opengis.wps10.OutputDefinitionType

            IOParam ioParam, boolean inDocument) {
        if(!outputs.containsKey(ioParam.id)) {
            throw new WPSException("Unknown output " + ioParam.id);
        }
       
        OutputDefinitionType odt;
        if(inDocument) {
            DocumentOutputDefinitionType dout = factory.createDocumentOutputDefinitionType();
            dout.setAsReference(Boolean.parseBoolean(ioParam.attributes.get("asReference")));
            odt = dout;
        } else {
            odt = factory.createOutputDefinitionType();
        }
        odt.setIdentifier(Ows11Util.code(ioParam.id));
        odt.setEncoding(ioParam.attributes.get("encoding"));
        odt.setMimeType(ioParam.attributes.get("mimetype"));
        odt.setSchema(ioParam.attributes.get("schema"));
        odt.setUom(ioParam.attributes.get("uom"));
       
        return odt;
    }
View Full Code Here

Examples of net.opengis.wps10.OutputDefinitionType

    private Map<String, String> getRequestedRawDataMimeTypes(Collection<String> rawResults, Name name,
            ProcessFactory pf) {
        Map<String, String> result = new HashMap<String, String>();
        ResponseFormType form = request.getResponseForm();
        OutputDefinitionType raw = form.getRawDataOutput();
        ResponseDocumentType document = form.getResponseDocument();
    if (form == null || (raw == null && document == null)) {
            // all outputs using their default mime
          for (String rawResult : rawResults) {
            String mime = AbstractRawData.getDefaultMime(name, pf, rawResult);
            result.put(rawResult, mime);
      }
        } else if (raw != null) {
            // just one output type
            String output = raw.getIdentifier().getValue();
            String mime;
            if (raw.getMimeType() != null) {
                mime = raw.getMimeType();
            } else {
                mime = AbstractRawData.getDefaultMime(name, pf, output);
            }
            result.put(output, mime);
        } else {
            // the response document form
          for (Iterator it = document.getOutput().iterator(); it.hasNext();) {
        OutputDefinitionType out = (OutputDefinitionType) it.next();
        String outputName = out.getIdentifier().getValue();
        if(rawResults.contains(outputName)) {
          // was the output mime specified?
          String mime = out.getMimeType();
          if(mime == null || mime.trim().isEmpty()) {
            mime = AbstractRawData.getDefaultMime(name, pf, outputName);
          }
          result.put(outputName, mime);
        }
View Full Code Here

Examples of net.opengis.wps10.OutputDefinitionType

     * @param output
     * @throws IllegalArgumentException
     */
    public ExecuteResponseType run(ExecuteType execute) {
        ResponseDocumentType responseDocument = null;
        OutputDefinitionType rawDataOutput = null;
        if (execute.getResponseForm() != null) {
            responseDocument = execute.getResponseForm().getResponseDocument();
            rawDataOutput = execute.getResponseForm().getRawDataOutput();
        }

View Full Code Here

Examples of net.opengis.wps10.OutputDefinitionType

            if(literal != null) {
                // literals are encoded as plain strings
                return "text/plain";
            } else {
                // Execute should have properly setup the mime type
                OutputDefinitionType definition = (OutputDefinitionType) response
                    .getOutputDefinitions().getOutput().get(0);
                return definition.getMimeType();
            }
        }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.