public LegacySymbolExport(ConfigHelper configHelper, string standard) { _configHelper = configHelper; _standard = standard; _entityExport = new ImageEntityExport(_configHelper, true, true); _modifierExport = new ImageModifierExport(_configHelper, true, true); }
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); } }
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); } }