)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Skip Navigation LinksHome » Code Library » Default

Public general use code classes and xml files that we've compiled and used over the years:

Support class for TentPlay Trek business model

    1: using System.Data;
    2: using System.Collections;
    3: using System.Text;
    4: using System.Text.RegularExpressions;
    5: using System.IO.Compression;
    6: using System;
    7: using System.Linq;
    8: using System.Collections.Generic;
    9: using System.IO;
   10: using System.Configuration;
   11: using System.Web;
   12:  
   13: namespace Ia.TentPlay.Cl.Model.Business.Trek
   14: {
   15:     ////////////////////////////////////////////////////////////////////////////
   16:  
   17:     /// <summary publish="true">
   18:     /// Support class for TentPlay Trek business model
   19:     /// </summary>
   20:     /// 
   21:     /// <remarks> 
   22:     /// Copyright © 2012-2023 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   23:     ///
   24:     /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
   25:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   26:     ///
   27:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   28:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   29:     /// 
   30:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   31:     /// 
   32:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   33:     /// </remarks> 
   34:     public class Default
   35:     {
   36:         private const string ngaGnsCountryZipFileHttpsLocation = "https://cdn.tentplay.com/trek/nga/gns/country-files";
   37:         private const string originalImageFtpSite = @"ftp://cdn.tentplay.com";
   38:         private const string originalCreativeCommonsImageFtpLocation = @"/cdn.tentplay.com/wwwroot/trek/country/$applicationCountryIso3/images/cc"; // important for cdn.tentplay.com Razor site on a Filezilla server
   39:         private const string destinationImageHttpsLocation = @"https://cdn.tentplay.com/trek/country/$applicationCountryIso3";
   40:  
   41:         public const string ApplicationTempDataDirectory = @"C:\\Temp\";
   42:  
   43:         public const int MaximumNumberTakeOfElementsToDisplayInList = 100;
   44:         public const int MaximumNumberOfTrekToDisplayNearTheCapital = 999;
   45:  
   46:         public const int MaximumNumberOfFeaturesThatWouldAllowForAcceptableAppSizeInAndroidPlayStore = 200000;
   47:  
   48:         ////////////////////////////////////////////////////////////////////////////
   49:  
   50:         /// <summary>
   51:         ///
   52:         /// </summary>
   53:         public static string FtpUser
   54:         {
   55:             get
   56:             {
   57:                 return ConfigurationManager.AppSettings["ftpUser"];
   58:             }
   59:         }
   60:  
   61:         ////////////////////////////////////////////////////////////////////////////
   62:  
   63:         /// <summary>
   64:         ///
   65:         /// </summary>
   66:         public static string FtpPassword
   67:         {
   68:             get
   69:             {
   70:                 return ConfigurationManager.AppSettings["ftpPassword"];
   71:             }
   72:         }
   73:  
   74:         ////////////////////////////////////////////////////////////////////////////
   75:  
   76:         /// <summary>
   77:         ///
   78:         /// </summary>
   79:         public Default()
   80:         {
   81:         }
   82:  
   83:         ////////////////////////////////////////////////////////////////////////////
   84:  
   85:         /// <summary>
   86:         ///
   87:         /// </summary>
   88:         public static List<string> SearchSubstringList(string countryIso3, string name)
   89:         {
   90:             string substring;
   91:             string[] nameWordList;
   92:             Hashtable hashtable;
   93:             List<string> substringList;
   94:  
   95:             hashtable = new Hashtable();
   96:             substringList = new List<string>();
   97:  
   98:             nameWordList = Regex.Split(name, @"\W+");
   99:  
  100:             if (countryIso3 == "IND" || countryIso3 == "USA" || countryIso3 == "MEX")
  101:             {
  102:                 //    fullTextSearchName:  f fr fra fran franc franci francis francisc francisco z za zar zarc zarco
  103:  
  104:                 foreach (string nameWord in nameWordList)
  105:                 {
  106:                     hashtable[nameWord] = 1;
  107:  
  108:                     for (int length = 1; length < nameWord.Length; length++)
  109:                     {
  110:                         substring = nameWord.Substring(0, length);
  111:  
  112:                         hashtable[substring] = 1;
  113:                     }
  114:                 }
  115:             }
  116:             else
  117:             {
  118:                 //    fullTextSearchName: a an ana anar anara ar ara e el l m ma man mana manar manara n na nar nara r ra ا ار ارة ال الم المن المنا المنار المنارة ة ر رة ل لم لمن لمنا لمنار لمنارة م من منا منار منارة ن نا نار نارة                 
  119:  
  120:                 foreach (string nameWord in nameWordList)
  121:                 {
  122:                     hashtable[nameWord] = 1;
  123:  
  124:                     for (int length = 1; length < nameWord.Length; length++)
  125:                     {
  126:                         for (int start = 0; start <= nameWord.Length - length; start++)
  127:                         {
  128:                             substring = nameWord.Substring(start, length);
  129:  
  130:                             hashtable[substring] = 1;
  131:                         }
  132:                     }
  133:                 }
  134:             }
  135:  
  136:             substringList = hashtable.Keys.Cast<string>().ToList();
  137:             substringList.Sort();
  138:  
  139:             return substringList;
  140:         }
  141:  
  142:         ////////////////////////////////////////////////////////////////////////////
  143:  
  144:         /// <summary>
  145:         ///
  146:         /// </summary>
  147:         public static void GenerateCSharpCodeToLinqQuery512BinaryToBooleanAndOrStringOfClassFeatures()
  148:         {
  149:             string b, s;
  150:             StringBuilder sb;
  151:  
  152:             sb = new StringBuilder();
  153:  
  154:             sb.AppendLine(@"// code below is generated by code in ca project");
  155:             sb.AppendLine(@"");
  156:  
  157:             for (int i = 0; i < 512; i++)
  158:             {
  159:                 b = Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass.ConvertIntegerToBinary(i);
  160:                 s = Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass.ConvertBinaryToBooleanAndOrStringOfClassFeatures(b);
  161:  
  162:                 sb.AppendLine(@"// integer: " + i + ", binary: " + b.PadLeft(9, '0') + ", string: " + s);
  163:  
  164:                 sb.AppendLine(@"item = (from ncw in featureList where " + s + @" orderby ncw.DistanceToCapital select ncw).ToList().Take(maximumNumberOfTrekToDisplayNearTheCapitalList).LastOrDefault();");
  165:                 sb.AppendLine(@"if (item != null) list.Add(item.DistanceToCapital);");
  166:                 sb.AppendLine(@"else list.Add(0);");
  167:  
  168:                 sb.AppendLine(@"");
  169:             }
  170:  
  171:             sb.AppendLine(@"// end of generated code");
  172:             sb.AppendLine(@"");
  173:  
  174:         }
  175:  
  176:         ////////////////////////////////////////////////////////////////////////////
  177:  
  178:         /// <summary>
  179:         ///
  180:         /// </summary>
  181:         public static string OriginalImageFtpSite
  182:         {
  183:             get
  184:             {
  185:                 return originalImageFtpSite;
  186:             }
  187:         }
  188:  
  189:         ////////////////////////////////////////////////////////////////////////////
  190:  
  191:         /// <summary>
  192:         ///
  193:         /// </summary>
  194:         public static string OriginalCreativeCommonsImageFtpLocation(string applicationCountryIso3)
  195:         {
  196:             return originalCreativeCommonsImageFtpLocation.Replace("$applicationCountryIso3", applicationCountryIso3);
  197:         }
  198:  
  199:         ////////////////////////////////////////////////////////////////////////////
  200:  
  201:         /// <summary>
  202:         ///
  203:         /// </summary>
  204:         public static string DestinationImageFtpLocation(string applicationCountryIso3)
  205:         {
  206:             return destinationImageHttpsLocation.Replace("$applicationCountryIso3", applicationCountryIso3);
  207:         }
  208:  
  209:         ////////////////////////////////////////////////////////////////////////////
  210:  
  211:         /// <summary>
  212:         /// Define the SQLite database file name according to the country file name
  213:         /// </summary>
  214:         public static string SqliteDatabaseFileName(string applicationCountryIso3, string applicationCountryVersion)
  215:         {
  216:             return applicationCountryIso3 + "." + applicationCountryVersion + ".sqlite";
  217:         }
  218:  
  219:         ////////////////////////////////////////////////////////////////////////////
  220:  
  221:         /// <summary>
  222:         /// Define the SQLite database file password according to the country file name
  223:         /// Problem: I cant open an SQLite password protected database file on Android. I will remove the password locks.
  224:         /// </summary>
  225:         [Obsolete]
  226:         public static string _SqliteDatabaseFilePassword(string fileCountry)
  227:         {
  228:             return fileCountry + "000000";
  229:         }
  230:  
  231:         ////////////////////////////////////////////////////////////////////////////
  232:  
  233:         /// <summary>
  234:         /// 
  235:         /// </summary>
  236:         public static string SqliteDatabaseFileCreateFeatureDesignationTableString(bool createVirtualTable, List<Ia.Cl.Model.Language> countrySpokenLanguageList)
  237:         {
  238:             string sql, entryList, languageNameString;
  239:             string[] p;
  240:  
  241:             if (countrySpokenLanguageList.Count > 0)
  242:             {
  243:                 p = (from c in countrySpokenLanguageList select c.Symbol).ToArray();
  244:  
  245:                 if (p.Length == 1)
  246:                 {
  247:                     languageNameString = p[0] + " text";
  248:                 }
  249:                 else
  250:                 {
  251:                     languageNameString = string.Join(" text, ", p);
  252:                     languageNameString += " text";
  253:                 }
  254:             }
  255:             else
  256:             {
  257:                 languageNameString = "en text";
  258:             }
  259:  
  260:             languageNameString = Regex.Replace(languageNameString, @"\bis\b", "[is]");
  261:  
  262:             entryList = "_id text primary key, " + languageNameString + ", class text";
  263:  
  264:             if (createVirtualTable) sql = @"create virtual table featureDesignations using fts3(" + entryList + ")";
  265:             else sql = @"create table featureDesignations (" + entryList + ")";
  266:  
  267:             return sql;
  268:         }
  269:  
  270:         /*
  271:         ////////////////////////////////////////////////////////////////////////////
  272: 
  273:         /// <summary>
  274:         /// 
  275:         /// </summary>
  276:         public static List<string> SqliteDatabaseFileInsertListFeatureDesignationsTableListString
  277:         {
  278:             get
  279:             {
  280:                 int deleted;
  281:                 string sql, description, createdString, updatedString;
  282:                 Ia.Cl.Model.Result result;
  283:                 List<string> sqlList;
  284:                 List<Ia.TentPlay.Cl.Model.Trek.FeatureDesignation> featureDesignationsList;
  285: 
  286:                 sqlList = new List<string>();
  287: 
  288:                 using (var db = new Ia.TentPlay.Db())
  289:                 {
  290:                     featureDesignationsList = Ia.TentPlay.Cl.Model.Data.FeatureDesignation.List(out result);
  291: 
  292:                     if (!result.HasError)
  293:                     {
  294:                         foreach (Ia.TentPlay.Cl.Model.Trek.FeatureDesignation nfdc in featureDesignationsList)
  295:                         {
  296:                             // below: we make sure to change single ''' to "''" in description to store in SQLite
  297:                             description = string.IsNullOrEmpty(nfdc.Description) ? null: nfdc.Description.Replace("'", "''");
  298: 
  299:                             deleted = Convert.ToInt32(nfdc.Deleted);
  300: 
  301:                             createdString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(nfdc.Created);
  302:                             updatedString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(nfdc.Updated);
  303: 
  304:                             // for Andriod, the database tables should use the identifier _id for the primary key of the table. Several Android functions rely on this standard.
  305:                             sql = "insert into featureDesignations (_id, name, arabicName, danishName, description, class, deleted, created, updated) values ('" + nfdc.Id + "', '" + nfdc.En + "', '" + nfdc.Ar + "', '" + nfdc.Da + "', '" + description + "', '" + nfdc.Class + "', " + deleted + ", '" + createdString + "', '" + updatedString + "')";
  306: 
  307:                             sqlList.Add(sql);
  308:                         }
  309:                     }
  310:                 }
  311: 
  312:                 return sqlList;
  313:             }
  314:         }
  315:         */
  316:  
  317:         ////////////////////////////////////////////////////////////////////////////
  318:  
  319:         /// <summary>
  320:         /// 
  321:         /// </summary>
  322:         public static string SqliteDatabaseFileCreateFeaturesTableString(bool createVirtualTable)
  323:         {
  324:             string sql, entryList;
  325:  
  326:             // for Andriod, the database tables should use the identifier _id for the primary key of the table. Several Android functions rely on this standard.
  327:             // note the "Designation_Id" because Designation is an EF entity represented here by text Designation_Id
  328:  
  329:             entryList = "_id text primary key, latitude real, longitude real, distanceToCapital numeric, cMap text, class text, country text, fileCountry text, name text, noDiacriticLowerCaseName text, nativeName text, noDiacriticNativeName text, fullTextSearchName text, designation_Id text, foreign key(designation_Id) references featureDesignations(_id)";
  330:  
  331:             if (createVirtualTable) sql = @"create virtual table featuresFts using fts3(" + entryList + ")";
  332:             else sql = @"create table features (" + entryList + ")";
  333:  
  334:             return sql;
  335:         }
  336:  
  337:         ////////////////////////////////////////////////////////////////////////////
  338:  
  339:         /// <summary>
  340:         /// 
  341:         /// </summary>
  342:         public static List<string> SqliteDatabaseFileInsertListSpecificFeaturesTableListString(Ia.Cl.Model.Country country)
  343:         {
  344:             int deleted;
  345:             string sql, name, noDiacriticLowerCaseName, nativeName, noDiacriticNativeName, fullTextSearchName, createdString, updatedString;
  346:             Ia.Cl.Model.Result result;
  347:             List<string> sqlList, searchSubstringList;
  348:             List<Ia.TentPlay.Cl.Model.Trek.Feature> featuresList;
  349:  
  350:             sqlList = new List<string>();
  351:  
  352:             using (var db = new Ia.TentPlay.Db())
  353:             {
  354:                 featuresList = Ia.TentPlay.Cl.Model.Data.Trek.Feature.List(country.Iso3, out result);
  355:  
  356:                 if (!result.HasError)
  357:                 {
  358:                     foreach (Ia.TentPlay.Cl.Model.Trek.Feature ncw in featuresList)
  359:                     {
  360:                         // below: we make sure to change single ''' to "''" in name, noDiacriticLowerCaseName, nativeName, noDiacriticNativeName to store in SQLite
  361:                         name = (string.IsNullOrEmpty(ncw.Name)) ? null : ncw.Name.Replace("'", "''");
  362:                         noDiacriticLowerCaseName = (string.IsNullOrEmpty(ncw.NoDiacriticLowerCaseName)) ? null : ncw.NoDiacriticLowerCaseName.Replace("'", "''");
  363:                         nativeName = (string.IsNullOrEmpty(ncw.NativeName)) ? null : ncw.NativeName.Replace("'", "''");
  364:                         noDiacriticNativeName = (string.IsNullOrEmpty(ncw.NoDiacriticNativeName)) ? null : ncw.NoDiacriticNativeName.Replace("'", "''");
  365:  
  366:                         searchSubstringList = Ia.TentPlay.Cl.Model.Business.Trek.Default.SearchSubstringList(country.Iso3, noDiacriticLowerCaseName + " " + noDiacriticNativeName);
  367:                         fullTextSearchName = string.Join(" ", searchSubstringList);
  368:  
  369:                         deleted = Convert.ToInt32(ncw.Deleted);
  370:  
  371:                         createdString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(ncw.Created);
  372:                         updatedString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(ncw.Updated);
  373:  
  374:                         sql = "insert into features (_id, latitude, longitude, distanceToCapital, cMap, class, country, fileCountry, name, noDiacriticLowerCaseName, nativeName, noDiacriticNativeName, fullTextSearchName, designation) values ('" + ncw.Id + "', '" + ncw.Latitude + "', '" + ncw.Longitude + "', '" + ncw.DistanceToCapital + "', '" + ncw.CMap + "', '" + ncw.Class + "', '" + ncw.Class + "', '" + ncw.Country + "', '" + ncw.FileCountry + "', '" + name + "', '" + noDiacriticLowerCaseName + "', '" + nativeName + "', '" + noDiacriticNativeName + "', '" + fullTextSearchName + "', '" + ncw.Designation.Id + "')";
  375:                         //  deleted, created, updated,
  376:  
  377:                         sqlList.Add(sql);
  378:                     }
  379:                 }
  380:             }
  381:  
  382:             return sqlList;
  383:         }
  384:  
  385:         ////////////////////////////////////////////////////////////////////////////
  386:  
  387:         /// <summary>
  388:         ///
  389:         /// </summary>
  390:         public static List<string> AllowedFeatureDesignationList(string countryFeatureFileNameIso3)
  391:         {
  392:             List<string> fullVersion, liteVersion;
  393:  
  394:             liteVersion = LiteVersionAllowedFeatureDesignationList(countryFeatureFileNameIso3);
  395:             fullVersion = FullVersionAllowedFeatureDesignationList(countryFeatureFileNameIso3);
  396:  
  397:             return fullVersion.Union(liteVersion).ToList();
  398:         }
  399:  
  400:         ////////////////////////////////////////////////////////////////////////////
  401:  
  402:         /// <summary>
  403:         ///
  404:         /// </summary>
  405:         public static List<string> LiteVersionAllowedFeatureDesignationList(string countryFeatureFileNameIso3)
  406:         {
  407:             //List<string> allowedList = new List<string> { "FJDS", "FLD", "FLDI", "FLLS", "FLLSX", "RSRT", "RSTN", "RSTNQ", "RSTP", "RSTPQ", "RSV", "RSVI", "RSVT", "RTE", "RUIN", "RVN", "RYD", "SALT", "SAND", "FLTM", "FLTT", "FLTU", "FNDY", "FORD", "FRKU", "FRM", "FRMQ", "FRMS", "FRMT", "FRST", "FRSTF", "FRSU", "FRZU", "FT", "FURU", "GAP", "GAPU", "GASF", "GLCR", "GLYU", "GOSP", "GRAZ", "GRGE", "GRSLD", "GRVC", "GRVE", "GRVO", "GRVP", "GRVPN", "GULF", "GVL", "GYSR", "HBR", "HBRX", "HDLD", "HERM", "HLL", "HLLS", "HLLU", "HLSU", "HLT", "HMCK", "HMDA", "HOLU", "HSTS", "HTH", "INLT", "INLTQ", "INSM", "ISL", "ISLF", "ISLM", "ISLS", "ISLT", "ISLX", "ISTH", "JTY", "KNLU", "KNSU", "LAVA", "LBED", "LDGU", "LDNG", "LEPC", "LEV", "LEVU", "LGN", "LGNS", "LGNX", "LK", "LKC", "LKI", "LKN", "LKNI", "LKO", "LKOI", "LKS", "LKSB", "LKSC", "LKSI", "LKSN", "LKSNI", "LKX", "LOCK", "LTHSE", "MAR", "MDW", "MESA", "MESU", "MFGN", "MFGQ", "MFGSG", "MGV", "MILB", "SBED", "SBKH", "SCRB", "SCRP", "SCSU", "SD", "SDL", "SDLU", "SEA", "SHFU", "SHLU", "SHOL", "SHOR", "SHPF", "SHSE", "SHSU", "SHVU", "SILL", "SILU", "SINK", "SLCE", "SLP", "SLPU", "SMSU", "SMU", "SNOW", "SPA", "SPIT", "SPLY", "SPNG", "SPNS", "SPNT", "SPRU", "SPUR", "SQR", "STKR", "STM", "STMA", "STMB", "STMC", "STMD", "STMH", "STMI", "STMIX", "STMM", "STMQ", "STMS", "STMSB", "STMX", "STNC", "STNE", "STNF", "STNI", "STNM", "STNR", "STNS", "STNW", "STPS", "STRT", "SWMP", "SYSI", "TAL", "TERR", "TERU", "TMPL", "TMSU", "TMTU", "TNGU", "TNKD", "TNL", "TNLC", "TNLN", "TNLRD", "TNLRR", "TNLS", "TOWR", "TRB", "TREE", "TRGD", "TRGU", "TRL", "TRMO", "TRNU", "TRR", "TUND", "UPLD", "USGE", "VAL", "VALG", "VALS", "VALU", "VALX", "VIN", "VINS", "VLC", "VLSU", "WAD", "WADB", "WADJ", "WADM", "WADS", "WADX", "WALL", "WALLA", "WEIR", "WHRF", "WHRL", "WLL", "WLLQ", "WLLS", "WRCK", "WTLD", "WTLDI", "WTRC", "WTRH", "WTRW", "ZOO", "AIRG", "AIRT", "AQC", "FYT", "LNDF", "PSN", "STMGS", "SUBS", "SUBW", "SWT", "TRANT", "PPLF", "PPLCH", "PPLH", "UFHU", "MLWND", "MLWTR", "MN", "MNA", "MNAU", "MNC", "MNCR", "MNCU", "MND", "MNDT", "MNDU", "MNFE", "MNMT", "MNN", "MNNI", "MNPB", "MNPL", "MNQ", "MNQR", "MNSN", "MOLE", "MOOR", "MOTU", "MRN", "MRSH", "MRSHN", "MSTY", "MT", "MTS", "MTSU", "MTU", "MVA", "NKM", "NRWS", "NSY", "NTK", "NTKS", "NVB", "OAS", "OBPT", "OBS", "OBSR", "OCH", "OCN", "OILF", "OILJ", "OILP", "OILQ", "OILR", "OILT", "OILW", "PAL", "PAN", "PANS", "PASS", "PEN", "PENX", "PGDA", "PIER", "PK", "PKLT", "PKS", "PKSU", "PKU", "PLAT", "PLATX", "PLDR", "PLFU", "PLN", "PLNU", "PLNX", "PLTU", "PMPO", "PMPW", "PND", "PNDI", "PNDN", "PNDNI", "PNDS", "PNDSF", "PNDSI", "PNDSN", "PNLU", "POOL", "POOLI", "PP", "PPLC", "PRK", "PRMN", "PRN", "PRNJ", "PRNQ", "PROM", "PRSH", "PRT", "PRVU", "PS", "PSH", "PSTB", "PSTC", "PSTP", "PT", "PTGE", "PTS", "PYR", "PYRS", "QCKS", "QUAY", "RAVU", "RCH", "RD", "RDA", "RDB", "RDCUT", "RDGB", "RDGE", "RDGG", "RDGU", "RDJCT", "RDST", "RDSU", "REG", "RES", "RESA", "RESF", "RESH", "RESN", "RESP", "RESV", "RESW", "RF", "RFC", "RFSU", "RFU", "RFX", "RGNE", "RGNL", "RHSE", "RISU", "RJCT", "RK", "RKFL", "RKRY", "RKS", "RLG", "RLGR", "RMPU", "RNCH", "RNGA", "RNGU", "RPDS", "RR", "RRQ", "RSD", "RSGNL", "AGRC", "AGRF", "AIRB", "AIRF", "AIRH", "AIRP", "AIRQ", "AIRS", "AMTH", "ANCH", "ANS", "ARCH", "ARCU", "ASPH", "ASTR", "ASYL", "ATOL", "BAR", "BAY", "BAYS", "BCH", "BCHS", "BCN", "BDG", "BDGQ", "BDLD", "BDLU", "BGHT", "BKSU", "BLDR", "BLHL", "BNCH", "BNCU", "BNK", "BNKR", "BNKU", "BNKX", "BOG", "BP", "BRKS", "BRKW", "BSND", "BSNP", "BSNU", "BTL", "BTYD", "BUR", "BUSH", "CAPE", "CARN", "CAVE", "CFT", "CHN", "CHNL", "CHNM", "CHNN", "CLF", "CLG", "CMN", "CMP", "CMPL", "CMPLA", "CMPMN", "CMPO", "CMPQ", "CMPRF", "CMTY", "CNFL", "CNL", "CNLA", "CNLB", "CNLD", "CNLI", "CNLN", "CNLQ", "CNLSB", "CNLX", "CNSU", "CNYN", "CNYU", "COLF", "COMC", "CONE", "COVE", "CRDR", "CRKT", "CRNT", "CRRL", "CRSU", "CRTR", "CSNO", "CST", "CSTL", "CSTM", "CSWY", "CSWYQ", "CTRA", "CTRR", "CTRS", "CULT", "CVNT", "DAM", "DAMQ", "DAMSB", "DARY", "DCK", "DCKB", "DCKD", "DCKY", "DEPU", "DIKE", "DLTA", "DPOF", "DPR", "DSRT", "DTCH", "DTCHD", "DTCHI", "DUNE", "DVD", "ERG", "EST", "ESTB", "ESTC", "ESTO", "ESTR", "ESTSG", "ESTSL", "ESTT", "ESTX", "ESTY", "FISH" };
  408:  
  409:             // below: this is a list of all features
  410:             List<string> list = new List<string> { "ADM1", "ADM1H", "ADM2", "ADM2H", "ADM3", "ADM3H", "ADM4", "ADM4H", "ADMD", "ADMDH", "ADMF", "ADMS", "AGRC", "AGRF", "AIRB", "AIRF", "AIRG", "AIRH", "AIRP", "AIRQ", "AIRS", "AIRT", "AMTH", "ANCH", "ANS", "APNU", "AQC", "ARCH", "ARCU", "AREA", "ARRU", "ASPH", "ASTR", "ASYL", "ATHF", "ATOL", "BAN", "BAR", "BAY", "BAYS", "BCH", "BCHS", "BCN", "BDG", "BDGQ", "BDLD", "BDLU", "BGHT", "BKSU", "BLDA", "BLDG", "BLDO", "BLDR", "BLHL", "BLOW", "BNCH", "BNCU", "BNK", "BNKR", "BNKU", "BNKX", "BOG", "BP", "BRKS", "BRKW", "BSND", "BSNP", "BSNU", "BSTN", "BTL", "BTYD", "BUR", "BUSH", "BUTE", "CAPE", "CAPG", "CARN", "CAVE", "CDAU", "CFT", "CH", "CHN", "CHNL", "CHNM", "CHNN", "CLDA", "CLF", "CLG", "CMN", "CMP", "CMPL", "CMPLA", "CMPMN", "CMPO", "CMPQ", "CMPRF", "CMTY", "CNFL", "CNL", "CNLA", "CNLB", "CNLD", "CNLI", "CNLN", "CNLQ", "CNLSB", "CNLX", "CNS", "CNSU", "CNYN", "CNYU", "COLF", "COMC", "CONE", "COVE", "CRDR", "CRKT", "CRNT", "CRQ", "CRQS", "CRRL", "CRSU", "CRTR", "CSNO", "CST", "CSTL", "CSTM", "CSWY", "CSWYQ", "CTHSE", "CTRA", "CTRB", "CTRCM", "CTRF", "CTRM", "CTRR", "CTRS", "CUET", "CULT", "CUTF", "CVNT", "DAM", "DAMQ", "DAMSB", "DARY", "DCK", "DCKB", "DCKD", "DCKY", "DEPU", "DEVH", "DIKE", "DIP", "DLTA", "DOMG", "DPOF", "DPR", "DPRG", "DSRT", "DTCH", "DTCHD", "DTCHI", "DTCHM", "DUNE", "DVD", "EDGU", "ERG", "ESCU", "EST", "ESTB", "ESTC", "ESTO", "ESTR", "ESTSG", "ESTSL", "ESTT", "ESTX", "ESTY", "FAN", "FANU", "FCL", "FIRE", "FISH", "FJD", "FJDS", "FLD", "FLDI", "FLLS", "FLLSX", "FLTM", "FLTT", "FLTU", "FNDY", "FORD", "FRKU", "FRM", "FRMQ", "FRMS", "FRMT", "FRST", "FRSTF", "FRSU", "FRZU", "FSR", "FT", "FURU", "FY", "FYT", "GAP", "GAPU", "GARG", "GASF", "GATE", "GDN", "GHAT", "GHSE", "GLCR", "GLYU", "GOSP", "GOVL", "GRAZ", "GRGE", "GRSLD", "GRVC", "GRVE", "GRVO", "GRVP", "GRVPN", "GULF", "GVL", "GYSR", "HBR", "HBRX", "HDLD", "HERM", "HLL", "HLLS", "HLLU", "HLSU", "HLT", "HMCK", "HMDA", "HMSD", "HOLU", "HSE", "HSEC", "HSP", "HSPC", "HSPD", "HSPL", "HSTS", "HTH", "HTL", "HUT", "HUTS", "INDS", "INLT", "INLTQ", "INSM", "INTF", "ISL", "ISLF", "ISLM", "ISLS", "ISLT", "ISLX", "ISTH", "ITTR", "JTY", "KNLU", "KNSU", "KRST", "LAND", "LAVA", "LBED", "LCTY", "LDGU", "LDNG", "LEPC", "LEV", "LEVU", "LGN", "LGNS", "LGNX", "LK", "LKC", "LKI", "LKN", "LKNI", "LKO", "LKOI", "LKS", "LKSB", "LKSC", "LKSI", "LKSN", "LKSNI", "LKX", "LNDF", "LOCK", "LTER", "LTHSE", "MAR", "MDVU", "MDW", "MESA", "MESU", "MFG", "MFGB", "MFGC", "MFGCU", "MFGLM", "MFGM", "MFGN", "MFGPH", "MFGQ", "MFGSG", "MGV", "MILB", "MKT", "ML", "MLM", "MLO", "MLSG", "MLSGQ", "MLSW", "MLWND", "MLWTR", "MN", "MNA", "MNAU", "MNC", "MNCR", "MNCU", "MND", "MNDT", "MNDU", "MNFE", "MNMT", "MNN", "MNNI", "MNPB", "MNPL", "MNQ", "MNQR", "MNSN", "MOLE", "MOOR", "MOTU", "MRN", "MRSH", "MRSHN", "MSQE", "MSSN", "MSSNQ", "MSTY", "MT", "MTS", "MTSU", "MTU", "MUS", "MVA", "NKM", "NOV", "NRWS", "NSY", "NTK", "NTKS", "NVB", "OAS", "OBPT", "OBS", "OBSR", "OCH", "OCN", "OILF", "OILJ", "OILP", "OILQ", "OILR", "OILT", "OILW", "OVF", "PAL", "PAN", "PANS", "PASS", "PCL", "PCLD", "PCLF", "PCLH", "PCLI", "PCLIX", "PCLS", "PEAT", "PEN", "PENX", "PGDA", "PIER", "PK", "PKLT", "PKS", "PKSU", "PKU", "PLAT", "PLATX", "PLDR", "PLFU", "PLN", "PLNU", "PLNX", "PLTU", "PMPO", "PMPW", "PND", "PNDI", "PNDN", "PNDNI", "PNDS", "PNDSF", "PNDSI", "PNDSN", "PNLU", "PO", "POOL", "POOLI", "PP", "PPL", "PPLA", "PPLA2", "PPLA3", "PPLA4", "PPLC", "PPLCH", "PPLF", "PPLH", "PPLL", "PPLQ", "PPLR", "PPLS", "PPLW", "PPLX", "PPQ", "PRK", "PRKGT", "PRKHQ", "PRMN", "PRN", "PRNJ", "PRNQ", "PROM", "PRSH", "PRT", "PRVU", "PS", "PSH", "PSN", "PSTB", "PSTC", "PSTP", "PT", "PTGE", "PTS", "PYR", "PYRS", "QCKS", "QUAY", "RAVU", "RCH", "RD", "RDA", "RDB", "RDCR", "RDCUT", "RDGB", "RDGE", "RDGG", "RDGU", "RDIN", "RDJCT", "RDST", "RDSU", "RECG", "RECR", "REG", "REP", "RES", "RESA", "RESF", "RESH", "RESN", "RESP", "RESV", "RESW", "RET", "RF", "RFC", "RFSU", "RFU", "RFX", "RGN", "RGNE", "RGNL", "RHSE", "RISU", "RJCT", "RK", "RKFL", "RKRY", "RKS", "RLG", "RLGR", "RMPU", "RNCH", "RNGA", "RNGU", "RPDS", "RR", "RRQ", "RSD", "RSGNL", "RSRT", "RSTN", "RSTNQ", "RSTP", "RSTPQ", "RSV", "RSVI", "RSVT", "RTE", "RUIN", "RVN", "RYD", "SALT", "SAND", "SBED", "SBKH", "SCH", "SCHA", "SCHC", "SCHM", "SCHN", "SCHT", "SCNU", "SCRB", "SCRP", "SCSU", "SD", "SDL", "SDLU", "SEA", "SHFU", "SHLU", "SHOL", "SHOPC", "SHOR", "SHPF", "SHRN", "SHSE", "SHSU", "SHVU", "SILL", "SILU", "SINK", "SLCE", "SLID", "SLP", "SLPU", "SMSU", "SMU", "SNOW", "SNTR", "SPA", "SPIT", "SPLY", "SPNG", "SPNS", "SPNT", "SPRU", "SPUR", "SQR", "ST", "STBL", "STDM", "STKR", "STLMT", "STM", "STMA", "STMB", "STMC", "STMD", "STMGS", "STMH", "STMI", "STMIX", "STMM", "STMQ", "STMS", "STMSB", "STMX", "STNB", "STNC", "STNE", "STNF", "STNI", "STNM", "STNR", "STNS", "STNW", "STPS", "STRT", "SUBS", "SUBW", "SWMP", "SWT", "SYSI", "TAL", "TERR", "TERU", "TMB", "TMPL", "TMSU", "TMTU", "TNGU", "TNKD", "TNL", "TNLC", "TNLN", "TNLRD", "TNLRR", "TNLS", "TOLL", "TOWR", "TRANT", "TRB", "TREE", "TRGD", "TRGU", "TRIG", "TRL", "TRMO", "TRNU", "TRR", "TUND", "UFHU", "UPLD", "USGE", "VAL", "VALG", "VALS", "VALU", "VALX", "VETF", "VIN", "VINS", "VLC", "VLSU", "WAD", "WADB", "WADJ", "WADM", "WADS", "WADX", "WALL", "WALLA", "WEIR", "WHRF", "WHRL", "WLL", "WLLQ", "WLLS", "WRCK", "WTLD", "WTLDI", "WTRC", "WTRH", "WTRW", "ZN", "ZNB", "ZNF", "ZOO" };
  411:  
  412:             return list;
  413:         }
  414:  
  415:         ////////////////////////////////////////////////////////////////////////////
  416:  
  417:         /// <summary>
  418:         ///
  419:         /// </summary>
  420:         public static List<string> FullVersionAllowedFeatureDesignationList(string countryFeatureFileNameIso3)
  421:         {
  422:             //List<string> allowedList = new List<string> { "FJDS", "FLD", "FLDI", "FLLS", "FLLSX", "RSRT", "RSTN", "RSTNQ", "RSTP", "RSTPQ", "RSV", "RSVI", "RSVT", "RTE", "RUIN", "RVN", "RYD", "SALT", "SAND", "FLTM", "FLTT", "FLTU", "FNDY", "FORD", "FRKU", "FRM", "FRMQ", "FRMS", "FRMT", "FRST", "FRSTF", "FRSU", "FRZU", "FT", "FURU", "GAP", "GAPU", "GASF", "GLCR", "GLYU", "GOSP", "GRAZ", "GRGE", "GRSLD", "GRVC", "GRVE", "GRVO", "GRVP", "GRVPN", "GULF", "GVL", "GYSR", "HBR", "HBRX", "HDLD", "HERM", "HLL", "HLLS", "HLLU", "HLSU", "HLT", "HMCK", "HMDA", "HOLU", "HSTS", "HTH", "INLT", "INLTQ", "INSM", "ISL", "ISLF", "ISLM", "ISLS", "ISLT", "ISLX", "ISTH", "JTY", "KNLU", "KNSU", "LAVA", "LBED", "LDGU", "LDNG", "LEPC", "LEV", "LEVU", "LGN", "LGNS", "LGNX", "LK", "LKC", "LKI", "LKN", "LKNI", "LKO", "LKOI", "LKS", "LKSB", "LKSC", "LKSI", "LKSN", "LKSNI", "LKX", "LOCK", "LTHSE", "MAR", "MDW", "MESA", "MESU", "MFGN", "MFGQ", "MFGSG", "MGV", "MILB", "SBED", "SBKH", "SCRB", "SCRP", "SCSU", "SD", "SDL", "SDLU", "SEA", "SHFU", "SHLU", "SHOL", "SHOR", "SHPF", "SHSE", "SHSU", "SHVU", "SILL", "SILU", "SINK", "SLCE", "SLP", "SLPU", "SMSU", "SMU", "SNOW", "SPA", "SPIT", "SPLY", "SPNG", "SPNS", "SPNT", "SPRU", "SPUR", "SQR", "STKR", "STM", "STMA", "STMB", "STMC", "STMD", "STMH", "STMI", "STMIX", "STMM", "STMQ", "STMS", "STMSB", "STMX", "STNC", "STNE", "STNF", "STNI", "STNM", "STNR", "STNS", "STNW", "STPS", "STRT", "SWMP", "SYSI", "TAL", "TERR", "TERU", "TMPL", "TMSU", "TMTU", "TNGU", "TNKD", "TNL", "TNLC", "TNLN", "TNLRD", "TNLRR", "TNLS", "TOWR", "TRB", "TREE", "TRGD", "TRGU", "TRL", "TRMO", "TRNU", "TRR", "TUND", "UPLD", "USGE", "VAL", "VALG", "VALS", "VALU", "VALX", "VIN", "VINS", "VLC", "VLSU", "WAD", "WADB", "WADJ", "WADM", "WADS", "WADX", "WALL", "WALLA", "WEIR", "WHRF", "WHRL", "WLL", "WLLQ", "WLLS", "WRCK", "WTLD", "WTLDI", "WTRC", "WTRH", "WTRW", "ZOO", "AIRG", "AIRT", "AQC", "FYT", "LNDF", "PSN", "STMGS", "SUBS", "SUBW", "SWT", "TRANT", "PPLF", "PPLCH", "PPLH", "UFHU", "MLWND", "MLWTR", "MN", "MNA", "MNAU", "MNC", "MNCR", "MNCU", "MND", "MNDT", "MNDU", "MNFE", "MNMT", "MNN", "MNNI", "MNPB", "MNPL", "MNQ", "MNQR", "MNSN", "MOLE", "MOOR", "MOTU", "MRN", "MRSH", "MRSHN", "MSTY", "MT", "MTS", "MTSU", "MTU", "MVA", "NKM", "NRWS", "NSY", "NTK", "NTKS", "NVB", "OAS", "OBPT", "OBS", "OBSR", "OCH", "OCN", "OILF", "OILJ", "OILP", "OILQ", "OILR", "OILT", "OILW", "PAL", "PAN", "PANS", "PASS", "PEN", "PENX", "PGDA", "PIER", "PK", "PKLT", "PKS", "PKSU", "PKU", "PLAT", "PLATX", "PLDR", "PLFU", "PLN", "PLNU", "PLNX", "PLTU", "PMPO", "PMPW", "PND", "PNDI", "PNDN", "PNDNI", "PNDS", "PNDSF", "PNDSI", "PNDSN", "PNLU", "POOL", "POOLI", "PP", "PPLC", "PRK", "PRMN", "PRN", "PRNJ", "PRNQ", "PROM", "PRSH", "PRT", "PRVU", "PS", "PSH", "PSTB", "PSTC", "PSTP", "PT", "PTGE", "PTS", "PYR", "PYRS", "QCKS", "QUAY", "RAVU", "RCH", "RD", "RDA", "RDB", "RDCUT", "RDGB", "RDGE", "RDGG", "RDGU", "RDJCT", "RDST", "RDSU", "REG", "RES", "RESA", "RESF", "RESH", "RESN", "RESP", "RESV", "RESW", "RF", "RFC", "RFSU", "RFU", "RFX", "RGNE", "RGNL", "RHSE", "RISU", "RJCT", "RK", "RKFL", "RKRY", "RKS", "RLG", "RLGR", "RMPU", "RNCH", "RNGA", "RNGU", "RPDS", "RR", "RRQ", "RSD", "RSGNL", "AGRC", "AGRF", "AIRB", "AIRF", "AIRH", "AIRP", "AIRQ", "AIRS", "AMTH", "ANCH", "ANS", "ARCH", "ARCU", "ASPH", "ASTR", "ASYL", "ATOL", "BAR", "BAY", "BAYS", "BCH", "BCHS", "BCN", "BDG", "BDGQ", "BDLD", "BDLU", "BGHT", "BKSU", "BLDR", "BLHL", "BNCH", "BNCU", "BNK", "BNKR", "BNKU", "BNKX", "BOG", "BP", "BRKS", "BRKW", "BSND", "BSNP", "BSNU", "BTL", "BTYD", "BUR", "BUSH", "CAPE", "CARN", "CAVE", "CFT", "CHN", "CHNL", "CHNM", "CHNN", "CLF", "CLG", "CMN", "CMP", "CMPL", "CMPLA", "CMPMN", "CMPO", "CMPQ", "CMPRF", "CMTY", "CNFL", "CNL", "CNLA", "CNLB", "CNLD", "CNLI", "CNLN", "CNLQ", "CNLSB", "CNLX", "CNSU", "CNYN", "CNYU", "COLF", "COMC", "CONE", "COVE", "CRDR", "CRKT", "CRNT", "CRRL", "CRSU", "CRTR", "CSNO", "CST", "CSTL", "CSTM", "CSWY", "CSWYQ", "CTRA", "CTRR", "CTRS", "CULT", "CVNT", "DAM", "DAMQ", "DAMSB", "DARY", "DCK", "DCKB", "DCKD", "DCKY", "DEPU", "DIKE", "DLTA", "DPOF", "DPR", "DSRT", "DTCH", "DTCHD", "DTCHI", "DUNE", "DVD", "ERG", "EST", "ESTB", "ESTC", "ESTO", "ESTR", "ESTSG", "ESTSL", "ESTT", "ESTX", "ESTY", "FISH" };
  423:  
  424:             // below: this is a list of all features
  425:             List<string> list = new List<string> { "ADM1", "ADM1H", "ADM2", "ADM2H", "ADM3", "ADM3H", "ADM4", "ADM4H", "ADMD", "ADMDH", "ADMF", "ADMS", "AGRC", "AGRF", "AIRB", "AIRF", "AIRG", "AIRH", "AIRP", "AIRQ", "AIRS", "AIRT", "AMTH", "ANCH", "ANS", "APNU", "AQC", "ARCH", "ARCU", "AREA", "ARRU", "ASPH", "ASTR", "ASYL", "ATHF", "ATOL", "BAN", "BAR", "BAY", "BAYS", "BCH", "BCHS", "BCN", "BDG", "BDGQ", "BDLD", "BDLU", "BGHT", "BKSU", "BLDA", "BLDG", "BLDO", "BLDR", "BLHL", "BLOW", "BNCH", "BNCU", "BNK", "BNKR", "BNKU", "BNKX", "BOG", "BP", "BRKS", "BRKW", "BSND", "BSNP", "BSNU", "BSTN", "BTL", "BTYD", "BUR", "BUSH", "BUTE", "CAPE", "CAPG", "CARN", "CAVE", "CDAU", "CFT", "CH", "CHN", "CHNL", "CHNM", "CHNN", "CLDA", "CLF", "CLG", "CMN", "CMP", "CMPL", "CMPLA", "CMPMN", "CMPO", "CMPQ", "CMPRF", "CMTY", "CNFL", "CNL", "CNLA", "CNLB", "CNLD", "CNLI", "CNLN", "CNLQ", "CNLSB", "CNLX", "CNS", "CNSU", "CNYN", "CNYU", "COLF", "COMC", "CONE", "COVE", "CRDR", "CRKT", "CRNT", "CRQ", "CRQS", "CRRL", "CRSU", "CRTR", "CSNO", "CST", "CSTL", "CSTM", "CSWY", "CSWYQ", "CTHSE", "CTRA", "CTRB", "CTRCM", "CTRF", "CTRM", "CTRR", "CTRS", "CUET", "CULT", "CUTF", "CVNT", "DAM", "DAMQ", "DAMSB", "DARY", "DCK", "DCKB", "DCKD", "DCKY", "DEPU", "DEVH", "DIKE", "DIP", "DLTA", "DOMG", "DPOF", "DPR", "DPRG", "DSRT", "DTCH", "DTCHD", "DTCHI", "DTCHM", "DUNE", "DVD", "EDGU", "ERG", "ESCU", "EST", "ESTB", "ESTC", "ESTO", "ESTR", "ESTSG", "ESTSL", "ESTT", "ESTX", "ESTY", "FAN", "FANU", "FCL", "FIRE", "FISH", "FJD", "FJDS", "FLD", "FLDI", "FLLS", "FLLSX", "FLTM", "FLTT", "FLTU", "FNDY", "FORD", "FRKU", "FRM", "FRMQ", "FRMS", "FRMT", "FRST", "FRSTF", "FRSU", "FRZU", "FSR", "FT", "FURU", "FY", "FYT", "GAP", "GAPU", "GARG", "GASF", "GATE", "GDN", "GHAT", "GHSE", "GLCR", "GLYU", "GOSP", "GOVL", "GRAZ", "GRGE", "GRSLD", "GRVC", "GRVE", "GRVO", "GRVP", "GRVPN", "GULF", "GVL", "GYSR", "HBR", "HBRX", "HDLD", "HERM", "HLL", "HLLS", "HLLU", "HLSU", "HLT", "HMCK", "HMDA", "HMSD", "HOLU", "HSE", "HSEC", "HSP", "HSPC", "HSPD", "HSPL", "HSTS", "HTH", "HTL", "HUT", "HUTS", "INDS", "INLT", "INLTQ", "INSM", "INTF", "ISL", "ISLF", "ISLM", "ISLS", "ISLT", "ISLX", "ISTH", "ITTR", "JTY", "KNLU", "KNSU", "KRST", "LAND", "LAVA", "LBED", "LCTY", "LDGU", "LDNG", "LEPC", "LEV", "LEVU", "LGN", "LGNS", "LGNX", "LK", "LKC", "LKI", "LKN", "LKNI", "LKO", "LKOI", "LKS", "LKSB", "LKSC", "LKSI", "LKSN", "LKSNI", "LKX", "LNDF", "LOCK", "LTER", "LTHSE", "MAR", "MDVU", "MDW", "MESA", "MESU", "MFG", "MFGB", "MFGC", "MFGCU", "MFGLM", "MFGM", "MFGN", "MFGPH", "MFGQ", "MFGSG", "MGV", "MILB", "MKT", "ML", "MLM", "MLO", "MLSG", "MLSGQ", "MLSW", "MLWND", "MLWTR", "MN", "MNA", "MNAU", "MNC", "MNCR", "MNCU", "MND", "MNDT", "MNDU", "MNFE", "MNMT", "MNN", "MNNI", "MNPB", "MNPL", "MNQ", "MNQR", "MNSN", "MOLE", "MOOR", "MOTU", "MRN", "MRSH", "MRSHN", "MSQE", "MSSN", "MSSNQ", "MSTY", "MT", "MTS", "MTSU", "MTU", "MUS", "MVA", "NKM", "NOV", "NRWS", "NSY", "NTK", "NTKS", "NVB", "OAS", "OBPT", "OBS", "OBSR", "OCH", "OCN", "OILF", "OILJ", "OILP", "OILQ", "OILR", "OILT", "OILW", "OVF", "PAL", "PAN", "PANS", "PASS", "PCL", "PCLD", "PCLF", "PCLH", "PCLI", "PCLIX", "PCLS", "PEAT", "PEN", "PENX", "PGDA", "PIER", "PK", "PKLT", "PKS", "PKSU", "PKU", "PLAT", "PLATX", "PLDR", "PLFU", "PLN", "PLNU", "PLNX", "PLTU", "PMPO", "PMPW", "PND", "PNDI", "PNDN", "PNDNI", "PNDS", "PNDSF", "PNDSI", "PNDSN", "PNLU", "PO", "POOL", "POOLI", "PP", "PPL", "PPLA", "PPLA2", "PPLA3", "PPLA4", "PPLC", "PPLCH", "PPLF", "PPLH", "PPLL", "PPLQ", "PPLR", "PPLS", "PPLW", "PPLX", "PPQ", "PRK", "PRKGT", "PRKHQ", "PRMN", "PRN", "PRNJ", "PRNQ", "PROM", "PRSH", "PRT", "PRVU", "PS", "PSH", "PSN", "PSTB", "PSTC", "PSTP", "PT", "PTGE", "PTS", "PYR", "PYRS", "QCKS", "QUAY", "RAVU", "RCH", "RD", "RDA", "RDB", "RDCR", "RDCUT", "RDGB", "RDGE", "RDGG", "RDGU", "RDIN", "RDJCT", "RDST", "RDSU", "RECG", "RECR", "REG", "REP", "RES", "RESA", "RESF", "RESH", "RESN", "RESP", "RESV", "RESW", "RET", "RF", "RFC", "RFSU", "RFU", "RFX", "RGN", "RGNE", "RGNL", "RHSE", "RISU", "RJCT", "RK", "RKFL", "RKRY", "RKS", "RLG", "RLGR", "RMPU", "RNCH", "RNGA", "RNGU", "RPDS", "RR", "RRQ", "RSD", "RSGNL", "RSRT", "RSTN", "RSTNQ", "RSTP", "RSTPQ", "RSV", "RSVI", "RSVT", "RTE", "RUIN", "RVN", "RYD", "SALT", "SAND", "SBED", "SBKH", "SCH", "SCHA", "SCHC", "SCHM", "SCHN", "SCHT", "SCNU", "SCRB", "SCRP", "SCSU", "SD", "SDL", "SDLU", "SEA", "SHFU", "SHLU", "SHOL", "SHOPC", "SHOR", "SHPF", "SHRN", "SHSE", "SHSU", "SHVU", "SILL", "SILU", "SINK", "SLCE", "SLID", "SLP", "SLPU", "SMSU", "SMU", "SNOW", "SNTR", "SPA", "SPIT", "SPLY", "SPNG", "SPNS", "SPNT", "SPRU", "SPUR", "SQR", "ST", "STBL", "STDM", "STKR", "STLMT", "STM", "STMA", "STMB", "STMC", "STMD", "STMGS", "STMH", "STMI", "STMIX", "STMM", "STMQ", "STMS", "STMSB", "STMX", "STNB", "STNC", "STNE", "STNF", "STNI", "STNM", "STNR", "STNS", "STNW", "STPS", "STRT", "SUBS", "SUBW", "SWMP", "SWT", "SYSI", "TAL", "TERR", "TERU", "TMB", "TMPL", "TMSU", "TMTU", "TNGU", "TNKD", "TNL", "TNLC", "TNLN", "TNLRD", "TNLRR", "TNLS", "TOLL", "TOWR", "TRANT", "TRB", "TREE", "TRGD", "TRGU", "TRIG", "TRL", "TRMO", "TRNU", "TRR", "TUND", "UFHU", "UPLD", "USGE", "VAL", "VALG", "VALS", "VALU", "VALX", "VETF", "VIN", "VINS", "VLC", "VLSU", "WAD", "WADB", "WADJ", "WADM", "WADS", "WADX", "WALL", "WALLA", "WEIR", "WHRF", "WHRL", "WLL", "WLLQ", "WLLS", "WRCK", "WTLD", "WTLDI", "WTRC", "WTRH", "WTRW", "ZN", "ZNB", "ZNF", "ZOO" };
  426:  
  427:             return list;
  428:         }
  429:  
  430:         ////////////////////////////////////////////////////////////////////////////
  431:  
  432:         /// <summary>
  433:         ///
  434:         /// </summary>
  435:         public static void DownloadAndExtractNgaGnsNamedCountryZipFile(string countryName, out string temporaryPathZipFileExtractDirectory)
  436:         {
  437:             var temporaryPathZipFile = Ia.TentPlay.Cl.Model.Business.Trek.Default.ApplicationTempDataDirectory + countryName + ".zip";
  438:             temporaryPathZipFileExtractDirectory = Ia.TentPlay.Cl.Model.Business.Trek.Default.ApplicationTempDataDirectory + countryName + " " + Ia.Cl.Model.Default.RandomNumber(4);
  439:  
  440:             var url = ngaGnsCountryZipFileHttpsLocation + "/" + Ia.TentPlay.Cl.Model.Business.Trek.Default.MappingOfCountryNameToNgaGnsZipFileName(countryName) + ".zip";
  441:  
  442:             if (Ia.Cl.Model.Default.DownloadFile(url, temporaryPathZipFile))
  443:             {
  444:                 System.IO.Compression.ZipFile.ExtractToDirectory(temporaryPathZipFile, temporaryPathZipFileExtractDirectory);
  445:             }
  446:  
  447:             File.Delete(temporaryPathZipFile);
  448:         }
  449:  
  450:         ////////////////////////////////////////////////////////////////////////////
  451:  
  452:         /// <summary>
  453:         ///
  454:         /// </summary>
  455:         public static string CountryUrl(string iso3)
  456:         {
  457:             return "~/trek/country.aspx?iso3=" + HttpUtility.UrlEncode(iso3);
  458:         }
  459:  
  460:         ////////////////////////////////////////////////////////////////////////////
  461:  
  462:         /// <summary>
  463:         ///
  464:         /// </summary>
  465:         public static string MappingOfCountryNameToNgaGnsZipFileName(string countryName)
  466:         {
  467:             string countryNgaGnsZipFileName;
  468:  
  469:             if (countryName == "Bahamas") countryNgaGnsZipFileName = "Bahamas-The";
  470:             else if (countryName == "Cape Verde") countryNgaGnsZipFileName = "Cabo Verde";
  471:             else countryNgaGnsZipFileName = countryName;
  472:  
  473:             return countryNgaGnsZipFileName;
  474:         }
  475:  
  476:         ////////////////////////////////////////////////////////////////////////////
  477:         ////////////////////////////////////////////////////////////////////////////
  478:     }
  479:  
  480:     ////////////////////////////////////////////////////////////////////////////
  481:     ////////////////////////////////////////////////////////////////////////////
  482: }