org.deegree_impl.graphics.displayelements
Class DisplayElementFactory

java.lang.Object
  extended byorg.deegree_impl.graphics.displayelements.DisplayElementFactory

public class DisplayElementFactory
extends java.lang.Object

Factory class for the different kinds of DisplayElements.

Version:
$Revision: 1.23 $ $Date: 2004/03/05 07:42:14 $
Author:
Andreas Poth, Markus Schneider

Constructor Summary
DisplayElementFactory()
           
 
Method Summary
static DisplayElement buildDisplayElement(java.lang.Object o)
          Builds a DisplayElement using the given Feature or Raster and a default Symbolizer.
static DisplayElement buildDisplayElement(java.lang.Object o, Symbolizer symbolizer)
          Builds a DisplayElement using the given Feature or raster and Symbolizer.
static LabelDisplayElement buildLabelDisplayElement(Feature feature, GM_Object gmObject, TextSymbolizer sym)
          Creates a LabelDisplayElement using the given geometry and style information.
static LineStringDisplayElement buildLineStringDisplayElement(Feature feature, GM_Object geom, LineSymbolizer sym)
          Creates a LineStringDisplayElement using the given geometry and style information.
static PointDisplayElement buildPointDisplayElement(Feature feature, GM_Object geom, PointSymbolizer sym)
          Creates a PointDisplayElement using the given geometry and style information.
static PolygonDisplayElement buildPolygonDisplayElement(Feature feature, GM_Object gmObject, PolygonSymbolizer sym)
          Creates a PolygonDisplayElement using the given geometry and style information.
static RasterDisplayElement buildRasterDisplayElement(GC_GridCoverage gc, RasterSymbolizer sym)
          Creates a RasterDisplayElement from the submitted image.
 DisplayElement[] createDisplayElement(java.lang.Object o, UserStyle[] styles)
          returns the display elements associated to a feature
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplayElementFactory

public DisplayElementFactory()
Method Detail

createDisplayElement

public DisplayElement[] createDisplayElement(java.lang.Object o,
                                             UserStyle[] styles)
                                      throws IncompatibleGeometryTypeException
returns the display elements associated to a feature

Throws:
IncompatibleGeometryTypeException

buildDisplayElement

public static DisplayElement buildDisplayElement(java.lang.Object o,
                                                 Symbolizer symbolizer)
                                          throws IncompatibleGeometryTypeException
Builds a DisplayElement using the given Feature or raster and Symbolizer.

Parameters:
o - contains the geometry or raster information (Feature or raster)
symbolizer - contains the drawing (style) information and selects the geometry property of the Feature to be drawn
Returns:
constructed DisplayElement
Throws:
IncompatibleGeometryTypeException - if the selected geometry of the Feature is not compatible with the Symbolizer

buildDisplayElement

public static DisplayElement buildDisplayElement(java.lang.Object o)
                                          throws IncompatibleGeometryTypeException
Builds a DisplayElement using the given Feature or Raster and a default Symbolizer.

Parameters:
o - contains the geometry or raster information (Feature or raster)
Returns:
constructed DisplayElement
Throws:
IncompatibleGeometryTypeException - if the selected geometry of the Feature is not compatible with the Symbolizer

buildPointDisplayElement

public static PointDisplayElement buildPointDisplayElement(Feature feature,
                                                           GM_Object geom,
                                                           PointSymbolizer sym)
Creates a PointDisplayElement using the given geometry and style information.

Parameters:
feature - associated Feature
geom - geometry information
sym - style information
Returns:
constructed PointDisplayElement

buildLineStringDisplayElement

public static LineStringDisplayElement buildLineStringDisplayElement(Feature feature,
                                                                     GM_Object geom,
                                                                     LineSymbolizer sym)
                                                              throws IncompatibleGeometryTypeException
Creates a LineStringDisplayElement using the given geometry and style information.

Parameters:
feature - associated Feature
geom - geometry information
sym - style information
Returns:
constructed LineStringDisplayElement
Throws:
IncompatibleGeometryTypeException - if the geometry property is not a GM_Curve or a GM_MultiCurve

buildPolygonDisplayElement

public static PolygonDisplayElement buildPolygonDisplayElement(Feature feature,
                                                               GM_Object gmObject,
                                                               PolygonSymbolizer sym)
                                                        throws IncompatibleGeometryTypeException
Creates a PolygonDisplayElement using the given geometry and style information.

Parameters:
feature - associated Feature
gmObject - geometry information
sym - style information
Returns:
constructed PolygonDisplayElement
Throws:
IncompatibleGeometryTypeException - if the geometry property is not a GM_Surface or a GM_MultiSurface

buildLabelDisplayElement

public static LabelDisplayElement buildLabelDisplayElement(Feature feature,
                                                           GM_Object gmObject,
                                                           TextSymbolizer sym)
                                                    throws IncompatibleGeometryTypeException
Creates a LabelDisplayElement using the given geometry and style information.

Parameters:
feature - Feature to be used (necessary for evaluation of the label expression)
gmObject - geometry information
sym - style information
Returns:
constructed PolygonDisplayElement
Throws:
IncompatibleGeometryTypeException - if the geometry property is not a GM_Point, a GM_Surface or GM_MultiSurface

buildRasterDisplayElement

public static RasterDisplayElement buildRasterDisplayElement(GC_GridCoverage gc,
                                                             RasterSymbolizer sym)
Creates a RasterDisplayElement from the submitted image. The submitted GM_Envelope holds the bounding box of the imgae/raster data.

Parameters:
gc - grid coverage
sym - raster symbolizer
Returns:
RasterDisplayElement