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 java.lang.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  java.io.File file
           
protected  java.lang.String id
           
protected  java.lang.String mimeType
           
 
Constructor Summary
protected StorageLocation(java.io.File file, java.lang.String id, java.lang.String mimeType)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.io.File getFile()
           
 java.lang.String getId()
           
 java.io.InputStream getInputStream()
           
 long getLength()
           
 java.lang.String getMimeType()
           
 java.io.OutputStream getOutputStream()
          Returns the sink for writing the resource contents.
abstract  java.lang.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 java.lang.String id

file

protected java.io.File file

mimeType

protected java.lang.String mimeType
Constructor Detail

StorageLocation

protected StorageLocation(java.io.File file,
                          java.lang.String id,
                          java.lang.String mimeType)
Method Detail

getOutputStream

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

Returns:
the sink for writing the resource contents
Throws:
java.io.FileNotFoundException

getId

public java.lang.String getId()

getMimeType

public java.lang.String getMimeType()

getFile

public java.io.File getFile()

getWebURL

public abstract java.lang.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 java.io.InputStream getInputStream()
                                   throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


Copyright © 2011. All Rights Reserved.