Exemplo n.º 1
0
        public void Export(string path, string symbolSetExpression = "", string expression = "", bool exportPoints = true, bool exportLines = true, bool exportAreas = true, ETLExportEnum exportType = ETLExportEnum.ETLExportSimple, bool append = false, bool omitSource = false)
        {
            // The public entry point for exporting selective contents of the JMSML library
            // into CSV format.

            // Accepts a path for the output (sans file name extension).  The caller
            // may also provide optional regular expressions to filter on the Label
            // attributes of SymbolSets in the library and a second optional regular
            // expression for filtering on the Label attributes of other objects being
            // exported.

            IEntityExport   entityExporter   = null;
            IModifierExport modifierExporter = null;

            string entityPath   = path;
            string modifierPath = path;

            switch (exportType)
            {
            // Based on the type of export, create instances of the
            // appropriate helper class(es).

            case ETLExportEnum.ETLExportSimple:
                entityExporter   = new SimpleEntityExport();
                modifierExporter = new SimpleModifierExport();
                break;

            case ETLExportEnum.ETLExportDomain:
                entityExporter   = new DomainEntityExport(_configHelper);
                modifierExporter = new DomainModifierExport(_configHelper);
                break;

            case ETLExportEnum.ETLExportImage:
                entityExporter   = new ImageEntityExport(_configHelper, omitSource);
                modifierExporter = new ImageModifierExport(_configHelper, omitSource);
                break;
            }

            if (entityExporter != null && modifierExporter != null)
            {
                if (!append)
                {
                    // If we're not appending the modifiers to the entities
                    // then add a string to the file name to make them unique.

                    entityPath   = entityPath + "_Entities";
                    modifierPath = modifierPath + "_Modifiers";
                }

                entityPath   = entityPath + ".csv";
                modifierPath = modifierPath + ".csv";

                _exportEntities(entityExporter, entityPath, symbolSetExpression, expression, exportPoints, exportLines, exportAreas);
                _exportModifiers(modifierExporter, modifierPath, symbolSetExpression, expression, append);
            }
        }
Exemplo n.º 2
0
        private void _BuildNames()
        {
            _names.Clear();

            EntityExport ee = new DomainEntityExport(_configHelper);

            _names.Add("Entity", ee.NameIt(this.IconType == JointMilitarySymbologyLibrary.IconType.FULL_FRAME ? _sig : null, _symbolSet, _entity, _entityType, _entitySubType));

            ModifierExport me = new DomainModifierExport(_configHelper);

            _names.Add("ModifierOne", me.NameIt(_symbolSet, "1", _modifierOne));
            _names.Add("ModifierTwo", me.NameIt(_symbolSet, "2", _modifierTwo));

            FrameExport fe = new DomainFrameExport(_configHelper);

            if (_affiliation != null)
            {
                _names.Add("Frame", fe.NameIt(_context, _dimension, _standardIdentity, _status, _affiliation.CivilianGraphic != "" || _affiliation.PlannedCivilianGraphic != ""));
            }
            else
            {
                _names.Add("Frame", fe.NameIt(_context, _dimension, _standardIdentity, _status, false));
            }

            HQTFFDExport he = new DomainHQTFFDExport(_configHelper);

            _names.Add("HQTFFD", he.NameIt(_sig, _dimension, _hqTFDummy));

            AmplifierExport ae = new DomainAmplifierExport(_configHelper);

            _names.Add("Amplifier", ae.NameIt(_amplifierGroup, _amplifier, _sig));

            OCAExport oe = new DomainOCAExport(_configHelper);

            _names.Add("OCA", oe.NameIt(_sig, _dimension, _status));
        }
        private void _BuildNames()
        {
            _names.Clear();

            EntityExport ee = new DomainEntityExport(_configHelper);
            _names.Add("Entity",ee.NameIt(this.IconType == JointMilitarySymbologyLibrary.IconType.FULL_FRAME ? _sig : null, _symbolSet, _entity, _entityType, _entitySubType));

            ModifierExport me = new DomainModifierExport(_configHelper);
            _names.Add("ModifierOne", me.NameIt(_symbolSet, "1", _modifierOne));
            _names.Add("ModifierTwo", me.NameIt(_symbolSet, "2", _modifierTwo));

            FrameExport fe = new DomainFrameExport(_configHelper);
            if(_affiliation != null)
                _names.Add("Frame", fe.NameIt(_context, _dimension, _standardIdentity, _status, _affiliation.CivilianGraphic != "" || _affiliation.PlannedCivilianGraphic != ""));
            else
                _names.Add("Frame", fe.NameIt(_context, _dimension, _standardIdentity, _status, false));

            HQTFFDExport he = new DomainHQTFFDExport(_configHelper);
            _names.Add("HQTFFD", he.NameIt(_sig, _dimension, _hqTFDummy));

            AmplifierExport ae = new DomainAmplifierExport(_configHelper);
            _names.Add("Amplifier", ae.NameIt(_amplifierGroup, _amplifier, _sig));

            OCAExport oe = new DomainOCAExport(_configHelper);
            _names.Add("OCA", oe.NameIt(_sig, _dimension, _status));
        }
Exemplo n.º 4
0
        public void Export(string path, string symbolSetExpression = "", string expression = "", bool exportPoints = true, bool exportLines = true, bool exportAreas = true, ETLExportEnum exportType = ETLExportEnum.ETLExportSimple, bool append = false, bool omitSource = false, bool omitLegacy = false, long size = 32)
        {
            // The public entry point for exporting selective contents of the JMSML library
            // into CSV format.

            // Accepts a path for the output (sans file name extension).  The caller
            // may also provide optional regular expressions to filter on the Label
            // attributes of SymbolSets in the library and a second optional regular
            // expression for filtering on the Label attributes of other objects being
            // exported.

            IEntityExport entityExporter = null;
            IModifierExport modifierExporter = null;

            string entityPath = path;
            string modifier1Path = path;
            string modifier2Path = path;
            string specialPath = path;

            _configHelper.PointSize = (int)size;

            switch (exportType)
            {
                // Based on the type of export, create instances of the
                // appropriate helper class(es).

                case ETLExportEnum.ETLExportSimple:
                    entityExporter = new SimpleEntityExport(_configHelper);
                    modifierExporter = new SimpleModifierExport(_configHelper);
                    break;

                case ETLExportEnum.ETLExportDomain:
                    entityExporter = new DomainEntityExport(_configHelper);
                    modifierExporter = new DomainModifierExport(_configHelper);
                    break;

                case ETLExportEnum.ETLExportImage:
                    entityExporter = new ImageEntityExport(_configHelper, omitSource, omitLegacy);
                    modifierExporter = new ImageModifierExport(_configHelper, omitSource, true); // Suppress legacy tag
                    break;
            }

            if (entityExporter != null && modifierExporter != null)
            {
                if (!append)
                {
                    // If we're not appending the modifiers to the entities
                    // then add a string to the file name to make them unique.

                    specialPath = entityPath + "_Special_Entity_Subtype";
                    entityPath = entityPath + "_Entities";
                    modifier1Path = modifier1Path + "_Modifier_Ones";
                    modifier2Path = modifier2Path + "_Modifier_Twos";
                }

                entityPath = entityPath + ".csv";
                specialPath = specialPath + ".csv";
                modifier1Path = modifier1Path + ".csv";
                modifier2Path = modifier2Path + ".csv";

                _exportEntities(exportType, entityExporter, entityPath, specialPath, symbolSetExpression, expression, exportPoints, exportLines, exportAreas, append);
                _exportModifiers(modifierExporter, modifier1Path, modifier2Path, symbolSetExpression, expression, append);
            }
        }