public class TLcdNVG20Group extends TLcdNVG20Content implements ILcdEditableShapeList, ILcdCache, ILcdInvalidateable
ILcdEditableShapeList
that represents an NVG 2.0 Group.
You can retrieve elements through getGeometry()
or the ILcdEditableShapeList
interface.
Composite contain either shapes (e.g. TLcdNVG20Circle),
text
,
symbolized content
.
The ILcdEditableShapeList
only exposes elements that implement ILcdShape.
TLcdNVG20Content.ShapeType, TLcdNVG20Content.TimeSpan
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
EXTENDED_DATA_PROPERTY
Data property that maps to the
ExtendedData element. |
static TLcdDataProperty |
EXTENSION_PROPERTY
Data property that maps to the
extension element. |
static TLcdDataProperty |
GEOMETRY_PROPERTY
Data property that maps to the choice between the
g and composite and text and point and multipoint and circle and ellipse and rect and polyline and arrow and corridor and orbit and polygon and arc and arcband and content-item elements. |
static TLcdDataProperty |
HREF_PROPERTY
Data property that maps to the
href attribute. |
static TLcdDataProperty |
LABEL_PROPERTY
Data property that maps to the
label attribute. |
static TLcdDataProperty |
METADATA_PROPERTY
Data property that maps to the
metadata element. |
static TLcdDataProperty |
STYLE_PROPERTY
Data property that maps to the
style attribute. |
static TLcdDataProperty |
TEXT_INFO_PROPERTY
Data property that maps to the
textInfo element. |
static TLcdDataProperty |
TIME_SPAN_PROPERTY
Data property that maps to the
TimeSpan element. |
static TLcdDataProperty |
TIME_STAMP_PROPERTY
Data property that maps to the
TimeStamp element. |
static TLcdDataProperty |
URI_PROPERTY
Data property that maps to the
uri attribute. |
Constructor and Description |
---|
TLcdNVG20Group() |
TLcdNVG20Group(TLcdDataType aDataType)
Constructs a new instance of TLcdNVG20Group for a given data type.
|
Modifier and Type | Method and Description |
---|---|
void |
addShape(ILcdShape aShape)
Appends the specified shape to the end of this
ILcdShapeList . |
void |
addShape(int aIndex,
ILcdShape aShape)
Inserts the specified shape at the specified position in this
ILcdShapeList . |
void |
addShapes(ILcdShape[] aShapes)
Appends the specified array of shapes to the end of this
ILcdShapeList . |
void |
clearCache()
Clears the cache.
|
void |
clearShapes()
Removes all of the shapes from this
ILcdShapeList . |
TLcdNVG20Group |
clone()
Returns a deep clone of this object.
|
TLcdNVG20Group |
clone(Map aObjectDictionary)
Returns a deep clone of this object.
|
boolean |
contains2D(double aX,
double aY)
Checks whether this
ILcdShape contains the given point in
the 2D space. |
boolean |
contains2D(ILcdPoint aILcdPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 2D space. |
boolean |
contains3D(double aX,
double aY,
double aZ)
Checks whether this
ILcdShape contains the given point in
the 3D space. |
boolean |
contains3D(ILcdPoint aILcdPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 3D space. |
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
Object |
getCachedObject(Object aKey)
Looks up and returns the cached Object corresponding to the given key.
|
TLcdNVG20ExtendedData |
getExtendedData()
Returns the value of the property that maps to the
ExtendedData element. |
TLcdNVG20Extension |
getExtension()
Returns the value of the property that maps to the
extension element. |
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
List<Object> |
getGeometry()
Returns the value of the property that maps to the choice between the
g and composite and text and point and multipoint and circle and ellipse and rect and polyline and arrow and corridor and orbit and polygon and arc and arcband and content-item elements. |
URI |
getHref()
Returns the value of the property that maps to the
href attribute. |
String |
getLabel()
Returns the value of the property that maps to the
label attribute. |
TLcdNVG20Extension |
getMetadata()
Returns the value of the property that maps to the
metadata element. |
Object |
getObject(int aIndex)
Returns the Object at the given index.
|
int |
getObjectCount()
Returns the total number of Object objects in the list.
|
ILcdNVGNode |
getParent()
Get the parent of this object.
|
ILcdShape |
getShape(int aIndex)
Returns the
ILcdShape at the given index. |
int |
getShapeCount()
Returns the number of
ILcdShape objects in the list. |
TLcdNVGStyle |
getStyle()
Returns the value of the property that maps to the
style attribute. |
String |
getTextInfo()
Returns the value of the property that maps to the
textInfo element. |
TLcdNVG20Content.TimeSpan |
getTimeSpan()
Returns the value of the property that maps to the
TimeSpan element. |
XMLGregorianCalendar |
getTimeStamp()
Returns the value of the property that maps to the
TimeStamp element. |
URI |
getUri()
Returns the value of the property that maps to the
uri attribute. |
void |
insertIntoCache(Object aKey,
Object aObject)
Inserts a cache Object corresponding to the given key Object.
|
void |
invalidateObject()
Invalidates all cached values of this object.
|
Object |
removeCachedObject(Object aKey)
Looks up and removes the cached Object corresponding to the given key.
|
boolean |
removeShape(ILcdShape aShape)
Removes the first occurrence of the specified shape in this
ILcdShapeList . |
ILcdShape |
removeShape(int aIndex)
Removes the shape at the specified position in this
ILcdShapeList . |
void |
removeShapes(ILcdShape[] aShapes)
Removes all shapes from this
ILcdShapeList that are contained in the specified
array of shapes. |
void |
setExtendedData(TLcdNVG20ExtendedData aValue)
Sets the value of the property that maps to the
ExtendedData element. |
void |
setExtension(TLcdNVG20Extension aValue)
Sets the value of the property that maps to the
extension element. |
void |
setHref(URI aValue)
Sets the value of the property that maps to the
href attribute. |
void |
setLabel(String aValue)
Sets the value of the property that maps to the
label attribute. |
void |
setMetadata(TLcdNVG20Extension aValue)
Sets the value of the property that maps to the
metadata element. |
void |
setParent(ILcdNVGNode aParent)
Set the parent of this object to the given parent.
|
ILcdShape |
setShape(int aIndex,
ILcdShape aShape)
Replaces the shape at the specified position in this
ILcdShapeList with the
specified shape. |
void |
setShapes(ILcdShape[] aShapes)
Replace the list of shapes contained in this
ILcdShapeList with the specified
array of shapes. |
void |
setStyle(TLcdNVGStyle aValue)
Sets the value of the property that maps to the
style attribute. |
void |
setTextInfo(String aValue)
Sets the value of the property that maps to the
textInfo element. |
void |
setTimeSpan(TLcdNVG20Content.TimeSpan aValue)
Sets the value of the property that maps to the
TimeSpan element. |
void |
setTimeStamp(XMLGregorianCalendar aValue)
Sets the value of the property that maps to the
TimeStamp element. |
void |
setUri(URI aValue)
Sets the value of the property that maps to the
uri attribute. |
void |
shapeChanged(ILcdShape aShape)
Notifies this
ILcdShapeList that the specified shape has changed. |
void |
shapeChanged(int aIndex)
Notifies this
ILcdShapeList that the shape at the specified position has changed. |
void |
shapesChanged()
Notifies this
ILcdShapeList that some (possibly all) of its shapes have changed. |
getShapeType
getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue, toString
public static final TLcdDataProperty GEOMETRY_PROPERTY
g
and composite
and text
and point
and multipoint
and circle
and ellipse
and rect
and polyline
and arrow
and corridor
and orbit
and polygon
and arc
and arcband
and content-item
elements.
The possible values for this property are instances of java.util.List
with elements of class
public static final TLcdDataProperty HREF_PROPERTY
href
attribute.
The possible values for this property are instances of URI
.public static final TLcdDataProperty LABEL_PROPERTY
label
attribute.
The possible values for this property are instances of String
.public static final TLcdDataProperty STYLE_PROPERTY
style
attribute.
The possible values for this property are instances of TLcdNVGStyle
.public static final TLcdDataProperty URI_PROPERTY
uri
attribute.
The possible values for this property are instances of URI
.public static final TLcdDataProperty METADATA_PROPERTY
metadata
element.
The possible values for this property are instances of TLcdNVG20Extension
.public static final TLcdDataProperty EXTENDED_DATA_PROPERTY
ExtendedData
element.
The possible values for this property are instances of TLcdNVG20ExtendedData
.public static final TLcdDataProperty TEXT_INFO_PROPERTY
textInfo
element.
The possible values for this property are instances of String
.public static final TLcdDataProperty TIME_STAMP_PROPERTY
TimeStamp
element.
The possible values for this property are instances of XMLGregorianCalendar
.public static final TLcdDataProperty TIME_SPAN_PROPERTY
TimeSpan
element.
The possible values for this property are instances of TimeSpan
.public static final TLcdDataProperty EXTENSION_PROPERTY
extension
element.
The possible values for this property are instances of TLcdNVG20Extension
.public TLcdNVG20Group()
public TLcdNVG20Group(TLcdDataType aDataType)
aDataType
- The data type for the grouppublic TLcdNVG20Group clone()
TLcdDataObject.clone(Map)
.clone
in interface ILcdCloneable
clone
in class TLcdDataObject
Object.clone()
public TLcdNVG20Group 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 void insertIntoCache(Object aKey, Object aObject)
insertIntoCache
in interface ILcdCache
aKey
- the key Object that will be used to identify the Object.
The key must therefore be a unique identifier, typically the caller
itself: insertIntoCache(this, ...)
.aObject
- the Object to be cached.public Object getCachedObject(Object aKey)
getCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public Object removeCachedObject(Object aKey)
removeCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public void clearCache()
clearCache
in interface ILcdCache
public int getShapeCount()
ILcdShape
objects in the list.getShapeCount
in interface ILcdShapeList
ILcdShape
objects in the list.public int getObjectCount()
public ILcdShape getShape(int aIndex) throws IndexOutOfBoundsException
ILcdShape
at the given index.getShape
in interface ILcdShapeList
aIndex
- a valid index in the list of ILcdShape
objects.ILcdShape
at the given index.IndexOutOfBoundsException
- when the index is not valid.public Object getObject(int aIndex) throws IndexOutOfBoundsException
aIndex
- a valid index in the list of Object objects.IndexOutOfBoundsException
- when the index is not valid.public ILcdPoint getFocusPoint()
ILcdShape
.getFocusPoint
in interface ILcdShape
ILcdShape
.public boolean contains2D(ILcdPoint aILcdPoint)
ILcdShape
contains the given ILcdPoint
in the 2D space.
Only the first two dimensions of the ILcdShape
and the ILcdPoint
are considered.contains2D
in interface ILcdShape
aILcdPoint
- the ILcdPoint
to test.ILcdShape.contains2D(double, double)
public boolean contains2D(double aX, double aY)
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.contains2D
in interface ILcdShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public boolean contains3D(ILcdPoint aILcdPoint)
ILcdShape
contains the given ILcdPoint
in the 3D space.contains3D
in interface ILcdShape
aILcdPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public boolean contains3D(double aX, double aY, double aZ)
ILcdShape
contains the given point in
the 3D space.contains3D
in interface ILcdShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.public ILcdBounds getBounds()
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public ILcdNVGNode getParent()
ILcdNVGNode
getParent
in interface ILcdNVGNode
getParent
in class TLcdNVG20Content
public void setParent(ILcdNVGNode aParent)
ILcdNVGNode
setParent
in interface ILcdNVGNode
setParent
in class TLcdNVG20Content
aParent
- The parent to be set to this object.public void invalidateObject()
ILcdInvalidateable
invalidateObject
in interface ILcdInvalidateable
public void shapesChanged()
ILcdEditableShapeList
ILcdShapeList
that some (possibly all) of its shapes have changed.shapesChanged
in interface ILcdEditableShapeList
public void shapeChanged(ILcdShape aShape)
ILcdEditableShapeList
ILcdShapeList
that the specified shape has changed.shapeChanged
in interface ILcdEditableShapeList
aShape
- the shape that has changed.public void shapeChanged(int aIndex)
ILcdEditableShapeList
ILcdShapeList
that the shape at the specified position has changed.shapeChanged
in interface ILcdEditableShapeList
aIndex
- the index of the shape that has changed.public void setShapes(ILcdShape[] aShapes)
ILcdEditableShapeList
ILcdShapeList
with the specified
array of shapes.setShapes
in interface ILcdEditableShapeList
aShapes
- the array of shapes to be stored in this ILcdShapeList
.public void removeShapes(ILcdShape[] aShapes)
ILcdEditableShapeList
ILcdShapeList
that are contained in the specified
array of shapes.removeShapes
in interface ILcdEditableShapeList
aShapes
- the array of shapes to be removed from this ILcdShapeList
.public boolean removeShape(ILcdShape aShape)
ILcdEditableShapeList
ILcdShapeList
. If this
ILcdShapeList
does not contain the shape, it is unchanged.removeShape
in interface ILcdEditableShapeList
aShape
- the shape to be removed, if present.true
if this ILcdShapeList
contained the specified element.public void clearShapes()
ILcdEditableShapeList
ILcdShapeList
.clearShapes
in interface ILcdEditableShapeList
public void addShapes(ILcdShape[] aShapes)
ILcdEditableShapeList
ILcdShapeList
.addShapes
in interface ILcdEditableShapeList
aShapes
- the array of shapes to be appended to this ILcdShapeList
.public void addShape(int aIndex, ILcdShape aShape)
ILcdEditableShapeList
ILcdShapeList
.addShape
in interface ILcdEditableShapeList
aIndex
- the index at which the shape is to be inserted.aShape
- the shape to be inserted.public ILcdShape removeShape(int aIndex)
ILcdEditableShapeList
ILcdShapeList
. Shifts any
subsequent shapes to the left. Returns the shape that was removed from this
ILcdShapeList
.removeShape
in interface ILcdEditableShapeList
aIndex
- the index of the shape to removed.public ILcdShape setShape(int aIndex, ILcdShape aShape)
ILcdEditableShapeList
ILcdShapeList
with the
specified shape.setShape
in interface ILcdEditableShapeList
aIndex
- index of shape to replace.aShape
- the shape to be stored at the specified position.public void addShape(ILcdShape aShape)
ILcdEditableShapeList
ILcdShapeList
.addShape
in interface ILcdEditableShapeList
aShape
- the shape to be appended to this ILcdShapeList
.public List<Object> getGeometry()
g
and composite
and text
and point
and multipoint
and circle
and ellipse
and rect
and polyline
and arrow
and corridor
and orbit
and polygon
and arc
and arcband
and content-item
elements.
The possible values for this property are instances of java.util.List
with elements of class
GEOMETRY_PROPERTY
property.public URI getHref()
href
attribute.
A URL to human readable content providing more information about the ContentType. Typically the NVG document will contain just a small amount of metadata required to render the content. The URL allows the user to drill-down (click through) to the full content.
HREF_PROPERTY
property.public void setHref(URI aValue)
href
attribute.
A URL to human readable content providing more information about the ContentType. Typically the NVG document will contain just a small amount of metadata required to render the content. The URL allows the user to drill-down (click through) to the full content.
aValue
- the value to set for the HREF_PROPERTY
property.public String getLabel()
label
attribute.
A short text label describing the content. Long text should be placed in the text element.
LABEL_PROPERTY
property.public void setLabel(String aValue)
label
attribute.
A short text label describing the content. Long text should be placed in the text element.
aValue
- the value to set for the LABEL_PROPERTY
property.public TLcdNVGStyle getStyle()
style
attribute.
A text string (inline CSS string) that defines how objects should be rendered graphically.
STYLE_PROPERTY
property.public void setStyle(TLcdNVGStyle aValue)
style
attribute.
A text string (inline CSS string) that defines how objects should be rendered graphically.
aValue
- the value to set for the STYLE_PROPERTY
property.public URI getUri()
uri
attribute.
The unique identifier for the content. The URI is immutable and shall remain constant across documents produced by the same source. Furthermore, the URI shall remain constant as the document is transferred through a mediation service/process.
URI_PROPERTY
property.public void setUri(URI aValue)
uri
attribute.
The unique identifier for the content. The URI is immutable and shall remain constant across documents produced by the same source. Furthermore, the URI shall remain constant as the document is transferred through a mediation service/process.
aValue
- the value to set for the URI_PROPERTY
property.public TLcdNVG20Extension getMetadata()
metadata
element.
named container for NDMS / Dublin Core defined metadata
METADATA_PROPERTY
property.public void setMetadata(TLcdNVG20Extension aValue)
metadata
element.
named container for NDMS / Dublin Core defined metadata
aValue
- the value to set for the METADATA_PROPERTY
property.public TLcdNVG20ExtendedData getExtendedData()
ExtendedData
element.EXTENDED_DATA_PROPERTY
property.public void setExtendedData(TLcdNVG20ExtendedData aValue)
ExtendedData
element.aValue
- the value to set for the EXTENDED_DATA_PROPERTY
property.public String getTextInfo()
textInfo
element.
Additional human readable text in addition to @label. Long text content should be placed here.
TEXT_INFO_PROPERTY
property.public void setTextInfo(String aValue)
textInfo
element.
Additional human readable text in addition to @label. Long text content should be placed here.
aValue
- the value to set for the TEXT_INFO_PROPERTY
property.public XMLGregorianCalendar getTimeStamp()
TimeStamp
element.
comparable point in time (DTG) to represent the last state change of this element
TIME_STAMP_PROPERTY
property.public void setTimeStamp(XMLGregorianCalendar aValue)
TimeStamp
element.
comparable point in time (DTG) to represent the last state change of this element
aValue
- the value to set for the TIME_STAMP_PROPERTY
property.public TLcdNVG20Content.TimeSpan getTimeSpan()
TimeSpan
element.
Define a show/hide period (based on strict DTG) for the shape as defined by KML on https://developers.google.com/kml/documentation/kmlreference#timespan
TIME_SPAN_PROPERTY
property.public void setTimeSpan(TLcdNVG20Content.TimeSpan aValue)
TimeSpan
element.
Define a show/hide period (based on strict DTG) for the shape as defined by KML on https://developers.google.com/kml/documentation/kmlreference#timespan
aValue
- the value to set for the TIME_SPAN_PROPERTY
property.public TLcdNVG20Extension getExtension()
extension
element.
Extension point for structured community of interest specific content.
EXTENSION_PROPERTY
property.public void setExtension(TLcdNVG20Extension aValue)
extension
element.
Extension point for structured community of interest specific content.
aValue
- the value to set for the EXTENSION_PROPERTY
property.