deegree-services-3.0-pre-nightly (2010/03/05 00:04) - official

org.deegree.services.wps.input
Class ReferencedComplexInput

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.ReferencedComplexInput
All Implemented Interfaces:
ComplexInput, ProcessletInput

public class ReferencedComplexInput
extends ComplexInputImpl

A ComplexInputImpl with a value that is given as a reference to a web-accessible resource.

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
ReferencedComplexInput(ComplexInputDefinition definition, org.deegree.commons.types.ows.LanguageString title, org.deegree.commons.types.ows.LanguageString summary, ComplexFormatType format, InputReference reference)
          Creates a new ComplexInputImpl instance from a reference to a web-accessible URI.
 
Method Summary
 URL getURL()
          Returns the URL that provides the input.
 InputStream getValueAsBinaryStream()
          Returns an InputStream for accessing the complex value as a raw stream of bytes (usually for binary input).
 org.apache.axiom.om.OMElement getValueAsElement()
          Returns an OMElement for accessing the complex value as an XML element node.
 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

ReferencedComplexInput

public ReferencedComplexInput(ComplexInputDefinition definition,
                              org.deegree.commons.types.ows.LanguageString title,
                              org.deegree.commons.types.ows.LanguageString summary,
                              ComplexFormatType format,
                              InputReference reference)
Creates a new ComplexInputImpl instance from a reference to a web-accessible URI.

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
reference - provides information for retrieving the input value via the web
Method Detail

getValueAsElement

public org.apache.axiom.om.OMElement getValueAsElement()
                                                throws IOException
Description copied from class: ComplexInputImpl
Returns an OMElement for accessing the complex value as an XML element node.

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

Specified by:
getValueAsElement in interface ComplexInput
Specified by:
getValueAsElement in class ComplexInputImpl
Returns:
the input value as an XML element node
Throws:
IOException - if accessing the value fails

getValueAsBinaryStream

public InputStream getValueAsBinaryStream()
                                   throws IOException
Description copied from class: ComplexInputImpl
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 ComplexInputImpl.getValueAsXMLStream() or ComplexInputImpl.getValueAsElement() instead. Otherwise erroneous behaviour has to be expected (if the input value is given embedded in the execute request document).

Specified by:
getValueAsBinaryStream in interface ComplexInput
Specified by:
getValueAsBinaryStream in class ComplexInputImpl
Returns:
the input value as a raw stream of bytes
Throws:
IOException - if accessing the value fails
See Also:
ComplexInputImpl.getValueAsXMLStream(), ComplexInputImpl.getValueAsElement()

getValueAsXMLStream

public XMLStreamReader getValueAsXMLStream()
                                    throws IOException
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 next event after the first call to XMLStreamReader.next(), which is normally the XMLStreamConstants.START_DOCUMENT event.

Specified by:
getValueAsXMLStream in interface ComplexInput
Specified by:
getValueAsXMLStream in class ComplexInputImpl
Returns:
the input value as an XML event stream
Throws:
IOException - if accessing the value fails

getURL

public URL getURL()
Returns the URL that provides the input.

Returns:
the URL that provides the input.

toString

public String toString()
Overrides:
toString in class ProcessletInputImpl

deegree-services-3.0-pre-nightly (2010/03/05 00:04) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>