Package com.luciad.symbology.app6a.model
Class TLcdAPP6ANode
java.lang.Object
com.luciad.symbology.app6a.model.TLcdAPP6ANode
Tree structured representation of the symbol hierarchy for a given APP-6 standard.
This allows enumerating all possible symbols of the standard.
Use
getRoot(com.luciad.symbology.app6a.model.ELcdAPP6Standard)
to access the root, and getChildren()
to list its children.
A hierarchy code can be retrieved
from and applied
to
any ILcdAPP6ACoded
instance, unless it does not have a visual representation
.- Since:
- 2013.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyOn
(ILcdEditableAPP6ACoded aObject) Adapts the given object so that it belongs to the given hierarchy node.void
applyTemplateShape
(ILcdModelReference aReference, double aX, double aY, double aSize, ILcd2DEditablePointList aListSFCT) Applies a suitable shape for this symbology node, at the given location and of the provided size.boolean
static TLcdAPP6ANode
get
(String aSIDC, ELcdAPP6Standard aStandard) Returns the hierarchy node for the given SIDC and standard.Returns a list of the node's children.Returns a code identifier that corresponds to this node.
Even if the node maps to a symbol with a visual representation, the identifier may or may not be directly usable as an APP-6 symbol code (SIDC).getName()
Returns a human readable name for this symbol or folder.Returns the parent of this tree node.static TLcdAPP6ANode
getRoot
(ELcdAPP6Standard aStandard) Returns a node with a hierarchic structure of all symbols of the given standard.Returns the symbology standard of this tree.int
hashCode()
boolean
Returns true if the node does not represent a symbol, but rather a folder of symbols.toString()
-
Method Details
-
getRoot
Returns a node with a hierarchic structure of all symbols of the given standard.- Parameters:
aStandard
- the symbology standard- Returns:
- a node containing with symbols for the domains of the given standard
-
get
Returns the hierarchy node for the given SIDC and standard.- Parameters:
aSIDC
- the SIDCaStandard
- the standard- Returns:
- the hierarchy node for the given object, or null if the object is not part of the given standard
-
applyOn
Adapts the given object so that it belongs to the given hierarchy node. This leaves other symbol modifier values untouched, unless they become invalid.- Parameters:
aObject
- the symbol to adapt
-
applyTemplateShape
public void applyTemplateShape(ILcdModelReference aReference, double aX, double aY, double aSize, ILcd2DEditablePointList aListSFCT) Applies a suitable shape for this symbology node, at the given location and of the provided size. This method can be used to create a template object (for example used in association with the create controller) or as a convenience for programmatically creating shapes. The template geometry coordinates are derived from the symbol, not the geometry type of the given pointlist. For example: if the symbol represents a polygon, the template geometry will reflect this.
Example:
TLcdGeodeticReference reference = ...; String code = "GUTPR---------X"; TLcdAPP6ANode node = TLcdAPP6ANode.get(code, ELcdAPP6Standard.APP_6A); TLcdEditableAPP6AObject symbol = new TLcdEditableAPP6AObject(); node.applyOn(symbol); // set up the geometry at (0,0) with an approximate size of 2 degrees node.applyTemplateShape(reference, 0, 0, 2, symbol);
- Parameters:
aReference
- the coordinate reference of the shapeaX
- x coordinate where the template will be createdaY
- y coordinate where the template will be createdaSize
- the approximate size of the final template. This is applied to the coordinates in the shape's reference system. In other words, if the size is 1, the width and height of the geometry will be around 1 model unit (e.g. degree, meter), depending on the shape.aListSFCT
- A shape that can represent a military symbol.- Throws:
IllegalArgumentException
- If this node does not have a code (i.e. the node sits high in the hierarchy, grouping several nodes).
-
getStandard
Returns the symbology standard of this tree.- Returns:
- the symbology standard of this tree.
-
getCodeMask
Returns a code identifier that corresponds to this node.
Even if the node maps to a symbol with a visual representation, the identifier may or may not be directly usable as an APP-6 symbol code (SIDC). It could, for example, contain masking characters (hence the term "code mask").
For this reason, the identifier should not be applied directly on anILcdEditableAPP6ACoded
object, but rather using theapplyOn
method.- Returns:
- the symbol code (SIDC) mask
- See Also:
-
isFolderOnly
public boolean isFolderOnly()Returns true if the node does not represent a symbol, but rather a folder of symbols.- Returns:
- true if the node does not represent a symbol
-
getChildren
Returns a list of the node's children.- Returns:
- a list of the node's children.
-
getParent
Returns the parent of this tree node. This can benull
if this tree node is the root node.- Returns:
- the parent of this tree node. Can be
null
.
-
getName
Returns a human readable name for this symbol or folder.- Returns:
- a human readable name for this symbol or folder.
-
toString
-
equals
-
hashCode
public int hashCode()
-