org.deegree.services.wps.input
Class EmbeddedComplexInput

java.lang.Object
  extended by org.deegree.services.wps.input.ProcessletInputImpl
      extended by org.deegree.services.wps.input.ComplexInputImpl
          extended by org.deegree.services.wps.input.EmbeddedComplexInput
All Implemented Interfaces:
ComplexInput, ProcessletInput

public class EmbeddedComplexInput
extends ComplexInputImpl

A ComplexInputImpl with a value that is given inline in the execute request document.

Version:
$Revision: $, $Date: $
Author:
Markus Schneider, last edited by: $Author: schneider $

Field Summary
 
Fields inherited from class org.deegree.services.wps.input.ProcessletInputImpl
definition
 
Constructor Summary
EmbeddedComplexInput(ComplexInputDefinition definition, LanguageString title, LanguageString summary, ComplexFormatType format, StreamBufferStore store)
          Creates a new ComplexInputImpl instance from a wps:ComplexData embedded in an execute request document.
 
Method Summary
 XMLStreamReader getComplexDataAsXMLStream()
           
 InputStream getValueAsBinaryStream()
          Returns an InputStream for accessing the complex value as a raw stream of bytes (usually for binary input).
 XMLStreamReader getValueAsXMLStream()
          Returns an XMLStreamReader for accessing the complex value as an XML event stream.
 String toString()
           
 
Methods inherited from class org.deegree.services.wps.input.ComplexInputImpl
getEncoding, getMimeType, getSchema
 
Methods inherited from class org.deegree.services.wps.input.ProcessletInputImpl
getAbstract, getDefinition, getIdentifier, getTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.services.wps.input.ProcessletInput
getAbstract, getIdentifier, getTitle
 

Constructor Detail

EmbeddedComplexInput

public EmbeddedComplexInput(ComplexInputDefinition definition,
                            LanguageString title,
                            LanguageString summary,
                            ComplexFormatType format,
                            StreamBufferStore store)
Creates a new ComplexInputImpl instance from a wps:ComplexData embedded in an execute request document.

Parameters:
definition - corresponding input definition from process description
title - optional title supplied with the input parameter, may be null
summary - optional narrative description supplied with the input parameter, may be null
format - the XML schema, format, and encoding of the complex value
store - stores the wps:ComplexData element from execute request document
Method Detail

getValueAsBinaryStream

public InputStream getValueAsBinaryStream()
Description copied from interface: ComplexInput
Returns an InputStream for accessing the complex value as a raw stream of bytes (usually for binary input).

NOTE: Never use this method if the input parameter is encoded in XML -- use ComplexInput.getValueAsXMLStream() instead. Otherwise erroneous behaviour has to be expected (if the input value is given embedded in the execute request document).

Returns:
the input value as a raw stream of bytes
See Also:
ComplexInput.getValueAsXMLStream()

getValueAsXMLStream

public XMLStreamReader getValueAsXMLStream()
                                    throws XMLStreamException
Description copied from interface: ComplexInput
Returns an XMLStreamReader for accessing the complex value as an XML event stream.

NOTE: Never use this method if the input parameter is a binary value -- use ComplexInput.getValueAsBinaryStream() instead.

The returned stream will point at the first START_ELEMENT event of the data.

Returns:
the input value as an XML event stream, current event is START_ELEMENT (the root element of the data object)
Throws:
XMLStreamException

getComplexDataAsXMLStream

public XMLStreamReader getComplexDataAsXMLStream()
                                          throws XMLStreamException
Throws:
XMLStreamException

toString

public String toString()
Overrides:
toString in class ProcessletInputImpl


Copyright © 2011. All Rights Reserved.