deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.portal.standard.context.control
Class DownloadListener

java.lang.Object
  extended by org.deegree.enterprise.control.AbstractListener
      extended by org.deegree.portal.standard.context.control.DownloadListener
All Implemented Interfaces:
EventListener, WebListener

public class DownloadListener
extends AbstractListener

This Listener is used when a user likes to download the WFS data behind a WMS layer.

Version:
$Revision: 20891 $ $Date: 2009-11-19 14:13:56 +0100 (Do, 19. Nov 2009) $
Author:
Andreas Poth, last edited by: $Author: jmays $

Nested Class Summary
protected  class DownloadListener.FeatureTemplate
          little helper class to store association between IDs and bounding boxes
 
Constructor Summary
DownloadListener()
           
 
Method Summary
 void actionPerformed(FormEvent event)
           
protected  ArrayList<DownloadListener.FeatureTemplate> createFeatureTemplates(RPCWebEvent event)
          performs the access to the data marked at the shopping card
protected  GetFeature createGetFeatureRequest(DownloadListener.FeatureTemplate ft, String version, QualifiedName ftName, QualifiedName gtName, GetFeature.RESULT_TYPE resultType)
          creates a GetFeature request considering the feature type (ID) and the bounding box encapsulated in the passed FeatureTemplate
protected  Envelope extractBBox(RPCStruct bboxStruct)
          Convenience method to extract the boundig box from an rpc fragment.
protected  String getUserName(String sessionId)
          gets the user name assigned to the passed session ID from a authentification service.
protected  org.deegree.portal.standard.context.control.DownloadListener.RequestBean getWFSGetFeatureCalls(DownloadListener.FeatureTemplate layer, ViewContext vc)
          returns the call to be used to perform a GetFeature request for the passed feature template.
 
Methods inherited from class org.deegree.enterprise.control.AbstractListener
getAlternativeNextPage, getHomePath, getInitParameter, getInitParameterList, getNextPage, getRequest, getReturnValue, gotoErrorPage, handle, setAlternativeNextPage, setDefaultAlternativeNextPage, setDefaultNextPage, setNextPage, setReturnValue, toModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DownloadListener

public DownloadListener()
Method Detail

actionPerformed

public void actionPerformed(FormEvent event)
Specified by:
actionPerformed in interface WebListener
Specified by:
actionPerformed in class AbstractListener

getUserName

protected String getUserName(String sessionId)
                      throws XMLParsingException,
                             IOException,
                             SAXException
gets the user name assigned to the passed session ID from a authentification service. If no user is assigned to the session ID null will be returned. If the session is closed or expired an exception will be thrown

Parameters:
sessionId -
Returns:
name of the user assigned to the passed session ID
Throws:
XMLParsingException
IOException
SAXException

extractBBox

protected Envelope extractBBox(RPCStruct bboxStruct)
Convenience method to extract the boundig box from an rpc fragment.

Parameters:
bboxStruct - the RPCStruct containing the bounding box. For example, <member><name>boundingBox</name>etc....
Returns:
an envelope with the boundaries defined in the rpc structure

createFeatureTemplates

protected ArrayList<DownloadListener.FeatureTemplate> createFeatureTemplates(RPCWebEvent event)
                                                                      throws PortalException,
                                                                             Exception
performs the access to the data marked at the shopping card

Throws:
PortalException
Exception

getWFSGetFeatureCalls

protected org.deegree.portal.standard.context.control.DownloadListener.RequestBean getWFSGetFeatureCalls(DownloadListener.FeatureTemplate layer,
                                                                                                         ViewContext vc)
                                                                                                  throws PortalException
returns the call to be used to perform a GetFeature request for the passed feature template.

Parameters:
layer - used
ft - feature template to find the serving WFS
vc -
Returns:
the call to be used to perform a GetFeature request for the passed feature template
Throws:
PortalException

createGetFeatureRequest

protected GetFeature createGetFeatureRequest(DownloadListener.FeatureTemplate ft,
                                             String version,
                                             QualifiedName ftName,
                                             QualifiedName gtName,
                                             GetFeature.RESULT_TYPE resultType)
                                      throws PortalException
creates a GetFeature request considering the feature type (ID) and the bounding box encapsulated in the passed FeatureTemplate

Parameters:
ft - FeatureTemplate
ftName - a Qualified Name representing the feature type name of the requested feature, ex: app:ZipCodes
gtName - a Qualified Name representing the geometry type name of the requested feature, ex: app:geometry
resultType - the type of result (GetFeature.RESULT_TYPE.HITS or GetFeature.RESULT_TYPE.RESULTS)
Returns:
Throws:
PortalException

deegree 2.3 (2010/04/09 10:10 build-4-official)

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