コード例 #1
0
        string IHQTFFDExport.Line(LibraryHQTFDummy hqTFFD, LibraryHQTFDummyGraphic graphic)
        {
            _notes = "";

            string result = "";

            string graphicPath = _configHelper.GetPath("", FindEnum.FindHQTFFD);

            string itemRootedPath = _configHelper.BuildRootedPath(graphicPath, graphic.Graphic);
            string itemOriginalPath = _configHelper.BuildOriginalPath(graphicPath, graphic.Graphic);

            if (!File.Exists(itemOriginalPath))
                _notes = _notes + "image file does not exist;";

            LibraryStandardIdentityGroup identityGroup = _configHelper.Librarian.StandardIdentityGroup(graphic.StandardIdentityGroup);
            LibraryDimension dimension = _configHelper.Librarian.Dimension(graphic.Dimension);

            string itemName = BuildHQTFFDItemName(identityGroup, dimension, hqTFFD);
            string itemCategory = "Amplifier" + _configHelper.DomainSeparator + "HQTFFD";
            string itemTags = BuildHQTFFDItemTags(identityGroup, dimension, hqTFFD, graphicPath + "\\" + graphic.Graphic, _omitSource, _omitLegacy);
            string itemID = BuildHQTFFDCode(identityGroup, dimension, hqTFFD);

            result = itemRootedPath + "," +
                     Convert.ToString(_configHelper.PointSize) + "," +
                     itemName + "," +
                     itemCategory + "," +
                     itemTags + "," +
                     itemID + "," +
                     "Point" + "," +
                     _notes;

            return result;
        }
コード例 #2
0
        protected string BuildQuotedHQTFFDCode(LibraryStandardIdentityGroup identityGroup, LibraryDimension dimension, LibraryHQTFDummy hqTFFD)
        {
            // Creates the quoted unique idntifier code for a given HQTFFD.

            string code = '"' + this.BuildHQTFFDCode(identityGroup, dimension, hqTFFD) + '"';

            return code;
        }
コード例 #3
0
        string IHQTFFDExport.Line(LibraryHQTFDummy hqTFFD, LibraryHQTFDummyGraphic graphic)
        {
            //LibraryStandardIdentityGroup identityGroup = _configHelper.Librarian.StandardIdentityGroup(graphic.StandardIdentityGroup);
            //LibraryDimension dimension = _configHelper.Librarian.Dimension(graphic.Dimension);

            string result = BuildHQTFFDItemName(null, null, hqTFFD) + "," + BuildHQTFFDCode(null, null, hqTFFD);

            return result;
        }
コード例 #4
0
        public string NameIt(LibraryStandardIdentityGroup identityGroup, LibraryDimension dimension, LibraryHQTFDummy hqTFFD)
        {
            string name = "";

            if(dimension != null && hqTFFD != null)
                name = BuildHQTFFDItemName(identityGroup, dimension, hqTFFD);

            return name;
        }
コード例 #5
0
        protected string BuildHQTFFDItemTags(LibraryStandardIdentityGroup identityGroup,
                                             LibraryDimension dimension, 
                                             LibraryHQTFDummy hqTFFD, 
                                             string graphicPath, 
                                             bool omitSource,
                                             bool omitLegacy)
        {
            // Constructs a string of semicolon delimited tags that users can utilize to search
            // for or find a given symbol.

            // The information concatenated together for this comes from a given HQTFFD, Dimension, and Standard Identity.
            // Information includes the Label attributes, location of the original graphic file, the code, etc.

            string result = "HQTFFD;";
            result = result + hqTFFD.Label.Replace(',', '-') + ";";
            result = result + dimension.Label.Replace(',', '-') + ";";
            result = result + identityGroup.Label.Replace(',', '-') + ";";
            
            // Loop through standard identities in the group and add them

            foreach (string sIID in identityGroup.StandardIdentityIDs.Split(' '))
            {
                LibraryStandardIdentity si = _configHelper.Librarian.StandardIdentity(sIID);
                if (si != null)
                {
                    if (si.Label != identityGroup.Label)
                        result = result + si.Label.Replace(',', '-') + ";";
                }
            }

            // Loop through each symbol set in the dimension and add any labels from those

            if (dimension.SymbolSets != null)
            {
                foreach (LibraryDimensionSymbolSetRef ssRef in dimension.SymbolSets)
                {
                    if (ssRef.Label != dimension.Label)
                        result = result + ssRef.Label.Replace(',', '-') + ";";
                }
            }

            result = result + "HQTFFD;";

            if(!omitLegacy)
                result = result + _configHelper.SIDCIsNA + ";";

            if (!omitSource)
                result = result + graphicPath.Substring(1) + ";";

            result = result + "Point;";
            result = result + BuildHQTFFDItemName(identityGroup, dimension, hqTFFD) + ";";
            result = result + BuildHQTFFDCode(identityGroup, dimension, hqTFFD);

            return result;
        }
コード例 #6
0
        protected string BuildHQTFFDItemName(LibraryStandardIdentityGroup identityGroup, LibraryDimension dimension, LibraryHQTFDummy hqTFFD)
        {
            // Constructs a string containing the name of a HQTFFD, where each label value
            // is seperated by a DomainSeparator (usually a colon).  Builds this for each group
            // of related identity, dimension, and HQTFFD.

            string result = "";  //"HQTFFD" + _configHelper.DomainSeparator;  // Removed because thought to be redundant

            string hqTFFDLabel = (hqTFFD.LabelAlias == "") ? hqTFFD.Label : hqTFFD.LabelAlias;
            result = result + hqTFFDLabel.Replace(',', '-');

            if (identityGroup != null && dimension != null)
            {
                result = result + _configHelper.DomainSeparator;
                result = result + dimension.Label.Replace(',', '-') + _configHelper.DomainSeparator;
                result = result + identityGroup.Label.Replace(',', '-');
            }
            
            return result;
        }
コード例 #7
0
        protected string BuildHQTFFDCode(LibraryStandardIdentityGroup identityGroup, LibraryDimension dimension, LibraryHQTFDummy hqTFFD)
        {
            // Creates the unique idntifier code for a given HQTFFD.

            string code = "";

            if (identityGroup != null)
            {
                code = Convert.ToString(identityGroup.StandardIdentityGroupCode);
            }
            
            if(dimension != null)
            {
                code = code + Convert.ToString(dimension.DimensionCode.DigitOne) + Convert.ToString(dimension.DimensionCode.DigitTwo);
            }      
                    
            code = code + Convert.ToString(hqTFFD.HQTFDummyCode);

            return code;
        }
コード例 #8
0
        string IHQTFFDExport.Line(LibraryHQTFDummy hqTFFD, LibraryHQTFDummyGraphic graphic)
        {
            string result = "";

            LibraryStandardIdentityGroup siGroup = _configHelper.Librarian.StandardIdentityGroup(graphic.StandardIdentityGroup);
            LibraryDimension dimension = _configHelper.Librarian.Dimension(graphic.DimensionID);

            result = BuildHQTFFDItemName(siGroup, dimension, hqTFFD);
            result = result + "," + BuildSIDCKey(siGroup, dimension, hqTFFD);
            result = result + "," + BuildHQTFFDCode(siGroup, dimension, hqTFFD);
            result = result + ",";
            result = result + ",";
            result = result + ",";
            result = result + ",";
            result = result + "," + "Point";
            result = result + ",";
            result = result + ",";

            return result;
        }
コード例 #9
0
        private void _UpdateFromLegacy()
        {
            // Search for the appropriate JMSML Library elements, given the older/legacy (2525C, 2525B, etc.)
            // SIDC for this Symbol.

            _librarian.ResetStatusCode();

            _version = _librarian.Version(1, 0);

            _legacySymbol = _librarian.LegacySymbol(_legacySIDC, ref _dimension, ref _symbolSet);

            if (_legacySymbol != null)
            {
                _affiliation = _librarian.AffiliationByLegacyCode(_legacySIDC.Substring(1, 1), _dimension.ID);

                if (_affiliation != null)
                {
                    _context = _librarian.Context(_affiliation.ContextID);
                    _standardIdentity = _librarian.StandardIdentity(_affiliation.StandardIdentityID);
                    _sig = _librarian.StandardIdentityGroup(_standardIdentity);
                }

                _status = _librarian.Status(_legacySIDC.Substring(3, 1), _legacySIDC.Substring(0, 1));
                _hqTFDummy = _librarian.HQTFDummy(_legacySIDC.Substring(10, 1));

                _amplifier = _librarian.Amplifier(_legacySIDC.Substring(11, 1), _legacySIDC.Substring(0, 1));

                if (_amplifier != null)
                {
                    _amplifierGroup = _librarian.AmplifierGroup(_amplifier);
                }

                _entity = _librarian.Entity(_symbolSet, _legacySymbol.EntityID);
                _entityType = _librarian.EntityType(_entity, _legacySymbol.EntityTypeID);
                _entitySubType = _librarian.EntitySubType(_symbolSet, _entityType, _legacySymbol.EntitySubTypeID);
                _modifierOne = _librarian.ModifierOne(_symbolSet, _legacySymbol.ModifierOneID);
                _modifierTwo = _librarian.ModifierTwo(_symbolSet, _legacySymbol.ModifierTwoID);
            }

            _librarian.LogConversionResult(_legacySIDC);

            _ValidateStatus();
        }
コード例 #10
0
        private void _UpdateFromCurrent()
        {
            // Search for the appropriate JMSML Library elements, given the current (2525D)
            // SIDC for this Symbol.

            string first10 = _sidc.PartAString;
            string second10 = _sidc.PartBString;

            _librarian.ResetStatusCode();

            _version = _librarian.Version(Convert.ToUInt16(first10.Substring(0, 1)),
                                          Convert.ToUInt16(first10.Substring(1, 1)));

            _context = _librarian.Context(Convert.ToUInt16(first10.Substring(2, 1)));
            _standardIdentity = _librarian.StandardIdentity(Convert.ToUInt16(first10.Substring(3, 1)));
            _sig = _librarian.StandardIdentityGroup(_standardIdentity);
            _symbolSet = _librarian.SymbolSet(Convert.ToUInt16(first10.Substring(4, 1)), Convert.ToUInt16(first10.Substring(5, 1)));

            if (_symbolSet != null)
            {
                _dimension = _librarian.DimensionBySymbolSet(_symbolSet.ID);
            }

            if (_context != null && _dimension != null && _standardIdentity != null)
            {
                _affiliation = _librarian.Affiliation(_context.ID, _dimension.ID, _standardIdentity.ID);
            }

            _status = _librarian.Status(Convert.ToUInt16(first10.Substring(6, 1)));
            _hqTFDummy = _librarian.HQTFDummy(Convert.ToUInt16(first10.Substring(7, 1)));
            _amplifierGroup = _librarian.AmplifierGroup(Convert.ToUInt16(first10.Substring(8, 1)));

            if (_amplifierGroup != null)
            {
                _amplifier = _librarian.Amplifier(_amplifierGroup, Convert.ToUInt16(first10.Substring(9, 1)));
            }

            if (_symbolSet != null)
            {
                _entity = _librarian.Entity(_symbolSet, Convert.ToUInt16(second10.Substring(0, 1)), Convert.ToUInt16(second10.Substring(1, 1)));

                if (_entity != null)
                {
                    _entityType = _librarian.EntityType(_entity, Convert.ToUInt16(second10.Substring(2, 1)), Convert.ToUInt16(second10.Substring(3, 1)));
                }

                if (_entityType != null)
                {
                    _entitySubType = _librarian.EntitySubType(_entityType, Convert.ToUInt16(second10.Substring(4, 1)), Convert.ToUInt16(second10.Substring(5, 1)));

                    if (_entitySubType == null)
                    {
                        _entitySubType = _librarian.EntitySubType(_symbolSet, Convert.ToUInt16(second10.Substring(4, 1)), Convert.ToUInt16(second10.Substring(5, 1)));
                    }
                }

                _modifierOne = _librarian.ModifierOne(_symbolSet, Convert.ToUInt16(second10.Substring(6, 1)), Convert.ToUInt16(second10.Substring(7, 1)));
                _modifierTwo = _librarian.ModifierTwo(_symbolSet, Convert.ToUInt16(second10.Substring(8, 1)), Convert.ToUInt16(second10.Substring(9, 1)));

                _legacySymbol = _librarian.LegacySymbol(_symbolSet, _entity, _entityType, _entitySubType, _modifierOne, _modifierTwo);
            }

            _librarian.LogConversionResult(_sidc.PartAString + ", " + _sidc.PartBString);

            _ValidateStatus();
        }
コード例 #11
0
        private void _SetInvalidSymbolProps()
        {
            // If a symbol can't be recognized, this method sets up
            // the current symbol to represent the special Invalid symbol.

            _version = _librarian.Version(1, 0);
            _context = _librarian.Context(0);
            _dimension = _librarian.Dimension("INTERNAL");
            _standardIdentity = _librarian.StandardIdentity(1);
            _symbolSet = _librarian.SymbolSet(9, 8);
            _status = _librarian.Status(0);
            _hqTFDummy = _librarian.HQTFDummy(0);
            _amplifierGroup = _librarian.AmplifierGroup(0);
            _amplifier = _librarian.Amplifier(_amplifierGroup, 0);
            _affiliation = _librarian.Affiliation("REALITY", "INTERNAL", "SI_UNKNOWN");
            _entity = _librarian.Entity(_symbolSet, "INVALID");
            _entityType = null;
            _entitySubType = null;
            _modifierOne = null;
            _modifierTwo = null;
        }
コード例 #12
0
        protected string BuildSIDCKey(LibraryStandardIdentityGroup identityGroup, LibraryDimension dimension, LibraryHQTFDummy hqTFFD)
        {
            string key = "";

            key = "S";
            key = key + identityGroup.LegacyStandardIdentityCode[0].Value;
            key = key + dimension.LegacyDimensionCode[0].Value;
            key = key + "-";
            key = key + (dimension.LegacyDimensionCode[0].FirstFunctionLetter == "" ? "-" : dimension.LegacyDimensionCode[0].FirstFunctionLetter);
            key = key + hqTFFD.LegacyHQTFDummyCode[0].Value;

            return key;
        }