Class TLcdEditableAPP6AObject
- All Implemented Interfaces:
ILcdDataObject
,ILcdBounded
,ILcdCurve
,ILcdPointList
,ILcdPointList2
,ILcdPolyline
,ILcdPolypoint
,ILcdShape
,ILcd2DEditablePointList
,ILcd2DEditablePolyline
,ILcd2DEditablePolypoint
,ILcd2DEditableShape
,ILcdAPP6ACoded
,ILcdAPP6AShape
,ILcdEditableAPP6ACoded
,ILcdEditableAPP6AShape
,ILcdCache
,ILcdCloneable
,ILcdFeatured
,ILcdInvalidateable
,ILcdOrientationSettable
,ILcdOriented
,Serializable
,Cloneable
getAPP6ACode()
; the used symbology standard can be retrieved through
getAPP6Standard()
.
Symbology
The used standard can be supplied at construction time by passing anELcdAPP6AStandard
instance.
Note that although this class (including its documentation) and many other classes / methods have an
explicit reference to APP-6A, it can be equally used for all symbology standards defined
in ELcdAPP6AStandard
.
If the symbology standard is not explicitly supplied at construction time,
the used standard is defined by the boolean System property
com.luciad.symbology.app6a.app6b
. If false, APP-6A is used; otherwise, APP-6B
is used.
Symbol code and modifiers
The symbol code can be supplied at construction time, orchanged
afterward.
Convenience methods are available to enumerate
,
retrieve
, and
change
parts of the symbol code.
This class also adds some convenience getters and setters for some common modifiers, such as the
status
.
Refer to
TLcdAPP6ANode
and TLcdAPP6AEchelonNode
for more information on the symbol hierarchy
and echelons, and to ILcdAPP6ACoded
for the superset of possible SIDC modifier names.
Text modifiers
Next to its geometry representation and symbol code, a symbol can have other textual properties such asUniqueDesignation
or AdditionalInformation
.
These modifiers can be enumerated
,
retrieved
and changed
as well.
Also, through the interface ILcdDataObject
, this class provides
generic access to all its properties. The available properties can be found in the object's data
type, accessible through the method getDataType()
. A specific property can be retrieved
through the method getValue(com.luciad.datamodel.TLcdDataProperty)
. See also
ILcdAPP6ACoded
for the superset of possible text modifier names.
Important note:
the APP-6A specification contains two symbols with the same symbol ID code, namely the Reference
Point symbol (2.X.2.5.1.2) and the Route symbol (2.X.2.5.1.8). Both symbols have as ID code
G*C*OXRD--****X
, while these codes should be unique. To solve this problem,
LuciadLightspeed uses the MIL-STD 2525b equivalent code for symbol 2.X.2.5.1.8, namely
G*C*OXOD--*****
; Following the advised approach described in the APP-6A
specification, LuciadLightspeed uses the MIL-STD 2525b equivalent code for the 'Route' symbol
(2.X.2.5.1.8), which is G*C*OXOD--*****.
Geometry
This class extends fromTLcdLonLatPolyline
, which is used to define the
geometry of the symbol. The (minimal) number of points in the polyline depends on the
symbol code. This number can be queried through the method
getPointList()
, which returns an instance of the type
ILcdRestrictedLengthPointList
. This interface provides a method
getMinPointCount()
, which returns the minimal number of points needed to have a
valid symbol.
To quickly check whether this symbol is a point symbol or a line/polyline/polygon
(two points or more), one can use the method isLine()
.
Some symbols defined in the APP-6A specification are represented by a line with a width.
This width can be retrieved or set through the methods getWidth()
and
setWidth(double)
. A common example of such symbols are the arrow
symbols, which use the width property to define the distance between the axis of the arrow
and the edge of the bounding box around the arrow. Note that this property is not taken into account for points,
lines and general areas.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Encapsulates the type and constraints of a modifier, regardless of its origin (i.e. encoded in the symbol code (SIDC) or as a separate value).static enum
Describes the constraints of a modifier value. -
Field Summary
Fields inherited from class com.luciad.shape.shape2D.ALcd2DEditablePolypoint
fBounds, fFocusPoint
Fields inherited from interface com.luciad.symbology.app6a.model.ILcdAPP6ACoded
sAdditionalInformation, sAffiliation, sAltitudeDepth, sAttitude, sCapacity, sCombatEffectiveness, sCommonIdentifier, sCountry, sDateTimeGroup, sEchelon, sEffectiveTime, sEngagementBar, sEvaluationRating, sFrameShapeModifier, sGuardedUnit, sHeadquartersElement, sHigherFormation, sHostile, sHqTaskForceDummy, sIFFSIF, sInstallationComposition, sLeadership, sLength, sLocationLabel, sMobility, sMovementDirection, sName, sOrderOfBattle, sPlatformType, sPositionAndMovement, sQuantityOfEquipment, sReinforcedOrReduced, sSector1, sSector2, sSignatureEquipment, sSpecialDesignator, sSpecialHeadquarters, sSpeedLabel, sStaffComments, sStandardIdentity1, sStandardIdentity2, sStatus, sTargetDesignator, sTargetNumberExtension, sTeardownTime, sTrackNumber, sTypeOfEquipment, sUniqueDesignation, sWidth
Fields inherited from interface com.luciad.shape.ILcdCurve
INTERPOLATION_CIRCLE_BY_3POINTS, INTERPOLATION_CIRCLE_BY_CENTERPOINT, INTERPOLATION_CIRCULARARC_BY_3POINTS, INTERPOLATION_CIRCULARARC_BY_BULGE, INTERPOLATION_CIRCULARARC_BY_CENTERPOINT, INTERPOLATION_ELLIPTICAL, INTERPOLATION_GEODESIC, INTERPOLATION_LINEAR, INTERPOLATION_MIXED, INTERPOLATION_RHUMB
-
Constructor Summary
ConstructorDescriptionCreates a new APP-6 (A or B) object using the default symbol code.TLcdEditableAPP6AObject
(double aLon, double aLat) Creates a new APP-6 (A or B) object with the default code.TLcdEditableAPP6AObject
(double aLon, double aLat, double aHeight) Creates a new APP-6 (A or B) object with the default code.TLcdEditableAPP6AObject
(ILcdPoint aPoint) Creates a new APP-6 (A or B) object with the default code.TLcdEditableAPP6AObject
(ELcdAPP6Standard aStandard) Creates a new APP-6 object for the given symbology version.TLcdEditableAPP6AObject
(ILcdAPP6ACoded aAPP6ACoded) Creates a new APP-6 (A or B) object given anILcdAPP6ACoded
object.TLcdEditableAPP6AObject
(String aAPP6ACode) Creates a new APP-6 (A or B) object with the given symbol code.TLcdEditableAPP6AObject
(String aAPP6ACode, ILcdPoint[] aPoints) Creates a new APP-6 (A or B) object with the given code.TLcdEditableAPP6AObject
(String aAPP6Code, ELcdAPP6Standard aStandard) Creates a new APP-6 object with the given code and version. -
Method Summary
Modifier and TypeMethodDescriptionboolean
The point order of arrows and lines can be reversed by callingreversePointOrder()
.boolean
canSetFeature
(int aIndex) Features are set through the methodsetAPP6ACode(java.lang.String)
.clone()
Creates and returns a copy of this object.boolean
Returns whether the given object is equal to this object.Returns the current affiliation of this symbol, or "Undefined" if the affiliation is not defined for this type of symbol.Returns the symbol code of the object (SIDC).Returns the symbology standard used by this object.Returns the current country for this object, or "Undefined" if this object has no country information.Returns the type of this data object.static String
Deprecated.static String
getDefaultAPP6Code
(ELcdAPP6Standard aAPP6Standard) Returns the default APP-6 code for the given standard that is used by the constructor when no code is given.Retrieves the configured echelon valuegetFeature
(int aIndex) Returns the feature of this object for the given index.int
Returns the number of features: 5.Returns a user-friendly representation of the symbol code of the object (SIDC).Returns the type of this symbol in the symbol hierarchy (e.g. air track, road block, ...Returns the current order of battle of this symbol, or "Undefined" if no order of battle is assigned.double
Returns the direction of movement for this object.Returns the point list this shape is based on.Returns the possible order of affiliation values for this symbol (e.g. Unknown, Hostile, Neutral, ...) If the "Unknown" value is allowed, it is the first value in the list.Returns the possible countries this object can be assigned to.Returns a collection of the possible modifiers of this symbol, i.e. all SIDC and text modifiersReturns the possible order of battle values for this symbol (e.g. Air OB, Ground OB, ...).Returns a collection of the possible SIDC modifiers of this symbol, e.g. the affiliation, status, and so on.Returns the possible status values for this symbol (for example, present or anticipated).Returns a collection of the possible text modifiers of this symbol, i.e. modifiers that are not encoded in the symbol code.Returns the current status value of this symbol, or "Undefined" if no status is assigned.getTextModifier
(String aModifier) Returns a description of the modifier with the given name.int
For objects of the APP-6A and APP-6B standards, returns the union of all text modifiers for that standard.getTextModifierKey
(int aIndex) Returns the text modifier key at the given index.getTextModifierKeyDisplayName
(String aModifierKey) Returns the display name of the modifier with the given key.getTextModifierValue
(int aIndex) Returns the value of the text modifier at the given index.Returns the object's value for the given text modifier.getTextModifierValue
(String aModifierKey) Returns the value of the modifier with the given key.getValue
(TLcdDataProperty aProperty) Returns the value of the given property.Convenience method that returns the value of the property with the given name.double
getWidth()
Returns the buffer width.int
hashCode()
Returns the same hash code for the given object as returned by the default method Object#hashCode().boolean
hasValue
(TLcdDataProperty aProperty) Indicates whether this data object has a value for the given property.boolean
Indicates whether this data object has a value for the given property.boolean
isLine()
Returns whether this object is represented as a line or not.void
putTextModifier
(TLcdEditableAPP6AObject.TextModifier aModifier, String aValue) Sets the given value for the given modifier.void
putTextModifier
(String aModifierKey, String aModifierValue) Adds the given value of the modifier with the given key.void
Reverses the order of the points of the symbol if the geometry is suitable for this operation.void
set2DEditablePointList
(ILcd2DEditablePointList a2DEditablePointList) Sets the point list for this shape.void
setAffiliationValue
(String aValue) Sets the current affiliation of this symbol.void
setAPP6ACode
(String aAPP6ACode) Sets the APP-6 code on this object.void
setCountry
(String aValue) Sets the current country for this object, or "Undefined" if no country is assigned.static void
setDefaultAPP6ACode
(String aDefaultAPP6Code) Deprecated.usesetDefaultAPP6Code(String, ELcdAPP6Standard)
instead.static void
setDefaultAPP6Code
(String aDefaultAPP6Code, ELcdAPP6Standard aAPP6Standard) Sets the default APP-6 code to use when no code is given on construction.void
setEchelon
(TLcdAPP6AEchelonNode aValue) Sets the echelon value for this symbolvoid
setFeature
(int aIndex, Object aFeature) Features cannot be set on this object through this method.void
setHierarchyType
(TLcdAPP6ANode aType) Sets the type of this symbol in the symbol hierarchy It leaves other symbol modifier values untouched, unless they become invalid.void
setOrderOfBattleValue
(String aValue) Sets the current order of battle value of this symbol, or "Undefined" if no order of battle is assigned.void
setOrientation
(double aOrientation) Sets the direction of movement.void
setStatusValue
(String aValue) Sets the current status value of this symbol, or "Undefined if no status is assigned.void
setValue
(TLcdDataProperty aProperty, Object aValue) Sets the value of the given property for this data object.void
Convenience method that sets the value of the property with the given name.void
setWidth
(double width) Sets the buffer width.toString()
Prints out the name and affiliation.Methods inherited from class com.luciad.shape.shape2D.TLcdLonLatPolyline
calculateBounds, computePointSFCT, contains2D, contains2D, getEllipsoid, getEndPoint, getEndTangent2D, getInterpolation, getLength2D, getLineSegmentIntersectionCount, getStartPoint, getStartTangent2D, getTangent2D, invalidateBounds, setEllipsoid
Methods inherited from class com.luciad.shape.shape2D.TLcdLonLatPolypoint
calculateFocusPoint
Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditablePolypoint
clearCache, get2DEditablePointList, getBounds, getCachedObject, getFocusPoint, getPoint, getPointCount, getPointSFCT, getX, getY, getZ, insert2DPoint, insertIntoCache, invalidateObject, move2D, move2DPoint, removeCachedObject, removePointAt, setFocusPoint, translate2D, translate2DPoint
Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditableShape
contains3D, move2D
Methods inherited from class com.luciad.shape.ALcdShape
contains3D, fromDomainObject
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.shape.shape2D.ILcd2DEditablePointList
append2DPoint, insert2DPoint, move2DPoint, removePointAt, translate2D, translate2DPoint
Methods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableShape
move2D, move2D, translate2D
Methods inherited from interface com.luciad.shape.ILcdBounded
getBounds
Methods inherited from interface com.luciad.util.ILcdCache
clearCache, getCachedObject, insertIntoCache, removeCachedObject
Methods inherited from interface com.luciad.shape.ILcdPointList
getPoint, getPointCount, getPointSFCT, getX, getY, getZ
Methods inherited from interface com.luciad.shape.ILcdShape
contains3D, contains3D, getFocusPoint
-
Constructor Details
-
TLcdEditableAPP6AObject
public TLcdEditableAPP6AObject()Creates a new APP-6 (A or B) object using the default symbol code. The object's geometry will contain as many points as needed for the symbol code.- See Also:
-
TLcdEditableAPP6AObject
Creates a new APP-6 object for the given symbology version. The resulting APP-6 object will use the default symbol code for the given symbology version. The object's geometry will contain as many points as needed for the symbol code.- Parameters:
aStandard
- an APP-6 version- See Also:
-
TLcdEditableAPP6AObject
Creates a new APP-6 (A or B) object with the given symbol code. The object's geometry will contain as many points as needed.- Parameters:
aAPP6ACode
- a 15 character code describing the military functionality of the shape.- Throws:
IllegalArgumentException
- when the code passed isnull
or is not part of the default APP-6 standard
-
TLcdEditableAPP6AObject
Creates a new APP-6 object with the given code and version. The object's geometry will contain as many points as needed.- Parameters:
aAPP6Code
- a 15, 20, or 30 character code (depending on the used standard) describing the military functionality of the shape.aStandard
- an APP-6 version- Throws:
IllegalArgumentException
- when the code passed isnull
or is not part of the given APP-6 standard
-
TLcdEditableAPP6AObject
public TLcdEditableAPP6AObject(double aLon, double aLat) Creates a new APP-6 (A or B) object with the default code. The first point is placed at the given coordinates. If more points are required by the default code, they will be added to the point list this shape is based on.- Parameters:
aLon
- the longitude of the first point of the object.aLat
- the latitude of the first point of the object.- See Also:
-
TLcdEditableAPP6AObject
Creates a new APP-6 (A or B) object with the default code. The first point is placed at the location of the given point. If more points are required by the default code, they will be added to the point list this shape is based on.- Parameters:
aPoint
- the location of the first point representing the object with the default code.- See Also:
-
TLcdEditableAPP6AObject
public TLcdEditableAPP6AObject(double aLon, double aLat, double aHeight) Creates a new APP-6 (A or B) object with the default code. The first point is placed at the given coordinates. If more points are required by the default code, they will be added to the point list this shape is based on.- Parameters:
aLon
- the longitude of the first point of the object.aLat
- the latitude of the first point of the object.aHeight
- the height of the first point of the object.- See Also:
-
TLcdEditableAPP6AObject
Creates a new APP-6 (A or B) object given anILcdAPP6ACoded
object. Both the code and the text modifiers are copied fromILcdAPP6ACoded
.- Parameters:
aAPP6ACoded
- an APP-6A object.
-
TLcdEditableAPP6AObject
Creates a new APP-6 (A or B) object with the given code. Depending on the representation of the symbol with given code, points are added to the point list or not all points of the point list are used.- Parameters:
aAPP6ACode
- a 15 character code (depending on the used standard) describing the military functionality of the shape. If the code isnull
, it will be replaced by the default code.aPoints
- the points whose coordinates are used to locate the point list. Only as many points as needed will be used.
-
-
Method Details
-
getDefaultAPP6ACode
Deprecated.usegetDefaultAPP6Code(ELcdAPP6Standard)
insteadReturns the default 15 character APP-6 code that is used by the constructor when no code is given.- Returns:
- the default 15 character APP-6 code to use on construction when no code is given.
-
setDefaultAPP6ACode
Deprecated.usesetDefaultAPP6Code(String, ELcdAPP6Standard)
instead.Sets the default APP-6 code to use when no code is given on construction.Note that this code is not specifically tied to one of the specific APP-6 standards defined in
ELcdAPP6Standard
. The supplied code will be accepted if it is valid according to at least one of these standards. It is thus up to the user to make sure that, if he/she relies on the default code, instances of this class are created according to a compatible symbology standard.By default, the code "SUZP-----------" is used, which is defined in all supported APP-6 symbology standards.
- Parameters:
aDefaultAPP6Code
- the default APP-6 code to use when no code is given on construction.- Throws:
IllegalArgumentException
- when the code passed is null or isn't a valid APP-6 code.
-
canReversePointOrder
public boolean canReversePointOrder()The point order of arrows and lines can be reversed by callingreversePointOrder()
. For the other symbols (single point, T shaped, polygon etc.), the point order is always the same. This method ensures if a call toreversePointOrder()
is going to have an effect on the symbol or not.- Returns:
- true if
reversePointOrder()
can reverse the order of the points of this symbol, false otherwise. - See Also:
-
reversePointOrder
public void reversePointOrder()Reverses the order of the points of the symbol if the geometry is suitable for this operation.For example arrow shaped symbols point to the reverse direction after invoking this method. A symbol should always be checked with
canReversePointOrder()
before invoking this method. IfcanReversePointOrder()
returnsfalse
, this method throws anIllegalStateException
Note: Each subsequent call to this method reverses the order of the points again.
- Throws:
IllegalStateException
- ifcanReversePointOrder()
returns false for this object
-
setDefaultAPP6Code
Sets the default APP-6 code to use when no code is given on construction.Note that this code is tied to one of the specific APP-6 standards defined in
ELcdAPP6Standard
.- Parameters:
aDefaultAPP6Code
- the default code to useaAPP6Standard
- the standard for which the default code is used
-
getDefaultAPP6Code
Returns the default APP-6 code for the given standard that is used by the constructor when no code is given.- Parameters:
aAPP6Standard
- the standard- Returns:
- the default APP-6 code for the given standard
-
getFeatureCount
public int getFeatureCount()Returns the number of features: 5.- Specified by:
getFeatureCount
in interfaceILcdFeatured
- Returns:
- 5, always.
-
getFeature
Returns the feature of this object for the given index. Depending on the index the following objects are returned:0 Do not use this index. 1 the affiliation modifier associated to the affiliation of this object. 2 the status modifier associated to the status of this object. 3 the country modifier associated to the country code of this object. 4 the OB, order of battle, modifier associated to the OB of this object. - Specified by:
getFeature
in interfaceILcdFeatured
- Parameters:
aIndex
- the index of the feature.- Returns:
- the feature for the given index
- Throws:
IndexOutOfBoundsException
- when the index exceeds the number of features. SeegetFeatureCount()
.- See Also:
-
setFeature
Features cannot be set on this object through this method. Features are set through #setAPP6ACode}. This implementation is empty.- Specified by:
setFeature
in interfaceILcdFeatured
- Parameters:
aIndex
- not of importance.aFeature
- not of importance.- Throws:
IllegalArgumentException
- This exception is never thrown, the implementation is empty.- See Also:
-
canSetFeature
public boolean canSetFeature(int aIndex) Features are set through the methodsetAPP6ACode(java.lang.String)
. This method will always return false.- Specified by:
canSetFeature
in interfaceILcdFeatured
- Parameters:
aIndex
- not of importance.- Returns:
- false, always.
-
getPointList
Returns the point list this shape is based on. The returned object implements alsoILcdEditableRestrictedLengthPointList
andILcd2DEditablePointList
.- Specified by:
getPointList
in interfaceILcdAPP6AShape
- Returns:
- the point list this shape is based on.
-
set2DEditablePointList
Sets the point list for this shape.- Overrides:
set2DEditablePointList
in classALcd2DEditablePolypoint
- Parameters:
a2DEditablePointList
- A point list that implementsILcd2DEditablePointList
-
getWidth
public double getWidth()Description copied from interface:ILcdAPP6AShape
Returns the buffer width. This value is only taken into account when the symbol should be represented by a buffer. In the APP-6A specification, these are the arrow symbols; the width property is used to define the width of the bounding box around the arrow.- Specified by:
getWidth
in interfaceILcdAPP6AShape
- Returns:
- the buffer width in meters. This value is only taken into account when the object with this code should be represented by a buffer.
-
setWidth
public void setWidth(double width) Description copied from interface:ILcdEditableAPP6AShape
Sets the buffer width. This value is only taken into account when this symbol should be represented by a buffer. In the APP-6A specification, these are the arrow symbols; the width property is used to define the width of the bounding box around the arrow.- Specified by:
setWidth
in interfaceILcdEditableAPP6AShape
- Parameters:
width
- the new width in meters.
-
isLine
public boolean isLine()Description copied from interface:ILcdAPP6AShape
Returns whether this object is represented as a line or not. When returningfalse
, the symbol is represented by one point. When returningtrue
, the symbol is represented by two or more points, e.g. a polyline, polygon (area symbol) or buffer (arrow symbol).- Specified by:
isLine
in interfaceILcdAPP6AShape
- Returns:
- true when this object should be represented as a line.
-
getAPP6ACode
Description copied from interface:ILcdAPP6ACoded
Returns the symbol code of the object (SIDC).The symbol code has to be interpreted according to the symbology standard used by this object, which can be retrieved through
ILcdAPP6ACoded.getAPP6Standard()
.- Specified by:
getAPP6ACode
in interfaceILcdAPP6ACoded
- Returns:
- the symbol code of the object (SIDC).
- See Also:
-
getAPP6Standard
Description copied from interface:ILcdAPP6ACoded
Returns the symbology standard used by this object.- Specified by:
getAPP6Standard
in interfaceILcdAPP6ACoded
- Returns:
- the symbology standard used by this object.
- See Also:
-
getTextModifierCount
public int getTextModifierCount()For objects of the APP-6A and APP-6B standards, returns the union of all text modifiers for that standard. For objects of the APP-6C standard, returns the text modifiers applicable to this symbol.- Specified by:
getTextModifierCount
in interfaceILcdAPP6ACoded
- Returns:
- the number of text modifiers for this object
- See Also:
-
getTextModifierKey
Description copied from interface:ILcdAPP6ACoded
Returns the text modifier key at the given index.- Specified by:
getTextModifierKey
in interfaceILcdAPP6ACoded
- Parameters:
aIndex
- the index of key of the text modifier to retrieve.- Returns:
- the text modifier key at the given index.
- See Also:
-
getTextModifier
Returns a description of the modifier with the given name.
This implementation also supports modifiers that are encoded in the symbol code (SIDC).- Parameters:
aModifier
- the modifier's name (seeILcdAPP6ACoded
)- Returns:
- an object encapsulating the given modifier's constraints and type, or null if the modifier is not applicable
-
getTextModifierKeyDisplayName
Returns the display name of the modifier with the given key.
This implementation also supports modifiers that are encoded in the symbol code (SIDC).- Specified by:
getTextModifierKeyDisplayName
in interfaceILcdAPP6ACoded
- Parameters:
aModifierKey
- the key of the modifier to retrieve the display name of.- Returns:
- the display name of the modifier with the given key.
-
getTextModifierValue
Returns the value of the modifier with the given key.
This implementation also supports modifiers that are encoded in the symbol code (SIDC).- Specified by:
getTextModifierValue
in interfaceILcdAPP6ACoded
- Parameters:
aModifierKey
- the key of the modifier to retrieve the value of.- Returns:
- the value of the modifier with the given key.
-
getTextModifierValue
Returns the object's value for the given text modifier.
This implementation also supports modifiers that are encoded in the symbol code (SIDC).- Parameters:
aModifier
- the modifier to return the value for- Returns:
- the modifier value for the given modifier
-
getTextModifierValue
Description copied from interface:ILcdAPP6ACoded
Returns the value of the text modifier at the given index.- Specified by:
getTextModifierValue
in interfaceILcdAPP6ACoded
- Parameters:
aIndex
- the index of the value of the text modifier to retrieve.- Returns:
- the value of the text modifier at the given index.
- See Also:
-
setAPP6ACode
Sets the APP-6 code on this object. This has an influence on the maximum number of points the shape can have and might thus change the internal point list.- Specified by:
setAPP6ACode
in interfaceILcdEditableAPP6ACoded
- Parameters:
aAPP6ACode
- a 15, 20, or 30 character code (depending on the used symbology) denoting the function of this shape. For the APP-6A and 6B standards, undefined positions should contain '-'.- Throws:
IllegalArgumentException
- when the code passed is null or isn't a valid APP-6 code.
-
putTextModifier
Adds the given value of the modifier with the given key.
This implementation also supports modifiers that are encoded in the symbol code (SIDC).- Specified by:
putTextModifier
in interfaceILcdEditableAPP6ACoded
- Parameters:
aModifierKey
- the key of the modifier to add.aModifierValue
- the value of the modifier to add.- Throws:
IllegalArgumentException
- if the symbol does not support the given modifier
-
putTextModifier
Sets the given value for the given modifier.
This implementation also supports modifiers that are encoded in the symbol code (SIDC).- Parameters:
aModifier
- the modifier to set the value foraValue
- the value of the modifier to add- Throws:
IllegalArgumentException
- if the symbol does not support the given modifier
-
getOrientation
public double getOrientation()Returns the direction of movement for this object. Do not use this method, instead get the String representation of the direction of movement through thegetTextModifierValue(java.lang.String)
method.- Specified by:
getOrientation
in interfaceILcdOriented
- Returns:
- the value of the text modifier
ILcdAPP6ACoded.sMovementDirection
. If this value is not a number or not defined Double.NaN is returned. - See Also:
-
setOrientation
public void setOrientation(double aOrientation) Sets the direction of movement. Do not use this method, instead set the direction of movement through theputTextModifier(java.lang.String, java.lang.String)
method, using theILcdAPP6ACoded.sMovementDirection
key. The value of that modifier will be adapted to reflected the orientation entered in this method.- Specified by:
setOrientation
in interfaceILcdOrientationSettable
- Parameters:
aOrientation
- the new direction of movement.- See Also:
-
clone
Creates and returns a copy of this object. The point list is cloned. The symbol code, features and text modifiers are copied without being cloned.- Specified by:
clone
in interfaceILcdCloneable
- Specified by:
clone
in interfaceILcdEditableAPP6ACoded
- Overrides:
clone
in classTLcdLonLatPolyline
- See Also:
-
toString
Prints out the name and affiliation.Do not rely on the implementation of this method: it may change without notice.
- Overrides:
toString
in classALcd2DEditablePolypoint
- Returns:
- a string representation of the object.
-
equals
Returns whether the given object is equal to this object. The applied comparison rule is the same as defined by Object#equals(Object), i.e. two non-null objects are the same if and only if they refer to the same object (this == aObject
has the valuetrue
).- Overrides:
equals
in classTLcdLonLatPolyline
- Parameters:
aObject
- the reference object with which to compare.- Returns:
true
if this object is the same as the aObject argument;false
otherwise.- See Also:
-
hashCode
public int hashCode()Returns the same hash code for the given object as returned by the default method Object#hashCode().- Overrides:
hashCode
in classTLcdLonLatPolyline
- Returns:
- a hash code value for this object.
- See Also:
-
getValue
Description copied from interface: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 anIllegalArgumentException
is thrown.- Specified by:
getValue
in interfaceILcdDataObject
- Parameters:
aProperty
- the property for which the value is to be returned- Returns:
- the value of the given property for this data object
-
getDataType
Description copied from interface:ILcdDataObject
Returns the type of this data object. This can never benull
.- Specified by:
getDataType
in interfaceILcdDataObject
- Returns:
- the type of this data object
-
setValue
Description copied from interface: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 anIllegalArgumentException
.- Specified by:
setValue
in interfaceILcdDataObject
- Parameters:
aProperty
- the property for which the value is to be setaValue
- the value to set- See Also:
-
getValue
Description copied from interface:ILcdDataObject
Convenience method that returns the value of the property with the given name.
If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy). SeeILcdDataObject.getValue(TLcdDataProperty)
for more information.- Specified by:
getValue
in interfaceILcdDataObject
- Parameters:
aPropertyName
- the name of the property of which the value is to be returned- Returns:
- the value of the property with the given name
- See Also:
-
setValue
Description copied from interface:ILcdDataObject
Convenience method that sets the value of the property with the given name.
If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy). SeeILcdDataObject.setValue(TLcdDataProperty, Object)
for more information.- Specified by:
setValue
in interfaceILcdDataObject
- Parameters:
aPropertyName
- the name of the property of which the value is to be setaValue
- the value to set
-
hasValue
Description copied from interface:ILcdDataObject
Indicates whether this data object has a value for the given property.aProperty
is from theright data type
, and this instance has a value for it: returnstrue
aProperty
is from theright data type
, and this instance has no value for it: returnsfalse
aProperty
is not from theright data type
: not allowed, you will get IllegalArgumentExceptionaProperty
isnull
: not allowed, you will get NullPointerException
- Specified by:
hasValue
in interfaceILcdDataObject
- Parameters:
aProperty
- the property for which to return whether a value is present or not.- Returns:
true
if this data object has a value for the given property,false
otherwise.
-
hasValue
Description copied from interface:ILcdDataObject
Indicates whether this data object has a value for the given property.
SeeILcdDataObject.hasValue(TLcdDataProperty)
for more information.- Specified by:
hasValue
in interfaceILcdDataObject
- Parameters:
aPropertyName
- the name of the property for which to return whether a value is present or not.- Returns:
true
if this data object has a value for the property with the given name,false
otherwise.
-
getFormattedSIDC
Returns a user-friendly representation of the symbol code of the object (SIDC).- Returns:
- a representation without any null characters
- See Also:
-
getEchelon
Retrieves the configured echelon value- Returns:
- the echelon
- See Also:
-
setEchelon
Sets the echelon value for this symbol- Parameters:
aValue
- the new value- See Also:
-
getHierarchyType
Returns the type of this symbol in the symbol hierarchy (e.g. air track, road block, ... ).- Returns:
- the hierarchy type
- See Also:
-
setHierarchyType
Sets the type of this symbol in the symbol hierarchy It leaves other symbol modifier values untouched, unless they become invalid.- Parameters:
aType
- the new hierarchy type. The type must not be a folder.- See Also:
-
getCountry
Returns the current country for this object, or "Undefined" if this object has no country information.- Returns:
- one of
getPossibleCountries()
- See Also:
-
getPossibleCountries
Returns the possible countries this object can be assigned to. The list of countries is based on the FIPS PUB 10-4 codes (now called Geopolitical Entities and Codes), as this is used to encode the country information into the SIDC. If an undefined value is allowed, it is the first value in the list. The remaining entries are alphabetically ordered.- Returns:
- the countries this object can be assigned to, including "Undefined"
- See Also:
-
setCountry
Sets the current country for this object, or "Undefined" if no country is assigned.- Parameters:
aValue
- one ofgetPossibleCountries()
- See Also:
-
getPossibleStatusValues
Returns the possible status values for this symbol (for example, present or anticipated). If an undefined value is allowed, it is the first value in the list.- Returns:
- the applicable values, including "Undefined"
-
getStatusValue
Returns the current status value of this symbol, or "Undefined" if no status is assigned.- Returns:
- one of
getPossibleStatusValues()
-
setStatusValue
Sets the current status value of this symbol, or "Undefined if no status is assigned.- Parameters:
aValue
- one ofgetPossibleStatusValues()
-
getOrderOfBattleValue
Returns the current order of battle of this symbol, or "Undefined" if no order of battle is assigned.- Returns:
- one of
getPossibleOrderOfBattleValues()
-
getPossibleOrderOfBattleValues
Returns the possible order of battle values for this symbol (e.g. Air OB, Ground OB, ...). If an undefined value is allowed, it is the first value in the list.- Returns:
- the applicable values
-
setOrderOfBattleValue
Sets the current order of battle value of this symbol, or "Undefined" if no order of battle is assigned.- Parameters:
aValue
- one ofgetPossibleOrderOfBattleValues()
-
getPossibleAffiliationValues
Returns the possible order of affiliation values for this symbol (e.g. Unknown, Hostile, Neutral, ...) If the "Unknown" value is allowed, it is the first value in the list.- Returns:
- the applicable values
-
getAffiliationValue
Returns the current affiliation of this symbol, or "Undefined" if the affiliation is not defined for this type of symbol.- Returns:
- one of
getPossibleAffiliationValues()
-
setAffiliationValue
Sets the current affiliation of this symbol.- Parameters:
aValue
- one ofgetPossibleAffiliationValues()
-
getPossibleModifiers
Returns a collection of the possible modifiers of this symbol, i.e. all SIDC and text modifiers- Returns:
- the applicable modifiers
-
getPossibleSIDCModifiers
Returns a collection of the possible SIDC modifiers of this symbol, e.g. the affiliation, status, and so on.- Returns:
- the applicable SIDC modifiers
-
getPossibleTextModifiers
Returns a collection of the possible text modifiers of this symbol, i.e. modifiers that are not encoded in the symbol code.- Returns:
- the applicable text modifiers
-
getDefaultAPP6Code(ELcdAPP6Standard)
instead