cgl.ogc.wms.gml_Impl
Class GMLCoord_Impl

java.lang.Object
  extended bycgl.ogc.wms.gml_Impl.GMLCoord_Impl
All Implemented Interfaces:
GMLCoord

public class GMLCoord_Impl
extends java.lang.Object
implements GMLCoord

Title:

Description:

Copyright: Copyright (c) 2005

Company: Indiana University - Computer Science Dept.

Version:
1.0
Author:
Ahmet Sayar

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.
 double getZ()
          returns the z-value of the coordinate.
 void setCoord(double x)
          set the coordinate as one-dimensional point
 void setCoord(double[] coord)
          sets the coordinate value(s) using a double array.
 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
 

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. * @param doc Document

Returns:
GMLCoord

getAsElement

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

getX

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

Specified by:
getX in interface GMLCoord
Returns:
double

getY

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

Specified by:
getY in interface GMLCoord
Returns:
double

getZ

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

Specified by:
getZ in interface GMLCoord
Returns:
double

getCoord

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

Specified by:
getCoord in interface GMLCoord
Returns:
double[]

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
Parameters:
coord - double[]
Throws:
GMLException

setCoord

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

Specified by:
setCoord in interface GMLCoord
Parameters:
x - double

setCoord

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

Specified by:
setCoord in interface GMLCoord
Parameters:
x - double
y - double

setCoord

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

Specified by:
setCoord in interface GMLCoord
Parameters:
x - double
y - double
z - double

getDimension

public int getDimension()
retuns the dimension of the coordinate

Specified by:
getDimension in interface GMLCoord
Returns:
int

toString

public java.lang.String toString()
Returns:
String