org.deegree_impl.gml
Class GMLCoord_Impl

java.lang.Object
  extended byorg.deegree_impl.gml.GMLCoord_Impl
All Implemented Interfaces:
GMLCoord

public class GMLCoord_Impl
extends java.lang.Object
implements GMLCoord

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

Version:
07.02.2001

Author:
Andreas Poth

Field Summary
private  org.w3c.dom.Element element
           
 
Constructor Summary
GMLCoord_Impl(org.w3c.dom.Element element)
          Creates a new GMLCoord_Impl object.
 
Method Summary
static GMLCoord createGMLCoord(org.w3c.dom.Document doc)
          factory method to create an empty GMLCoord.
 org.w3c.dom.Element getAsElement()
           
 double[] getCoord()
          returns the coordinate as double array
 int getDimension()
          retuns the dimension of the coordinate
 double getX()
          returns the x-value of the coordinate
 double getY()
          returns the y-value of the coordinate. if no y-value is defined -9E99 will be returned
 double getZ()
          returns the z-value of the coordinate. if no z-value is defined -9E99 will be returned
 void setCoord(double x)
          set the coordinate as one-dimensional point
 void setCoord(double[] coord)
          sets the coordinate value(s) using a double array. the min length of the equals 1 the max length 3
 void setCoord(double x, double y)
          set the coordinate as two-dimensional point
 void setCoord(double x, double y, double z)
          set the coordinate as three-dimensional point
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

element

private org.w3c.dom.Element element
Constructor Detail

GMLCoord_Impl

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

Parameters:
element -
Method Detail

createGMLCoord

public static GMLCoord createGMLCoord(org.w3c.dom.Document doc)
factory method to create an empty GMLCoord. The coord contains a x-tag to be a valid gml:coord. the value is set to -9E99.


getAsElement

public org.w3c.dom.Element getAsElement()
Returns:

getX

public double getX()
returns the x-value of the coordinate

Specified by:
getX in interface GMLCoord

getY

public double getY()
returns the y-value of the coordinate. if no y-value is defined -9E99 will be returned

Specified by:
getY in interface GMLCoord

getZ

public double getZ()
returns the z-value of the coordinate. if no z-value is defined -9E99 will be returned

Specified by:
getZ in interface GMLCoord

getCoord

public double[] getCoord()
returns the coordinate as double array

Specified by:
getCoord in interface GMLCoord

setCoord

public void setCoord(double[] coord)
              throws GMLException
sets the coordinate value(s) using a double array. the min length of the equals 1 the max length 3

Specified by:
setCoord in interface GMLCoord
Throws:
GMLException

setCoord

public void setCoord(double x)
set the coordinate as one-dimensional point

Specified by:
setCoord in interface GMLCoord

setCoord

public void setCoord(double x,
                     double y)
set the coordinate as two-dimensional point

Specified by:
setCoord in interface GMLCoord

setCoord

public void setCoord(double x,
                     double y,
                     double z)
set the coordinate as three-dimensional point

Specified by:
setCoord in interface GMLCoord

getDimension

public int getDimension()
retuns the dimension of the coordinate

Specified by:
getDimension in interface GMLCoord

toString

public java.lang.String toString()
Returns: