org.deegree_impl.gml
Class GMLPolygon_Impl

java.lang.Object
  extended byorg.deegree_impl.gml.GMLGeometry_Impl
      extended byorg.deegree_impl.gml.GMLPolygon_Impl
All Implemented Interfaces:
GMLGeometry, GMLPolygon

public class GMLPolygon_Impl
extends GMLGeometry_Impl
implements GMLPolygon

----------------------------------------------------------

Version:
07.02.2001

Author:
Andreas Poth

Field Summary
 
Fields inherited from class org.deegree_impl.gml.GMLGeometry_Impl
element
 
Constructor Summary
GMLPolygon_Impl(org.w3c.dom.Element element)
          Creates a new GMLPolygon_Impl object.
 
Method Summary
 void addInteriorRing(GMLLinearRing interiorRing)
          adds a interior ring to the polygon. if the submitted ring isn't not completly contained within the exterior ring an exception should be thrown.
static GMLPolygon createGMLPolygon(org.w3c.dom.Document doc)
          factory method to create a GMLPolygon. the poly that will be returned doesn't contain any ring
 org.w3c.dom.Element getAsElement()
           
 GMLLinearRing getExteriorRing()
          returns the exterior ring of the polygon
 GMLLinearRing[] getInteriorRings()
          returns the interior rings of the polygon. if no interior rings exists null should be returned
 void setExteriorRing(GMLLinearRing exteriorRing)
           
 
Methods inherited from class org.deegree_impl.gml.GMLGeometry_Impl
getId, getName, getSrs, setId, setSrs, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.gml.GMLGeometry
getId, getName, getSrs, setId, setSrs
 

Constructor Detail

GMLPolygon_Impl

public GMLPolygon_Impl(org.w3c.dom.Element element)
Creates a new GMLPolygon_Impl object.

Parameters:
element -
Method Detail

createGMLPolygon

public static GMLPolygon createGMLPolygon(org.w3c.dom.Document doc)
factory method to create a GMLPolygon. the poly that will be returned doesn't contain any ring


getAsElement

public org.w3c.dom.Element getAsElement()
Overrides:
getAsElement in class GMLGeometry_Impl
Returns:

getExteriorRing

public GMLLinearRing getExteriorRing()
returns the exterior ring of the polygon

Specified by:
getExteriorRing in interface GMLPolygon

setExteriorRing

public void setExteriorRing(GMLLinearRing exteriorRing)
Specified by:
setExteriorRing in interface GMLPolygon
See Also:
org.deegree_impl.gml.GMLPolygon_Impl#getExteriorRing()

If an exterior ring already exsists, it will be removed before setting the new one.


getInteriorRings

public GMLLinearRing[] getInteriorRings()
returns the interior rings of the polygon. if no interior rings exists null should be returned

Specified by:
getInteriorRings in interface GMLPolygon

addInteriorRing

public void addInteriorRing(GMLLinearRing interiorRing)
                     throws GMLException
adds a interior ring to the polygon. if the submitted ring isn't not completly contained within the exterior ring an exception should be thrown.

Specified by:
addInteriorRing in interface GMLPolygon
Throws:
GMLException