org.deegree_impl.clients.wmsclient.configuration
Class WMSClientConfiguration

java.lang.Object
  extended byorg.deegree_impl.clients.wmsclient.configuration.WMSClientConfiguration
All Implemented Interfaces:
Marshallable

public class WMSClientConfiguration
extends java.lang.Object
implements Marshallable

Version:
$Revision: 1.2 $
Author:
Andreas Poth

Field Summary
private  WMSClientConfiguration defaultConfig
           
private  WMSGetMapRequest gmr
           
private  double maxScale
           
private  double minScale
           
private  java.util.ArrayList offeredInfoFormats
           
private  java.util.ArrayList offeredMapFormats
           
private  java.util.ArrayList offeredMapOperations
           
private  java.util.ArrayList offeredMapSizes
           
private  java.util.ArrayList offeredPanFactors
           
private  java.util.ArrayList offeredProjects
           
private  java.util.ArrayList offeredZoomFactors
           
private  java.util.HashMap wmsCapabilities
           
 
Constructor Summary
(package private) WMSClientConfiguration(WMSClientConfiguration defaultConfig, java.util.HashMap wmsCapabilities, MapSize[] offeredMapSizes, Format[] offeredMapFormats, Format[] offeredInfoFormats, MapOperation[] offeredMapOperations, MapOperationFactor[] offeredZoomFactors, MapOperationFactor[] offeredPanFactors, double minScale, double maxScale, WMSGetMapRequest gmr, Project[] offeredProjects)
          Creates a new WMSClientConfiguration object.
 
Method Summary
 void addInfoFormat(Format infoFormat)
           
 void addMapFormat(Format mapFormat)
           
 void addMapOperation(MapOperation mapOperation)
           
 void addMapSize(MapSize mapSize)
           
 void addPanFactor(MapOperationFactor panFactor)
           
 void addProject(Project project)
           
 void addWMS(java.lang.String id, java.net.URL url)
          adds a new WMS to the client.
 void addWMS(java.lang.String id, WMSCapabilities capabilities)
          adds a new WMS the the client.
 void addZoomFactor(MapOperationFactor zoomFactor)
           
 java.lang.Object clone()
           
 java.lang.String exportAsXML()
          Produces an XML-representation of this object.
 WMSGetMapRequest getInitialGetMapRequest()
          returns the initial get map request
 double getMaxScale()
          returns the maximum map scale as defined at the OGC WMS specs that is offered by the client
 double getMinScale()
          returns the minimum map scale as defined at the OGC WMS specs that is offered by the client
 Format[] getOfferedInfoFormats()
          returns the list of map formats offered by the client
 Format[] getOfferedMapFormats()
          returns the list of map formats offered by the client
 MapOperation[] getOfferedMapOperations()
          returns the list of map operations offered by the client
 MapSize[] getOfferedMapSizes()
          returns the list of map sizes offered by the client
 MapOperationFactor[] getOfferedPanFactors()
          returns the list of pan factors offered by the client
 Project[] getOfferedProjects()
          returns the list of projects offered by the client
 MapOperationFactor[] getOfferedZoomFactors()
          returns the list of zoom factors offered by the client
 Project getProject(java.lang.String name)
          returns the project identified by its name.
 Format getSelectedInfoFormat()
          returns the info format that is marked as selected.
 Format getSelectedMapFormat()
          returns the map format that is marked as selected.
 MapOperation getSelectedMapOperation()
          returns the map operation that is marked as selected.
 MapSize getSelectedMapSize()
          returns the MapSize that is marked as selected.
 MapOperationFactor getSelectedPanFactor()
          returns the pan factor that is marked as selected.
 MapOperationFactor getSelectedZoomFactor()
          returns the zoom factor that is marked as selected.
 WMSCapabilities[] getWMSCapabilities()
          returns the encapsulated capabilites of all WMS registered to the client
 WMSCapabilities getWMSCapabilities(java.lang.String id)
          returns the WMSCapabilities object for the WMS identified by the submitted id.
 void setOfferedInfoFormats(Format[] infoFormats)
           
 void setOfferedMapFormats(Format[] mapFormats)
           
 void setOfferedMapOperations(MapOperation[] mapOperations)
           
 void setOfferedMapSizes(MapSize[] mapSizes)
           
 void setOfferedPanFactors(MapOperationFactor[] panFactors)
           
 void setOfferedProjects(Project[] projects)
           
 void setOfferedZoomFactors(MapOperationFactor[] zoomFactors)
           
 void setSelectedMapOperation(java.lang.String name)
          sets the submitted operation as selected
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offeredInfoFormats

private java.util.ArrayList offeredInfoFormats

offeredMapFormats

private java.util.ArrayList offeredMapFormats

offeredMapOperations

private java.util.ArrayList offeredMapOperations

offeredMapSizes

private java.util.ArrayList offeredMapSizes

offeredPanFactors

private java.util.ArrayList offeredPanFactors

offeredZoomFactors

private java.util.ArrayList offeredZoomFactors

offeredProjects

private java.util.ArrayList offeredProjects

wmsCapabilities

private java.util.HashMap wmsCapabilities

defaultConfig

private WMSClientConfiguration defaultConfig

gmr

private WMSGetMapRequest gmr

maxScale

private double maxScale

minScale

private double minScale
Constructor Detail

WMSClientConfiguration

WMSClientConfiguration(WMSClientConfiguration defaultConfig,
                       java.util.HashMap wmsCapabilities,
                       MapSize[] offeredMapSizes,
                       Format[] offeredMapFormats,
                       Format[] offeredInfoFormats,
                       MapOperation[] offeredMapOperations,
                       MapOperationFactor[] offeredZoomFactors,
                       MapOperationFactor[] offeredPanFactors,
                       double minScale,
                       double maxScale,
                       WMSGetMapRequest gmr,
                       Project[] offeredProjects)
Creates a new WMSClientConfiguration object. The first submitted parameter is an instance of the default map client configuration. if one of the other parameters submitted to the constructor isn't set, the value(s) of the default configuration will be used. this inculdes that if the default configuration is created all parameters must be set! Therefore an instance of a WMSClientConfiguration shall be created using a factory.

Parameters:
defaultConfig - default map client configuration
wmsCapabilities - map of the capabilities of the WMS known by the client
offeredMapSizes - list of map sizes offered by the client
offeredMapFormats - list of map formats offered by the client
offeredInfoFormats - list of info formats offered by the client
offeredMapOperations - list of map operations offered by the client
offeredZoomFactors - list of zoom factors offered by the client
offeredPanFactors - list of pan factors offered by the client
minScale - min map scale handled by the client
maxScale - maximum map scale handled by the client
gmr - initial GetMap request (first map the user will see)
Method Detail

clone

public java.lang.Object clone()

getWMSCapabilities

public WMSCapabilities[] getWMSCapabilities()
returns the encapsulated capabilites of all WMS registered to the client

Returns:
WMSCapabilities obejcts for all registered WMS

getWMSCapabilities

public WMSCapabilities getWMSCapabilities(java.lang.String id)
returns the WMSCapabilities object for the WMS identified by the submitted id. If no WMS with the submitted id is known by the client null will be returned

Parameters:
id - ID of the WMS which capabilities shall be returned
Returns:
capabilities of the desired WMS or null

addWMS

public void addWMS(java.lang.String id,
                   java.net.URL url)
            throws XMLParsingException
adds a new WMS to the client. The submitted URL is a reference to the capabilities of the WMS (shall be version 1.1.0 or higher)

Parameters:
id - ID of the WMS
url - reference to the capabilities of the WMS
Throws:
XMLParsingException

addWMS

public void addWMS(java.lang.String id,
                   WMSCapabilities capabilities)
adds a new WMS the the client.

Parameters:
id - ID of the WMS
capabilities - capabilities of the WMS

setOfferedMapSizes

public void setOfferedMapSizes(MapSize[] mapSizes)
Parameters:
mapSizes -

addMapSize

public void addMapSize(MapSize mapSize)
Parameters:
mapSize -

getOfferedMapSizes

public MapSize[] getOfferedMapSizes()
returns the list of map sizes offered by the client


getSelectedMapSize

public MapSize getSelectedMapSize()
returns the MapSize that is marked as selected. If no MapSize is marked, the first MapSize will be returned.


setOfferedPanFactors

public void setOfferedPanFactors(MapOperationFactor[] panFactors)
Parameters:
panFactors -

addPanFactor

public void addPanFactor(MapOperationFactor panFactor)
Parameters:
panFactor -

getOfferedPanFactors

public MapOperationFactor[] getOfferedPanFactors()
returns the list of pan factors offered by the client


getSelectedPanFactor

public MapOperationFactor getSelectedPanFactor()
returns the pan factor that is marked as selected. If no pan factor is marked, the first pan factor will be returned.


setOfferedZoomFactors

public void setOfferedZoomFactors(MapOperationFactor[] zoomFactors)
Parameters:
zoomFactors -

addZoomFactor

public void addZoomFactor(MapOperationFactor zoomFactor)
Parameters:
zoomFactor -

getOfferedZoomFactors

public MapOperationFactor[] getOfferedZoomFactors()
returns the list of zoom factors offered by the client


getSelectedZoomFactor

public MapOperationFactor getSelectedZoomFactor()
returns the zoom factor that is marked as selected. If no zoom factor is marked, the first zoom factor will be returned.


setOfferedMapOperations

public void setOfferedMapOperations(MapOperation[] mapOperations)
Parameters:
mapOperations -

addMapOperation

public void addMapOperation(MapOperation mapOperation)
Parameters:
mapOperation -

getOfferedMapOperations

public MapOperation[] getOfferedMapOperations()
returns the list of map operations offered by the client


getSelectedMapOperation

public MapOperation getSelectedMapOperation()
returns the map operation that is marked as selected. If no map operation is marked, the first map operation will be returned.


setSelectedMapOperation

public void setSelectedMapOperation(java.lang.String name)
sets the submitted operation as selected


setOfferedMapFormats

public void setOfferedMapFormats(Format[] mapFormats)
Parameters:
mapFormats -

addMapFormat

public void addMapFormat(Format mapFormat)
Parameters:
mapFormat -

getOfferedMapFormats

public Format[] getOfferedMapFormats()
returns the list of map formats offered by the client


getSelectedMapFormat

public Format getSelectedMapFormat()
returns the map format that is marked as selected. If no map format is marked, the first map format will be returned.


setOfferedInfoFormats

public void setOfferedInfoFormats(Format[] infoFormats)
Parameters:
infoFormats -

addInfoFormat

public void addInfoFormat(Format infoFormat)
Parameters:
infoFormat -

getOfferedInfoFormats

public Format[] getOfferedInfoFormats()
returns the list of map formats offered by the client


getSelectedInfoFormat

public Format getSelectedInfoFormat()
returns the info format that is marked as selected. If no info format is marked, the first info format will be returned.


setOfferedProjects

public void setOfferedProjects(Project[] projects)
Parameters:
projects -

addProject

public void addProject(Project project)
Parameters:
project -

getOfferedProjects

public Project[] getOfferedProjects()
returns the list of projects offered by the client


getProject

public Project getProject(java.lang.String name)
returns the project identified by its name. If no project with the submitted name is registered null will be returned


getMinScale

public double getMinScale()
returns the minimum map scale as defined at the OGC WMS specs that is offered by the client

Returns:

getMaxScale

public double getMaxScale()
returns the maximum map scale as defined at the OGC WMS specs that is offered by the client

Returns:

getInitialGetMapRequest

public WMSGetMapRequest getInitialGetMapRequest()
returns the initial get map request

Returns:

exportAsXML

public java.lang.String exportAsXML()
Produces an XML-representation of this object.

Specified by:
exportAsXML in interface Marshallable
Returns:
XML-representation of this object