private string _buildName(SymbolSet ss, SymbolSetLegacySymbol legacySymbol)
        {
            // Builds a seperated string of components names for all the 2525D elements
            // used to make this legacy symbol

            string result = "";

            Librarian lib = _configHelper.Librarian;

            if (legacySymbol.EntityID != "")
            {
                _entity = lib.Entity(ss, legacySymbol.EntityID);
            }
            else
            {
                _entity = null;
            }

            if (_entity != null && legacySymbol.EntityTypeID != "")
            {
                _entityType = lib.EntityType(_entity, legacySymbol.EntityTypeID);
            }
            else
            {
                _entityType = null;
            }

            if (_entityType != null && legacySymbol.EntitySubTypeID != "")
            {
                _entitySubType = lib.EntitySubType(ss, _entityType, legacySymbol.EntitySubTypeID);
            }
            else
            {
                _entitySubType = null;
            }

            if (legacySymbol.ModifierOneID != "")
            {
                _modifier1 = lib.ModifierOne(ss, legacySymbol.ModifierOneID);
            }
            else
            {
                _modifier1 = null;
            }

            if (legacySymbol.ModifierTwoID != "")
            {
                _modifier2 = lib.ModifierTwo(ss, legacySymbol.ModifierTwoID);
            }
            else
            {
                _modifier2 = null;
            }

            result = _entityExport.NameIt(null, ss, _entity, _entityType, _entitySubType);

            if (_modifier1 != null && _modifier1.Label != "Unspecified" && _modifier1.Label != "Not Applicable")
            {
                result = result + _configHelper.DomainSeparator + _modifierExport.NameIt(ss, "1", _modifier1);
            }

            if (_modifier2 != null && _modifier2.Label != "Unspecified" && _modifier2.Label != "Not Applicable")
            {
                result = result + _configHelper.DomainSeparator + _modifierExport.NameIt(ss, "2", _modifier2);
            }

            return(result);
        }
예제 #2
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();
        }