org.deegree.services.wps.storage
Class StorageLocation

java.lang.Object
  extended by org.deegree.services.wps.storage.StorageLocation
Direct Known Subclasses:
OutputStorage, ResponseDocumentStorage

public abstract class StorageLocation
extends Object

Encapsulates a storage location and it's URL for storing a response document or an output parameter of the ProcessManager as a web-accessible resource.

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

Field Summary
protected  File file
           
protected  String id
           
protected  String mimeType
           
 
Constructor Summary
protected StorageLocation(File file, String id, String mimeType)
           
 
Method Summary
 boolean equals(Object o)
           
 File getFile()
           
 String getId()
           
 InputStream getInputStream()
           
 long getLength()
           
 String getMimeType()
           
 OutputStream getOutputStream()
          Returns the sink for writing the resource contents.
abstract  String getWebURL()
          Returns the URL that can be used to access the resource via the web.
 int hashCode()
           
 void sendResource(HttpResponseBuffer response)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected String id

file

protected File file

mimeType

protected String mimeType
Constructor Detail

StorageLocation

protected StorageLocation(File file,
                          String id,
                          String mimeType)
Method Detail

getOutputStream

public OutputStream getOutputStream()
                             throws FileNotFoundException
Returns the sink for writing the resource contents.

Returns:
the sink for writing the resource contents
Throws:
FileNotFoundException

getId

public String getId()

getMimeType

public String getMimeType()

getFile

public File getFile()

getWebURL

public abstract String getWebURL()
Returns the URL that can be used to access the resource via the web.

Returns:
the URL that can be used to access the resource via the web

sendResource

public void sendResource(HttpResponseBuffer response)

getLength

public long getLength()
Returns:

getInputStream

public InputStream getInputStream()
                           throws FileNotFoundException
Throws:
FileNotFoundException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object


Copyright © 2011. All Rights Reserved.