|
deegree 2.2 (2008/12/22 11:33 build-3038-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.portal.context.DefaultMapModelAccess
public class DefaultMapModelAccess
| Field Summary |
|---|
| Fields inherited from interface org.deegree.portal.context.MapModelAccess |
|---|
PAN_EAST, PAN_NORTH, PAN_NORTHEAST, PAN_NORTHWEST, PAN_SOUTH, PAN_SOUTHEAST, PAN_SOUTHWEST, PAN_WEST |
| Constructor Summary | |
|---|---|
DefaultMapModelAccess(ViewContext vc)
|
|
| Method Summary | |
|---|---|
ViewContext |
addCRSToLayer(String name,
URL owsAddress,
String type,
String crsName)
Adds a CRS to a layer if a ViewContext. |
ViewContext |
addFormatToLayer(String name,
URL owsAddress,
String type,
String mimeType)
adds a new image format to a layer of a ViewContext. |
ViewContext |
addLayer(int index,
Layer layer)
adds a layer to the defined index position of the layer list of a ViewContext. |
ViewContext |
addLayer(int index,
QualifiedName name,
URL owsAddress,
String type)
adds a layer provided by the passed OWS to the defined index position of the layer list of a ViewContext. |
ViewContext |
addLayer(Layer layer)
adds a layer to the end of the layer list of a ViewContext. |
ViewContext |
addLayer(QualifiedName name,
URL owsAddress,
String type)
adds a layer provided by the passed OWS to the end of the layer list of a ViewContext. |
ViewContext |
addLayers(Layer[] layers)
adds a number of layers to the end of the layer list of a ViewContext. |
ViewContext |
addLayers(QualifiedName[] names,
URL[] owsAddresses,
String type)
adds a number of layers provided by the passed OWS to the end of the layer list of a ViewContext. |
ViewContext |
addStyleToLayer(QualifiedName name,
URL owsAddress,
String type,
String styleName)
adds a named style to a layer to be available within a context. |
ViewContext |
assignSLDToLayer(QualifiedName name,
URL owsAddress,
String type,
StyledLayerDescriptor sld)
assignes a SLD document instead of a style to a layer. |
ViewContext |
destroyGroup(String groupName)
destroys a group. |
ViewContext |
groupLayers(int first,
int last,
String groupName,
String parentGroupName)
the difference to |
ViewContext |
groupLayers(String[] layers,
URL[] owsAddresses,
String[] types,
String groupName,
String parentGroupName)
groups a set of layers identified by their names, the address of the OWS that provides it und its type. |
ViewContext |
pan(double directionDegree,
double factor)
moves a map view to a free definable direction with a given factor |
ViewContext |
pan(int direction,
double factor)
moves the boundingbox of the map to a well known direction. |
ViewContext |
recenterMap(Point point)
centers he map described by a ViewContext to the passed point. |
ViewContext |
recenterMap(Point point)
centers he map described by a ViewContext to the passed point. |
ViewContext |
removeCRSFromLayer(String name,
URL owsAddress,
String type,
String crsName)
removes a CRS from the list of availabe CRS of a layer. |
ViewContext |
removeFormatFromLayer(String name,
URL owsAddress,
String type,
String mimeType)
removes a format from a layer in a ViewContext. |
ViewContext |
removeLayer(QualifiedName name,
URL owsAddress,
String type)
removes a named layer served by the passsed OWS from a ViewContext. if a
layer with this name does not exist in a context, the unchanged ViewContext
will be returned |
ViewContext |
removeStyleFromLayer(QualifiedName name,
URL owsAddress,
String type,
String styleName)
removes a style from the layer defined in a ViewContext. |
ViewContext |
setCurrentMapFormat(String mimeType,
URL owsAddress,
String type)
sets the current image format a map shall be rendered. |
ViewContext |
setLayerActiveStyle(QualifiedName name,
URL owsAddress,
String type,
String styleName)
sets the active style (style to be used for rendering) of a layer |
ViewContext |
setLayers(Layer[] layers)
sets the layers to a ViewContext. |
ViewContext |
setLayers(QualifiedName[] names,
URL[] owsAddresses,
String type)
sets the layers provided by the passed OWS to a ViewContext. |
ViewContext |
setLayersVisible(String name,
URL owsAddress,
String type,
boolean visible)
set a layer to be visible or invisible |
ViewContext |
setMapBoundingBox(Envelope boundingBox)
sets the bounding box a map/VieContext |
ViewContext |
setMapCRS(String crs)
sets the CRS to be used by the map created from a ViewContext. |
ViewContext |
setMapSize(int width,
int height)
sets the width and height of a map described by a ViewContext |
ViewContext |
swapGroups(QualifiedName name,
boolean up)
swaps to groups in threir order |
ViewContext |
swapLayers(QualifiedName name,
URL owsAddress,
String type,
boolean up)
swaps two layers in their order. |
ViewContext |
zoom(Point point,
double factor)
zoom in or out of the map described by a ViewContext and recenters it to the passed point. |
ViewContext |
zoom(Point point,
double factor)
zoom in or out of the map described by a ViewContext and recenters it to the passed point. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultMapModelAccess(ViewContext vc)
vc - | Method Detail |
|---|
public ViewContext addCRSToLayer(String name,
URL owsAddress,
String type,
String crsName)
throws PortalException
MapModelAccess
addCRSToLayer in interface MapModelAccessname - name of the layerowsAddress - address of the OWS that serves this layertype - OWS type (WCS, WMS or WFS)crsName - name of the CRS to be added (e.g. EPSG:4326)
PortalException - will be thrown if the layer is not known by a ViewContext or the CRS is not
supported for this layer/OWS
public ViewContext addFormatToLayer(String name,
URL owsAddress,
String type,
String mimeType)
throws PortalException
MapModelAccess
addFormatToLayer in interface MapModelAccessname - name of the layerowsAddress - address of the OWStype - OWS type (WCS, WMS or WFS)mimeType - new format to add to the layer
PortalException - will be thrown if the passed mimeType is not suported by the passed OWS
public ViewContext addLayer(QualifiedName name,
URL owsAddress,
String type)
throws PortalException
MapModelAccessViewContext. A layer may be a WMS layer, a WFS feature type or a WCS
coverage.
addLayer in interface MapModelAccessname - name of the layerowsAddress - address of the OWS that serves the layertype - OWS type (WCS, WMS or WFS)
PortalException - will be thrown if the layer already is registered to a ViewContext or the OWS
does not serves a layer with this name.
public ViewContext addLayer(int index,
QualifiedName name,
URL owsAddress,
String type)
throws PortalException
MapModelAccessViewContext. A layer may be a WMS layer, a WFS feature type or a WCS
coverage.
addLayer in interface MapModelAccessindex - index position where to insert the layername - name of the layerowsAddress - address of the OWS that serves the layertype - OWS type (WCS, WMS or WFS)
PortalException - will be thrown if the layer already is registered to a ViewContext or the OWS
does not serves a layer with this name or the index is < 0 or > the number
of layers -1;
public ViewContext addLayer(int index,
Layer layer)
throws PortalException
MapModelAccessViewContext.
A layer may be a WMS layer, a WFS feature type or a WCS coverage.
addLayer in interface MapModelAccessindex - index position where to insert the layerlayer - layer to add
PortalException - will be thrown if the layer already is registered to a ViewContext or the index
is < 0 or > the number of layers -1;
public ViewContext addLayer(Layer layer)
throws PortalException
MapModelAccessViewContext. A layer may be a
WMS layer, a WFS feature type or a WCS coverage.
addLayer in interface MapModelAccesslayer - layer to add
PortalException - will be thrown if the layer already is registered to a ViewContext.
public ViewContext addLayers(QualifiedName[] names,
URL[] owsAddresses,
String type)
throws PortalException
MapModelAccessViewContext. A layer may be a WMS layer, a WFS feature type or a WCS
coverage.
addLayers in interface MapModelAccessowsAddresses - addresses of the OWS's that serves the layertype - OWS type (WCS, WMS or WFS)
PortalException - will be thrown if of the layers already is registered to a ViewContext or the OWS
does not serves one the layers or the OWS does not serves one the layers or
names
and owsAddresses are not of the same size.
public ViewContext addLayers(Layer[] layers)
throws PortalException
MapModelAccessViewContext. A
layer may be a WMS layer, a WFS feature type or a WCS coverage.
addLayers in interface MapModelAccesslayers - layers to add
PortalException - will be thrown if of the layers already is registered to a ViewContext.
public ViewContext addStyleToLayer(QualifiedName name,
URL owsAddress,
String type,
String styleName)
throws PortalException
MapModelAccess
addStyleToLayer in interface MapModelAccessname - name of the layerowsAddress - address of the OWS that serves this layertype - OWS type (WCS, WMS or WFS)styleName - name of the style to be set
PortalException - will be thrown if the layer is not known by a ViewContext or the style is not
available for this layer
public ViewContext assignSLDToLayer(QualifiedName name,
URL owsAddress,
String type,
StyledLayerDescriptor sld)
throws PortalException
MapModelAccess
assignSLDToLayer in interface MapModelAccessname - name of the layer the SLD should be assigned toowsAddress - address of the OWS that serves this layer(s) if the SLD contains named layer(s).
Otherwise the parameter can be nulltype - OWS type (WCS, WMS or WFS)sld - SLD that shall be assigned
PortalException - will be thrown if the layer is not known by a ViewContext or if the SLD contains
a named layer but owsAddress is passed.public ViewContext destroyGroup(String groupName)
MapModelAccess
destroyGroup in interface MapModelAccessgroupName - name of the group to be removed
public ViewContext groupLayers(int first,
int last,
String groupName,
String parentGroupName)
throws PortalException
MapModelAccess
groupLayers in interface MapModelAccessfirst - zero based index of the first layer to add to the grouplast - zero based index of the last layer to add to the groupgroupName - unique name of the groupparentGroupName - name of the parent group. may be null
- Returns:
- modified ViewContext
- Throws:
PortalException - will be thrown if first or last is < 0 or larger
than the total number of layers -1 or a layer is
already member of a group- See Also:
is that the layers are
identified by theri index position in a ViewContext
public ViewContext groupLayers(String[] layers,
URL[] owsAddresses,
String[] types,
String groupName,
String parentGroupName)
throws PortalException
MapModelAccessnull.
If no parent is given the group will be located underneath the root node.
groupLayers in interface MapModelAccesslayers - layers to be grouped.groupName - unique name of the groupparentGroupName - name of the parent group. may be null
- Returns:
- modified ViewContext
- Throws:
PortalException - will be thrown if one of the layers is not served by
the assigned OWS or a layer is already member of a
group
public ViewContext pan(double directionDegree,
double factor)
throws PortalException
MapModelAccess
pan in interface MapModelAccessdirectionDegree - direction measured in degree that map view shall be moved tofactor - factor measured in % the map view shall be moved
PortalException - will be thrown if factor is <= 0
public ViewContext pan(int direction,
double factor)
throws PortalException,
ContextException
pan in interface MapModelAccessdirection - direction the map view shall be moved tofactor - factor measured in % the map view shall be moved
PortalException - will be thrown if passed direction is not valid or factor is <= 0
ContextException,
,
,
,
,
,
,
public ViewContext recenterMap(Point point)
throws ContextException
recenterMap in interface MapModelAccesspoint - point (pixel coordinates) of the current map that marks the new center of the map
ContextExceptionwith a passed factor == 0;
public ViewContext recenterMap(Point point)
throws ContextException
recenterMap in interface MapModelAccesspoint - point (map coordinates) of the current map that marks the new center of the map
ContextExceptionwith a passed factor == 0;
public ViewContext removeCRSFromLayer(String name,
URL owsAddress,
String type,
String crsName)
MapModelAccess
removeCRSFromLayer in interface MapModelAccessname - name of the layerowsAddress - address of the OWS that serves this layertype - OWS type (WCS, WMS or WFS)crsName - name of the CRS to be removed from a layers CRS list
public ViewContext removeFormatFromLayer(String name,
URL owsAddress,
String type,
String mimeType)
throws PortalException
MapModelAccess
removeFormatFromLayer in interface MapModelAccessname - name of the layerowsAddress - address of the OWStype - OWS type (WCS, WMS or WFS)mimeType - format to be removed
PortalException - will be thrown if the removed format is the current format of the layer.MapModelAccess.addFormatToLayer(String, URL, String, String)
public ViewContext removeLayer(QualifiedName name,
URL owsAddress,
String type)
MapModelAccessViewContext. if a
layer with this name does not exist in a context, the unchanged ViewContext
will be returned
removeLayer in interface MapModelAccessname - name of the layer to be removedowsAddress - address of the OWS that serves the layertype - OWS type (WCS, WMS or WFS)
public ViewContext removeStyleFromLayer(QualifiedName name,
URL owsAddress,
String type,
String styleName)
MapModelAccess
removeStyleFromLayer in interface MapModelAccessname - name of the layerowsAddress - address of the OWS that serves this layertype - OWS type (WCS, WMS or WFS)styleName - name of the style to be removed
public ViewContext setCurrentMapFormat(String mimeType,
URL owsAddress,
String type)
throws PortalException
MapModelAccess
setCurrentMapFormat in interface MapModelAccessmimeType - image formatowsAddress - address of the OWS the format shall be used fortype - OWS type
PortalException - will be thrown if the passed mimeType is not suported by the passed OWS or one of
its layers as defined in a ViewContext
public ViewContext setLayerActiveStyle(QualifiedName name,
URL owsAddress,
String type,
String styleName)
throws PortalException
MapModelAccess
setLayerActiveStyle in interface MapModelAccessname - name of the layer a style shall be set toowsAddress - address of the OWS that serves this layertype - OWS type (WCS, WMS or WFS)styleName - name of the style to be assigned
PortalException - will be thrown if the layer or style are not known by a ViewContext or the style
is not available for this layer
public ViewContext setLayers(QualifiedName[] names,
URL[] owsAddresses,
String type)
throws PortalException
MapModelAccessViewContext. A layer may be a
WMS layer, a WFS feature type or a WCS coverage.
setLayers in interface MapModelAccessowsAddresses - addresses of the OWS that serves the layer. each passed layername is assigned to
the OWS URL at the same index position.type - OWS type (WCS, WMS or WFS)
PortalException - will be thrown if of the layers already is registered to a ViewContext or the OWS
does not serves one the layers or names
and owsAddresses are not of the same size.
public ViewContext setLayers(Layer[] layers)
throws PortalException
MapModelAccessViewContext. A layer may be a WMS layer, a WFS feature
type or a WCS coverage.
setLayers in interface MapModelAccesslayers - layers to add
PortalException - will be thrown if of the layers already is registered to a ViewContext.
public ViewContext setLayersVisible(String name,
URL owsAddress,
String type,
boolean visible)
throws PortalException
MapModelAccess
setLayersVisible in interface MapModelAccessname - name of the layerowsAddress - address of the OWS that serves this layertype - OWS type (WCS, WMS or WFS)visible - true if a layer shall be visible; false if not.
PortalException - will be thrown if the layer is not known by a ViewContext.
public ViewContext setMapBoundingBox(Envelope boundingBox)
throws ContextException
setMapBoundingBox in interface MapModelAccessboundingBox - new boundingbox
ContextException
public ViewContext setMapCRS(String crs)
throws PortalException
MapModelAccess
setMapCRS in interface MapModelAccesscrs - name of the CRS e.g. EPSG:4326
PortalException - will be thrown if the CRS is not known by all layers available through a
ViewContext
public ViewContext setMapSize(int width,
int height)
throws PortalException
setMapSize in interface MapModelAccesswidth - map width measured in pixelheight - map height measured in pixel
PortalException - will be thrown if width or height < 1 (even a width or height of 1 pixel is not
really useful but formal it is valid);
public ViewContext swapGroups(QualifiedName name,
boolean up)
throws PortalException
MapModelAccess
swapGroups in interface MapModelAccessname - name of the group to be moved up or downup - true if a group should be moved up otherwise it will be moved down.
PortalException - will be thrown if a group with the passed name does not exist in a ViewContextMapModelAccess#swapLayers(QualifiedName, URL, boolean).
public ViewContext swapLayers(QualifiedName name,
URL owsAddress,
String type,
boolean up)
throws PortalException
ViewContext will be returned
Notice: if to layers to be swaped are served by differend OWS at least one new image-layer must be created by the client.
swapLayers in interface MapModelAccessname - name of the layer to be moved up or down in the listowsAddress - address of the OWS that serves the layertype - OWS type (WCS, WMS or WFS)up - true if layer should be moved up otherwise it will be moved down.
PortalException - will be thrown if the layer does not exists in a ViewContext.
public ViewContext zoom(Point point,
double factor)
throws ContextException
zoom in interface MapModelAccessfactor - zoom factor in % of the boundingbox sizepoint - point (pixel coordinates) of the current map that marks the new center of the map
ContextException
public ViewContext zoom(Point point,
double factor)
throws ContextException
zoom in interface MapModelAccessfactor - zoom factor in % of the boundingbox sizepoint - point (map coordinates) of the current map that marks the new center of the map
ContextException
|
deegree 2.2 (2008/12/22 11:33 build-3038-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net