|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(java.lang.String name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String crsName)
Adds a CRS to a layer if a ViewContext. |
ViewContext |
addFormatToLayer(java.lang.String name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.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,
java.net.URL owsAddress,
java.lang.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,
java.net.URL owsAddress,
java.lang.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,
java.net.URL[] owsAddresses,
java.lang.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,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String styleName)
adds a named style to a layer to be available within a context. |
ViewContext |
assignSLDToLayer(QualifiedName name,
java.net.URL owsAddress,
java.lang.String type,
StyledLayerDescriptor sld)
assignes a SLD document instead of a style to a layer. |
ViewContext |
destroyGroup(java.lang.String groupName)
destroys a group. |
ViewContext |
groupLayers(int first,
int last,
java.lang.String groupName,
java.lang.String parentGroupName)
the difference to |
ViewContext |
groupLayers(java.lang.String[] layers,
java.net.URL[] owsAddresses,
java.lang.String[] types,
java.lang.String groupName,
java.lang.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(java.awt.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(java.lang.String name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String crsName)
removes a CRS from the list of availabe CRS of a layer. |
ViewContext |
removeFormatFromLayer(java.lang.String name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String mimeType)
removes a format from a layer in a ViewContext. |
ViewContext |
removeLayer(QualifiedName name,
java.net.URL owsAddress,
java.lang.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,
java.net.URL owsAddress,
java.lang.String type,
java.lang.String styleName)
removes a style from the layer defined in a ViewContext. |
ViewContext |
setCurrentMapFormat(java.lang.String mimeType,
java.net.URL owsAddress,
java.lang.String type)
sets the current image format a map shall be rendered. |
ViewContext |
setLayerActiveStyle(QualifiedName name,
java.net.URL owsAddress,
java.lang.String type,
java.lang.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,
java.net.URL[] owsAddresses,
java.lang.String type)
sets the layers provided by the passed OWS to a ViewContext . |
ViewContext |
setLayersVisible(java.lang.String name,
java.net.URL owsAddress,
java.lang.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(java.lang.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 their order |
ViewContext |
swapLayers(QualifiedName name,
java.net.URL owsAddress,
java.lang.String type,
boolean up)
swaps two layers in their order. |
ViewContext |
zoom(java.awt.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(java.lang.String name, java.net.URL owsAddress, java.lang.String type, java.lang.String crsName) throws PortalException
MapModelAccess
addCRSToLayer
in interface MapModelAccess
name
- 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/OWSpublic ViewContext addFormatToLayer(java.lang.String name, java.net.URL owsAddress, java.lang.String type, java.lang.String mimeType) throws PortalException
MapModelAccess
addFormatToLayer
in interface MapModelAccess
name
- 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 OWSpublic ViewContext addLayer(QualifiedName name, java.net.URL owsAddress, java.lang.String type) throws PortalException
MapModelAccess
ViewContext
. A layer may be a WMS layer, a WFS feature type or a WCS
coverage.
addLayer
in interface MapModelAccess
name
- 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, java.net.URL owsAddress, java.lang.String type) throws PortalException
MapModelAccess
ViewContext
. A layer may be a WMS layer, a WFS feature type or a WCS
coverage.
addLayer
in interface MapModelAccess
index
- 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
MapModelAccess
ViewContext
.
A layer may be a WMS layer, a WFS feature type or a WCS coverage.
addLayer
in interface MapModelAccess
index
- 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
MapModelAccess
ViewContext
. A layer may be a
WMS layer, a WFS feature type or a WCS coverage.
addLayer
in interface MapModelAccess
layer
- layer to add
PortalException
- will be thrown if the layer already is registered to a ViewContext.public ViewContext addLayers(QualifiedName[] names, java.net.URL[] owsAddresses, java.lang.String type) throws PortalException
MapModelAccess
ViewContext
. A layer may be a WMS layer, a WFS feature type or a WCS
coverage.
addLayers
in interface MapModelAccess
names
- names of the layerowsAddresses
- 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
MapModelAccess
ViewContext
. A
layer may be a WMS layer, a WFS feature type or a WCS coverage.
addLayers
in interface MapModelAccess
layers
- layers to add
PortalException
- will be thrown if of the layers already is registered to a ViewContext.public ViewContext addStyleToLayer(QualifiedName name, java.net.URL owsAddress, java.lang.String type, java.lang.String styleName) throws PortalException
MapModelAccess
addStyleToLayer
in interface MapModelAccess
name
- 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 layerpublic ViewContext assignSLDToLayer(QualifiedName name, java.net.URL owsAddress, java.lang.String type, StyledLayerDescriptor sld) throws PortalException
MapModelAccess
assignSLDToLayer
in interface MapModelAccess
name
- 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 null
type
- 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(java.lang.String groupName)
MapModelAccess
destroyGroup
in interface MapModelAccess
groupName
- name of the group to be removed
public ViewContext groupLayers(int first, int last, java.lang.String groupName, java.lang.String parentGroupName) throws PortalException
MapModelAccess
groupLayers
in interface MapModelAccess
first
- 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(java.lang.String[] layers, java.net.URL[] owsAddresses, java.lang.String[] types, java.lang.String groupName, java.lang.String parentGroupName) throws PortalException
MapModelAccess
null
.
If no parent is given the group will be located underneath the root node.
groupLayers
in interface MapModelAccess
layers
- 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 MapModelAccess
directionDegree
- 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 <= 0public ViewContext pan(int direction, double factor) throws PortalException, ContextException
pan
in interface MapModelAccess
direction
- 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
MapModelAccess.PAN_NORTH
,
MapModelAccess.PAN_NORTHEAST
,
MapModelAccess.PAN_NORTHWEST
,
MapModelAccess.PAN_SOUTH
,
MapModelAccess.PAN_SOUTHEAST
,
MapModelAccess.PAN_SOUTHWEST
,
MapModelAccess.PAN_WEST
,
MapModelAccess.PAN_EAST
public ViewContext recenterMap(java.awt.Point point) throws ContextException
recenterMap
in interface MapModelAccess
point
- point (pixel coordinates) of the current map that marks the new center of the map
ContextException
with a passed factor == 0;
public ViewContext recenterMap(Point point) throws ContextException
recenterMap
in interface MapModelAccess
point
- point (map coordinates) of the current map that marks the new center of the map
ContextException
with a passed factor == 0;
public ViewContext removeCRSFromLayer(java.lang.String name, java.net.URL owsAddress, java.lang.String type, java.lang.String crsName)
MapModelAccess
removeCRSFromLayer
in interface MapModelAccess
name
- 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(java.lang.String name, java.net.URL owsAddress, java.lang.String type, java.lang.String mimeType) throws PortalException
MapModelAccess
removeFormatFromLayer
in interface MapModelAccess
name
- 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, java.net.URL owsAddress, java.lang.String type)
MapModelAccess
ViewContext
. if a
layer with this name does not exist in a context, the unchanged ViewContext
will be returned
removeLayer
in interface MapModelAccess
name
- 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, java.net.URL owsAddress, java.lang.String type, java.lang.String styleName)
MapModelAccess
removeStyleFromLayer
in interface MapModelAccess
name
- 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(java.lang.String mimeType, java.net.URL owsAddress, java.lang.String type) throws PortalException
MapModelAccess
setCurrentMapFormat
in interface MapModelAccess
mimeType
- 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 ViewContextpublic ViewContext setLayerActiveStyle(QualifiedName name, java.net.URL owsAddress, java.lang.String type, java.lang.String styleName) throws PortalException
MapModelAccess
setLayerActiveStyle
in interface MapModelAccess
name
- 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 layerpublic ViewContext setLayers(QualifiedName[] names, java.net.URL[] owsAddresses, java.lang.String type) throws PortalException
MapModelAccess
ViewContext
. A layer may be a
WMS layer, a WFS feature type or a WCS coverage.
setLayers
in interface MapModelAccess
names
- names of the layerowsAddresses
- 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
MapModelAccess
ViewContext
. A layer may be a WMS layer, a WFS feature
type or a WCS coverage.
setLayers
in interface MapModelAccess
layers
- layers to add
PortalException
- will be thrown if of the layers already is registered to a ViewContext.public ViewContext setLayersVisible(java.lang.String name, java.net.URL owsAddress, java.lang.String type, boolean visible) throws PortalException
MapModelAccess
setLayersVisible
in interface MapModelAccess
name
- 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 MapModelAccess
boundingBox
- new boundingbox
ContextException
public ViewContext setMapCRS(java.lang.String crs) throws PortalException
MapModelAccess
setMapCRS
in interface MapModelAccess
crs
- name of the CRS e.g. EPSG:4326
PortalException
- will be thrown if the CRS is not known by all layers available through a
ViewContextpublic ViewContext setMapSize(int width, int height) throws PortalException
setMapSize
in interface MapModelAccess
width
- 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 MapModelAccess
name
- 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, String, boolean)
public ViewContext swapLayers(QualifiedName name, java.net.URL owsAddress, java.lang.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 MapModelAccess
name
- 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(java.awt.Point point, double factor) throws ContextException
zoom
in interface MapModelAccess
factor
- 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 MapModelAccess
factor
- 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.5 (2011/06/29 09:44 build-8-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://www.deegree.org