public class TLcdGML2Coordinates extends TLcdFeaturedDataObject implements ILcd3DEditablePointList
Note that the implementation of the ILcd3DEditablePointList
interface in this
class has been made deprecated. This is because a coordinates object does not have enough information
to correctly implement it. In particular, the coordinates object does not know if the coordinate
values should be interpreted as lon-lat or lat-lon coordinates. In a larger context, this is
not an issue because coordinates are always encapsulated by other geometries (such as
for instance a line string) that do know how to interpret the coordinate values.
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
CS_PROPERTY
Data property that maps to the
cs attribute. |
static TLcdDataProperty |
DECIMAL_PROPERTY
Data property that maps to the
decimal attribute. |
static TLcdDataProperty |
TS_PROPERTY
Data property that maps to the
ts attribute. |
static TLcdDataProperty |
VALUE_PROPERTY
Data property that maps to the value defined by the simple content.
|
Constructor and Description |
---|
TLcdGML2Coordinates() |
TLcdGML2Coordinates(TLcdDataType aType) |
Modifier and Type | Method and Description |
---|---|
TLcdGML2Coordinates |
clone()
Returns a deep clone of this object.
|
TLcdDataObject |
clone(Map aObjectDictionary)
Returns a deep clone of this object.
|
String |
getCs()
Returns the value of the property that maps to the
cs attribute. |
String |
getDecimal()
Returns the value of the property that maps to the
decimal attribute. |
ILcdPoint |
getPoint(int aIndex)
Deprecated.
|
int |
getPointCount()
Returns the number of
ILcdPoint objects in the list. |
String |
getTs()
Returns the value of the property that maps to the
ts attribute. |
String |
getValue() |
Object |
getValue(TLcdDataProperty aProperty)
Returns the value of the given property.
|
String |
getValueObject()
Returns the value of the property that maps to the value defined by the simple content.
|
double[] |
getValues()
Returns the coordinate values.
|
boolean |
hasValue(TLcdDataProperty aProperty)
Indicates whether this data object has a value for the given property.
|
void |
insert2DPoint(int aIndex,
double aX,
double aY)
Deprecated.
|
void |
insert3DPoint(int aIndex,
double aX,
double aY,
double aZ)
Deprecated.
|
void |
move2DPoint(int aIndex,
double aX,
double aY)
Deprecated.
|
void |
move3DPoint(int aIndex,
double aX,
double aY,
double aZ)
Deprecated.
|
void |
removePointAt(int aIndex)
Removes the point at the given index from this
ILcd3DEditablePointList . |
void |
setCs(String aValue)
Sets the value of the property that maps to the
cs attribute. |
void |
setDecimal(String aValue)
Sets the value of the property that maps to the
decimal attribute. |
void |
setTs(String aValue)
Sets the value of the property that maps to the
ts attribute. |
void |
setValue(String aValue) |
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
void |
setValueObject(String aValue)
Sets the value of the property that maps to the value defined by the simple content.
|
String |
toString() |
void |
translate2D(double aDeltaX,
double aDeltaY)
Deprecated.
|
void |
translate2DPoint(int aIndex,
double aDeltaX,
double aDeltaY)
Deprecated.
|
void |
translate3D(double aDeltaX,
double aDeltaY,
double aDeltaZ)
Deprecated.
|
void |
translate3DPoint(int aIndex,
double aDeltaX,
double aDeltaY,
double aDeltaZ)
Deprecated.
|
canSetFeature, getFeature, getFeature, getFeatureCount, getFeaturedDescriptor, setFeature, setFeature
getDataType, getValue, hasValue, setValue
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
append2DPoint
getPointSFCT, getX, getY, getZ
public static final TLcdDataProperty VALUE_PROPERTY
String
.public static final TLcdDataProperty CS_PROPERTY
cs
attribute.
The possible values for this property are instances of String
.public static final TLcdDataProperty DECIMAL_PROPERTY
decimal
attribute.
The possible values for this property are instances of String
.public static final TLcdDataProperty TS_PROPERTY
ts
attribute.
The possible values for this property are instances of String
.public TLcdGML2Coordinates()
public TLcdGML2Coordinates(TLcdDataType aType)
public String getValue()
public void setValue(String aValue)
@Deprecated public void translate3D(double aDeltaX, double aDeltaY, double aDeltaZ)
ILcd3DEditablePointList
ILcd3DEditablePointList
from their current positions
over the given translation vector in the 3D space.translate3D
in interface ILcd3DEditablePointList
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.aDeltaZ
- the z coordinate of the translation vector.@Deprecated public void move3DPoint(int aIndex, double aX, double aY, double aZ)
ILcd3DEditablePointList
ILcd3DEditablePointList
to the given point in the 3D space.move3DPoint
in interface ILcd3DEditablePointList
aIndex
- a valid index in the list of points.aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.@Deprecated public void translate3DPoint(int aIndex, double aDeltaX, double aDeltaY, double aDeltaZ)
ILcd3DEditablePointList
ILcd3DEditablePointList
from its current position
over the given translation vector in the 3D space.translate3DPoint
in interface ILcd3DEditablePointList
aIndex
- a valid new index in the list of points.aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.aDeltaZ
- the z coordinate of the translation vector.@Deprecated public void insert3DPoint(int aIndex, double aX, double aY, double aZ)
ILcd3DEditablePointList
ILcd3DEditablePointList
.insert3DPoint
in interface ILcd3DEditablePointList
aIndex
- a valid new index in the list of points.aX
- the x coordinate of the new point.aY
- the y coordinate of the new point.aZ
- the z coordinate of the new point.public void removePointAt(int aIndex)
ILcd3DEditablePointList
ILcd3DEditablePointList
.removePointAt
in interface ILcd2DEditablePointList
removePointAt
in interface ILcd3DEditablePointList
aIndex
- a valid index in the list of ILcdPoint
objects.@Deprecated public void translate2D(double aDeltaX, double aDeltaY)
ILcd2DEditablePointList
ILcd2DEditablePointList
from their current positions
over the given translation vector in the 2D space. Only the first two
dimensions of the points are considered. The third dimension is left unchanged.translate2D
in interface ILcd2DEditablePointList
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.@Deprecated public void move2DPoint(int aIndex, double aX, double aY)
ILcd2DEditablePointList
ILcd2DEditablePointList
to the given point in the 2D space. Only the first
two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.move2DPoint
in interface ILcd2DEditablePointList
aIndex
- a valid index in the list of points.aX
- the x coordinate of the point.aY
- the y coordinate of the point.@Deprecated public void translate2DPoint(int aIndex, double aDeltaX, double aDeltaY)
ILcd2DEditablePointList
ILcd2DEditablePointList
from its current position
over the given translation vector in the 2D space. Only the first two
dimensions of the points are considered. The third dimension is left unchanged.translate2DPoint
in interface ILcd2DEditablePointList
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.@Deprecated public void insert2DPoint(int aIndex, double aX, double aY)
ILcd2DEditablePointList
ILcd2DEditablePointList
.insert2DPoint
in interface ILcd2DEditablePointList
aIndex
- a valid new index in the list of points.aX
- the x coordinate of the new point.aY
- the y coordinate of the new point.public int getPointCount()
ILcdPointList
ILcdPoint
objects in the list.getPointCount
in interface ILcdPointList
ILcdPoint
objects in the list.@Deprecated public ILcdPoint getPoint(int aIndex) throws IndexOutOfBoundsException
ILcdPointList
ILcdPoint
at a given index.getPoint
in interface ILcdPointList
aIndex
- a valid index in the list of ILcdPoint
objects.ILcdPoint
at the given index.IndexOutOfBoundsException
- if the given index is out of bounds.public Object getValue(TLcdDataProperty aProperty)
ILcdDataObject
Returns the value of the given property.
If the property is a collection, the returned value will never be null. If the property has not been set, an empty collection of the appropriate type will be returned (Set, List or Map).
The property must not be null, and must be declared in the data object's type
or in one of its super types.
Otherwise an IllegalArgumentException
is thrown.
getValue
in interface ILcdDataObject
getValue
in class TLcdDataObject
aProperty
- the property for which the value is to be returnedpublic boolean hasValue(TLcdDataProperty aProperty)
ILcdDataObject
aProperty
is from the right data type
, and this instance has a value for it: returns true
aProperty
is from the right data type
, and this instance has no value for it: returns false
aProperty
is not from the right data type
: not allowed, you will get IllegalArgumentExceptionaProperty
is null
: not allowed, you will get NullPointerExceptionhasValue
in interface ILcdDataObject
hasValue
in class TLcdDataObject
aProperty
- the property for which to return whether a value is present or not.true
if this data object has a value for the given property, false
otherwise.public void setValue(TLcdDataProperty aProperty, Object aValue)
ILcdDataObject
Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.
The given property must be declared in thedata object's type
or in one of its super types. In
other words, getDataType().getProperties().contains( aProperty ) should always be true.
Otherwise, the implementation should throw an IllegalArgumentException
.setValue
in interface ILcdDataObject
setValue
in class TLcdDataObject
aProperty
- the property for which the value is to be setaValue
- the value to setTLcdDataType.getProperty(String)
public String toString()
toString
in class TLcdDataObject
public TLcdGML2Coordinates clone()
TLcdDataObject
TLcdDataObject.clone(Map)
.clone
in interface ILcdCloneable
clone
in class TLcdDataObject
Object.clone()
public TLcdDataObject clone(Map aObjectDictionary)
TLcdDataObject
ILcdDataObject
, the value is cloned by first creating a new instance via
the value.getDataType().newInstance()
method, and then cloning its properties one by one.ILcdDeepCloneable
or
ILcdCloneable
then this interface is used to clone the value.clone
in interface ILcdDeepCloneable
clone
in class TLcdDataObject
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made,
and their corresponding clone Object.public double[] getValues()
ALcdGML2Coordinates.VALUE_PROPERTY
.getValue()
public String getValueObject()
VALUE_PROPERTY
property.public void setValueObject(String aValue)
aValue
- the value to set for the VALUE_PROPERTY
property.public String getCs()
cs
attribute.CS_PROPERTY
property.public void setCs(String aValue)
cs
attribute.aValue
- the value to set for the CS_PROPERTY
property.public String getDecimal()
decimal
attribute.DECIMAL_PROPERTY
property.public void setDecimal(String aValue)
decimal
attribute.aValue
- the value to set for the DECIMAL_PROPERTY
property.public String getTs()
ts
attribute.TS_PROPERTY
property.public void setTs(String aValue)
ts
attribute.aValue
- the value to set for the TS_PROPERTY
property.