/// <summary>
        /// Checks if an entity code exists in the table and therefore is valid
        /// </summary>
        public static bool IsModifierCodeValid(SymbolSetType symbolSet, int modifierNumber, /* 1 or 2*/
                                               string modifierCode)
        {
            SymbolLookup milSymbolLookup = GetSymbolLookup();

            if ((symbolSet == SymbolSetType.Unknown) ||
                (symbolSet == SymbolSetType.NotSet) ||
                (modifierNumber < 1) ||
                (modifierNumber > 2) ||
                (string.IsNullOrWhiteSpace(modifierCode)) ||
                (modifierCode.Length != 2))
            {
                return(false);
            }

            if (modifierCode == "00")
            {
                return(true);
            }

            // if it can't find a shape for the symbol then (presumably) it doesn't exist
            return(milSymbolLookup.GetModifierNameFromCode(symbolSet, modifierNumber, modifierCode)
                   != string.Empty);
        }
        /// <summary>
        /// Creates an consistent name from a Symbol ID Code
        /// (not in SymbolIdCode because it needs SymbolLookup)
        /// </summary>
        public static string GetWellFormedName(SymbolIdCode id)
        {
            // Just monitoring how often this is being called for now:
            // System.Diagnostics.Trace.WriteLine("GetWellFormedName");

            SymbolLookup milSymbolLookup = GetSymbolLookup();

            StringBuilder sb            = new StringBuilder();
            string        symbolSetName = TypeUtilities.EnumHelper.getStringFromEnum(id.SymbolSet);

            sb.Append(symbolSetName);

            string entityName        = string.Empty;
            string entityTypeName    = string.Empty;
            string entitySubTypeName = string.Empty;

            bool found = milSymbolLookup.GetEntityNamesFromCode(id.SymbolSet, id.EntityCode,
                                                                out entityName, out entityTypeName, out entitySubTypeName);

            if (!found)
            {
                return(sb.ToString());
            }

            sb.Append(TypeUtilities.NameSeparator);
            sb.Append(entityName);

            if (!string.IsNullOrWhiteSpace(entityTypeName))
            {
                sb.Append(TypeUtilities.NameSeparator);
                sb.Append(entityTypeName);
            }

            if (!string.IsNullOrWhiteSpace(entitySubTypeName))
            {
                sb.Append(TypeUtilities.NameSeparator);
                sb.Append(entitySubTypeName);
            }

            if (id.IsLandUnitSpecialEntity)
            {
                sb.Append(TypeUtilities.NameSeparator);
                sb.Append(TypeUtilities.EntitySubtypeCodeToLandUnitSpecialEntityName[id.EntitySubTypeField]);
            }

            string modifier1Name =
                milSymbolLookup.GetModifierNameFromCode(id.SymbolSet, 1, id.ModifierOne);
            string modifier2Name =
                milSymbolLookup.GetModifierNameFromCode(id.SymbolSet, 2, id.ModifierTwo);

            if (!string.IsNullOrWhiteSpace(modifier1Name))
            {
                sb.Append(TypeUtilities.NameSeparator);
                sb.Append("M1-");
                sb.Append(modifier1Name);
            }

            if (!string.IsNullOrWhiteSpace(modifier2Name))
            {
                sb.Append(TypeUtilities.NameSeparator);
                sb.Append("M2-");
                sb.Append(modifier2Name);
            }

            return(sb.ToString());
        }