private string _buildSIDCKey(SymbolSet ss, SymbolSetLegacySymbol legacySymbol)
        {
            // Builds a unique key from a select number of characters from an SIDC.
            // The pattern for this is:
            //
            // S-D-FFFFFF
            //
            // Where:
            //
            // S = Schema code
            // D = Dimension code
            // FFFFFF = Function code

            string result = "";

            LegacyFunctionCodeType functionCode = _configHelper.LegacyFunction(legacySymbol.LegacyFunctionCode, _standard);

            if (functionCode != null)
            {
                if (functionCode.SchemaOverride == "")
                {
                    LegacyLetterCodeType letterCode = _configHelper.LegacyLetter(ss.LegacyCodingSchemeCode, _standard);
                    if (letterCode != null)
                    {
                        result = letterCode.Value;
                    }
                }
                else
                {
                    result = functionCode.SchemaOverride;
                }

                result = result + "-";

                Librarian        lib       = _configHelper.Librarian;
                LibraryDimension dimension = lib.Dimension(ss.DimensionID);

                if (functionCode.DimensionOverride == "")
                {
                    LegacyLetterCodeType letterCode = _configHelper.LegacyLetter(dimension.LegacyDimensionCode, _standard);
                    if (letterCode != null)
                    {
                        result = result + letterCode.Value;
                    }
                }
                else
                {
                    result = result + functionCode.DimensionOverride;
                }

                result = result + "-";
                result = result + functionCode.Value;
            }

            return(result);
        }
        protected string BuildFrameCode(string status, LegacyLetterCodeType legacyFrame)
        {
            string code = "";

            code = legacyFrame.CodingSchemeLetter;
            code = code + legacyFrame.Value;
            code = code + legacyFrame.BattleDimensionLetter;
            code = code + status;

            if (legacyFrame.FirstFunctionLetter != "")
            {
                code = code + legacyFrame.FirstFunctionLetter;
            }

            return(code);
        }
        public LegacyLetterCodeType LegacyLetter(LegacyLetterCodeType[] letterArray, string standard)
        {
            // Retrieves and returns the first letter code in the given array matching the given standard

            LegacyLetterCodeType letterCode = null;

            foreach (LegacyLetterCodeType letterCodeInArray in letterArray)
            {
                if (letterCodeInArray.Name == standard)
                {
                    letterCode = letterCodeInArray;
                    break;
                }
            }

            return(letterCode);
        }
        protected string BuildSIDCKey(string status, LegacyLetterCodeType legacyFrame)
        {
            string key = "";

            key = legacyFrame.CodingSchemeLetter;
            key = key + legacyFrame.Value;
            key = key + legacyFrame.BattleDimensionLetter;
            key = key + status;

            string firstFuncLetter = legacyFrame.FirstFunctionLetter == "" ? "-" : legacyFrame.FirstFunctionLetter;

            key = key + firstFuncLetter;

            // We will have to look at the second function character in the future if we want to handle
            // the export of Emergency Management symbology correctly.  Since the EM appendix
            // mixes the three UEI frame shapes.  For now we are treating all EM symbols as being
            // in Ground Unit frames.

            //string secondFuncLetter = legacyFrame.SecondFunctionLetter == "" ? "-" : legacyFrame.SecondFunctionLetter;
            //key = key + secondFuncLetter;

            return(key);
        }
        protected string BuildSIDCKey(LibraryStandardIdentityGroup identity, LibraryDimension dimension, LibraryStatus status)
        {
            string key = "";

            if (status.LegacyStatusCode != null)
            {
                if (identity != null && dimension != null)
                {
                    key = key + identity.LegacyStandardIdentityCode[0].Value;
                    key = key + dimension.LegacyDimensionCode[0].Value;
                }

                key = key + status.LegacyStatusCode[0].Value;

                if (dimension != null)
                {
                    LegacyLetterCodeType code = dimension.LegacyDimensionCode[0];
                    key = key + (code.FirstFunctionLetter == "" ? "-" : code.FirstFunctionLetter);
                }
            }

            return(key);
        }