Class TLcdNVGSymbol

java.lang.Object
com.luciad.format.nvg.model.TLcdNVGSymbol

public final class TLcdNVGSymbol extends Object
NVG symbol representation. It is composed of a standard name and a text representation. The standard name is either 'APP6A', 'APP6B', 'APP6C', 'APP6D', 'MS2525B', 'MS2525C', 'MS2525D', 'ICON', or a user defined standard.

For military standard, the text representation is a military symbology code (ILcdAPP6ACoded.getAPP6ACode() and ILcdMS2525bCoded.getMS2525Code()). For icon, the text representation is a url reference to an image.

TLcdNVGSymbol can be assigned to a TLcdNVG20SymbolizedContent or a TLcdNVG15MapObject.

Since:
2015.0
  • Field Details

  • Constructor Details

    • TLcdNVGSymbol

      public TLcdNVGSymbol()
      Default constructor with unknown standard and text representation.
    • TLcdNVGSymbol

      public TLcdNVGSymbol(String aStandardName, String aTextRepresentation)
      Constructs an NVG symbol for a given standard name and a text representation.
      Parameters:
      aStandardName - The name of the standard. This can be one of the standard constants in this class (e.g. APP6A, MS2525B), ICON, or a user defined one.
      aTextRepresentation - The textual representation of the symbol. This could be a military code or a URL.
  • Method Details

    • getTextRepresentation

      public String getTextRepresentation()
      Get the textual representation of this symbol. For instance for icons, this method returns the URL. For military symbology, the code defining the graphical representation is returned.
      Returns:
      The textual representation of this symbol.
    • getStandardName

      public String getStandardName()
      Get the standard of this symbol. This can be one of the standard constants in this class (e.g. APP6A, MS2525B), ICON, or a user defined one.
      Returns:
      The standard as a string.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getSymbol

      public static TLcdNVGSymbol getSymbol(Object aObject)
      Extracts the TLcdNVGSymbol from given object
      Parameters:
      aObject - object whose symbol is to be extracted
      Returns:
      TLcdNVGSymbol of aObject
      Throws:
      IllegalArgumentException - if aObject is not TLcdNVG15MapObject or TLcdNVG20SymbolizedContent
    • setSymbol

      public static void setSymbol(Object aObject, TLcdNVGSymbol aSymbol)
      Sets the TLcdNVGSymbol to given object
      Parameters:
      aObject - object whose symbol is to be set
      Throws:
      IllegalArgumentException - if aObject is not TLcdNVG15MapObject or TLcdNVG20SymbolizedContent
    • isMilitaryStandardName

      public static boolean isMilitaryStandardName(String aCode)
      Checks whether the given aCode is a Military Standard name or not
      Parameters:
      aCode - code to be checked
      Returns:
      true of aCode is a Military Standard Name, false otherwise
    • isAPP6ASymbol

      public static boolean isAPP6ASymbol(TLcdNVGSymbol aNVGSymbol)
      Checks whether given TLcdNVGSymbol is an APP6 Symbol
      Parameters:
      aNVGSymbol - symbol to be checked
      Returns:
      true if aNVGSymbol is an APP6 symbol, false otherwise
    • isMS2525bSymbol

      public static boolean isMS2525bSymbol(TLcdNVGSymbol aNVGSymbol)
      Checks whether given TLcdNVGSymbol is an MS2525 Symbol
      Parameters:
      aNVGSymbol - symbol to be checked
      Returns:
      true if aNVGSymbol is an MS2525 symbol, false otherwise
    • getAPP6Standard

      public static ELcdAPP6Standard getAPP6Standard(String aName)
      Returns the APP6 standard of the given NVG standard name.
      Parameters:
      aName - String whose standard will be returned
      Returns:
      APP6 standard name of the given string
      Throws:
      IllegalArgumentException - if the String does not map to a ELcdAPP6Standard
    • getMS2525Standard

      public static ELcdMS2525Standard getMS2525Standard(String aName)
      Returns the MS2525 standard of the given NVG standard name.
      Parameters:
      aName - String whose standard will be returned
      Returns:
      MS2525 standard name of the given string
      Throws:
      IllegalArgumentException - if the String does not map to a ELcdMS2525Standard
    • getStandardName

      public static String getStandardName(Object aStandard)
      Returns the NVG standard name for the given MS2525 or APP6 standard.
      Parameters:
      aStandard - an instance of ELcdMS2525Standard or ELcdAPP6Standard
      Returns:
      the NVG standard name, or null if there is no NVG standard name for the given standard