Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
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;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using System.Data;
   6:  using System.Collections;
   7:  using System.Xml;
   8:  using System.Xml.Linq;
   9:  using System.Text;
  10:  using System.Text.RegularExpressions;
  11:  using System.IO;
  12:  using System.Threading;
  13:  using System.Data.Entity;
  14:  using System.Data.Entity.Validation;
  15:  using System.ComponentModel.DataAnnotations;
  16:  using System.Configuration;
  17:  using Ionic.Zip;
  18:   
  19:  namespace Ia.TentPlay.Cl.Model.Business.Trek
  20:  {
  21:      ////////////////////////////////////////////////////////////////////////////
  22:   
  23:      /// <summary publish="true">
  24:      /// Support class for TentPlay Trek business model
  25:      /// </summary>
  26:      /// 
  27:      /// <remarks> 
  28:      /// Copyright © 2012-2015 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  29:      ///
  30:      /// 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
  31:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  32:      ///
  33:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  34:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  35:      /// 
  36:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  37:      /// 
  38:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  39:      /// </remarks> 
  40:      public class Default
  41:      {
  42:          private const string ngaGnsCountryZipFileFtpLocation = "ftp://ia.com.kw/tentplay.com/data/trek/nga/gns/country-files";
  43:          //private const string ngaGnsCountryZipFileFtpLocation = "ftp://iis/tentplay.com/data/trek/nga/gns/country-files";
  44:   
  45:          private const string originalImageFtpLocation = @"ftp://ia.com.kw/tentplay.com/data/trek/country/$applicationCountryIso2/images";
  46:          //private const string originalImageFtpLocation = @"ftp://iis/tentplay.com/data/trek/country/$applicationCountryIso2/images";
  47:   
  48:          private const string destinationImageFtpLocation = @"ftp://ia.com.kw/tentplay.com/data/trek/country/$applicationCountryIso2";
  49:          //private const string destinationImageFtpLocation = @"ftp://iis/tentplay.com/data/trek/country/$applicationCountryIso2";
  50:   
  51:          public const int MaximumNumberTakeOfElementsToDisplayInList = 100;
  52:          public const int MaximumNumberOfTrekToDisplayNearTheCapital = 999;
  53:   
  54:          public const int MaximumNumberOfFeaturesThatWouldAllowForAcceptableAppSizeInAndroidPlayStore = 200000;
  55:   
  56:          ////////////////////////////////////////////////////////////////////////////
  57:   
  58:          /// <summary>
  59:          ///
  60:          /// </summary>
  61:          public Default()
  62:          {
  63:          }
  64:   
  65:          ////////////////////////////////////////////////////////////////////////////
  66:   
  67:          /// <summary>
  68:          ///
  69:          /// </summary>
  70:          public static string FtpUser
  71:          {
  72:              get
  73:              {
  74:                  return ConfigurationManager.AppSettings["ftpUser"].ToString();
  75:              }
  76:          }
  77:   
  78:          ////////////////////////////////////////////////////////////////////////////
  79:   
  80:          /// <summary>
  81:          ///
  82:          /// </summary>
  83:          public static string FtpPassword
  84:          {
  85:              get
  86:              {
  87:                  return ConfigurationManager.AppSettings["ftpPassword"].ToString();
  88:              }
  89:          }
  90:   
  91:          ////////////////////////////////////////////////////////////////////////////
  92:   
  93:          /// <summary>
  94:          ///
  95:          /// </summary>
  96:          public static List<string> SearchSubstringList(string countryIso2, string name)
  97:          {
  98:              string substring;
  99:              string[] nameWordList;
 100:              Hashtable hashtable;
 101:              List<string> substringList;
 102:   
 103:              hashtable = new Hashtable();
 104:              substringList = new List<string>();
 105:   
 106:              nameWordList = Regex.Split(name, @"\W+");
 107:   
 108:              if (countryIso2 == "in" || countryIso2 == "us" || countryIso2 == "mx")
 109:              {
 110:                  //    fullTextSearchName:  f fr fra fran franc franci francis francisc francisco z za zar zarc zarco
 111:   
 112:                  foreach (string nameWord in nameWordList)
 113:                  {
 114:                      hashtable[nameWord] = 1;
 115:   
 116:                      for (int length = 1; length < nameWord.Length; length++)
 117:                      {
 118:                          substring = nameWord.Substring(0, length);
 119:   
 120:                          hashtable[substring] = 1;
 121:                      }
 122:                  }
 123:              }
 124:              else
 125:              {
 126:                  //    fullTextSearchName: a an ana anar anara ar ara e el l m ma man mana manar manara n na nar nara r ra ا ار ارة ال الم المن المنا المنار المنارة ة ر رة ل لم لمن لمنا لمنار لمنارة م من منا منار منارة ن نا نار نارة                 
 127:   
 128:                  foreach (string nameWord in nameWordList)
 129:                  {
 130:                      hashtable[nameWord] = 1;
 131:   
 132:                      for (int length = 1; length < nameWord.Length; length++)
 133:                      {
 134:                          for (int start = 0; start <= nameWord.Length - length; start++)
 135:                          {
 136:                              substring = nameWord.Substring(start, length);
 137:   
 138:                              hashtable[substring] = 1;
 139:                          }
 140:                      }
 141:                  }
 142:              }
 143:   
 144:              substringList = hashtable.Keys.Cast<string>().ToList();
 145:              substringList.Sort();
 146:   
 147:              return substringList;
 148:          }
 149:   
 150:          ////////////////////////////////////////////////////////////////////////////
 151:   
 152:          /// <summary>
 153:          ///
 154:          /// </summary>
 155:          public static void GenerateCSharpCodeToLinqQuery512BinaryToBooleanAndOrStringOfClassFeatures()
 156:          {
 157:              string b, s;
 158:              StringBuilder sb;
 159:   
 160:              sb = new StringBuilder();
 161:   
 162:              sb.AppendLine(@"// code below is generated by code in ca project");
 163:              sb.AppendLine(@"");
 164:   
 165:              for (int i = 0; i < 512; i++)
 166:              {
 167:                  b = Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass.ConvertIntegerToBinary(i);
 168:                  s = Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass.ConvertBinaryToBooleanAndOrStringOfClassFeatures(b);
 169:   
 170:                  sb.AppendLine(@"// integer: " + i + ", binary: " + b.PadLeft(9, '0') + ", string: " + s);
 171:   
 172:                  sb.AppendLine(@"item = (from ncw in featureList where " + s + @" orderby ncw.DistanceToCapital select ncw).ToList().Take(maximumNumberOfTrekToDisplayNearTheCapitalList).LastOrDefault();");
 173:                  sb.AppendLine(@"if (item != null) list.Add(item.DistanceToCapital);");
 174:                  sb.AppendLine(@"else list.Add(0);");
 175:   
 176:                  sb.AppendLine(@"");
 177:              }
 178:   
 179:              sb.AppendLine(@"// end of generated code");
 180:              sb.AppendLine(@"");
 181:   
 182:          }
 183:   
 184:          ////////////////////////////////////////////////////////////////////////////
 185:   
 186:          /// <summary>
 187:          ///
 188:          /// </summary>
 189:          public static string OriginalImageFtpLocation(string applicationCountryIso2)
 190:          {
 191:              return originalImageFtpLocation.Replace("$applicationCountryIso2", applicationCountryIso2);
 192:          }
 193:   
 194:          ////////////////////////////////////////////////////////////////////////////
 195:   
 196:          /// <summary>
 197:          ///
 198:          /// </summary>
 199:          public static string DestinationImageFtpLocation(string applicationCountryIso2)
 200:          {
 201:              return destinationImageFtpLocation.Replace("$applicationCountryIso2", applicationCountryIso2);
 202:          }
 203:   
 204:          ////////////////////////////////////////////////////////////////////////////
 205:   
 206:          /// <summary>
 207:          /// Define the SQLite database file name according to the country file name
 208:          /// </summary>
 209:          public static string SqliteDatabaseFileName(string applicationCountryIso2, string applicationCountryVersion)
 210:          {
 211:              return applicationCountryIso2 + "." + applicationCountryVersion + ".sqlite";
 212:          }
 213:   
 214:          ////////////////////////////////////////////////////////////////////////////
 215:   
 216:          /// <summary>
 217:          /// Define the SQLite database file password according to the country file name
 218:          /// Problem: I cant open an SQLite password protected database file on Android. I will remove the password locks.
 219:          /// </summary>
 220:          [Obsolete]
 221:          public static string _SqliteDatabaseFilePassword(string fileCountry)
 222:          {
 223:              return fileCountry + "000000";
 224:          }
 225:   
 226:          ////////////////////////////////////////////////////////////////////////////
 227:   
 228:          /// <summary>
 229:          /// 
 230:          /// </summary>
 231:          public static string SqliteDatabaseFileCreateFeatureDesignationTableString(bool createVirtualTable, List<Ia.Cl.Model.Language> countrySpokenLanguageList)
 232:          {
 233:              string sql, entryList, languageNameString;
 234:              string[] p;
 235:   
 236:              if (countrySpokenLanguageList.Count > 0)
 237:              {
 238:                  p = (from c in countrySpokenLanguageList select c.Symbol).ToArray();
 239:   
 240:                  if (p.Length == 1)
 241:                  {
 242:                      languageNameString = p[0] + " text";
 243:                  }
 244:                  else
 245:                  {
 246:                      languageNameString = string.Join(" text, ", p);
 247:                      languageNameString += " text";
 248:                  }
 249:              }
 250:              else
 251:              {
 252:                  languageNameString = "en text";
 253:              }
 254:   
 255:              languageNameString = Regex.Replace(languageNameString, @"\bis\b", "[is]");
 256:   
 257:              entryList = "_id text primary key, " + languageNameString + ", class text";
 258:   
 259:              if (createVirtualTable) sql = @"create virtual table featureDesignations using fts3(" + entryList + ")";
 260:              else sql = @"create table featureDesignations (" + entryList + ")";
 261:   
 262:              return sql;
 263:          }
 264:   
 265:          /*
 266:          ////////////////////////////////////////////////////////////////////////////
 267:  
 268:          /// <summary>
 269:          /// 
 270:          /// </summary>
 271:          public static List<string> SqliteDatabaseFileInsertListFeatureDesignationsTableListString
 272:          {
 273:              get
 274:              {
 275:                  int deleted;
 276:                  string sql, description, createdString, updatedString;
 277:                  Ia.Cl.Model.Result result;
 278:                  List<string> sqlList;
 279:                  List<Ia.TentPlay.Cl.Model.Trek.FeatureDesignation> featureDesignationsList;
 280:  
 281:                  sqlList = new List<string>();
 282:  
 283:                  using (var db = new Ia.TentPlay.Db.Trek())
 284:                  {
 285:                      featureDesignationsList = Ia.TentPlay.Cl.Model.Data.FeatureDesignation.List(out result);
 286:  
 287:                      if (!result.HasError)
 288:                      {
 289:                          foreach (Ia.TentPlay.Cl.Model.Trek.FeatureDesignation nfdc in featureDesignationsList)
 290:                          {
 291:                              // below: we make sure to change single ''' to "''" in description to store in SQLite
 292:                              description = string.IsNullOrEmpty(nfdc.Description) ? null: nfdc.Description.Replace("'", "''");
 293:  
 294:                              deleted = Convert.ToInt32(nfdc.Deleted);
 295:  
 296:                              createdString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(nfdc.Created);
 297:                              updatedString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(nfdc.Updated);
 298:  
 299:                              // for Andriod, the database tables should use the identifier _id for the primary key of the table. Several Android functions rely on this standard.
 300:                              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 + "')";
 301:  
 302:                              sqlList.Add(sql);
 303:                          }
 304:                      }
 305:                  }
 306:  
 307:                  return sqlList;
 308:              }
 309:          }
 310:          */
 311:   
 312:          ////////////////////////////////////////////////////////////////////////////
 313:   
 314:          /// <summary>
 315:          /// 
 316:          /// </summary>
 317:          public static string SqliteDatabaseFileCreateFeaturesTableString(bool createVirtualTable)
 318:          {
 319:              string sql, entryList;
 320:   
 321:              // for Andriod, the database tables should use the identifier _id for the primary key of the table. Several Android functions rely on this standard.
 322:              // note the "Designation_Id" because Designation is an EF entity represented here by text Designation_Id
 323:   
 324:              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)";
 325:   
 326:              if (createVirtualTable) sql = @"create virtual table featuresFts using fts3(" + entryList + ")";
 327:              else sql = @"create table features (" + entryList + ")";
 328:   
 329:              return sql;
 330:          }
 331:   
 332:          ////////////////////////////////////////////////////////////////////////////
 333:   
 334:          /// <summary>
 335:          /// 
 336:          /// </summary>
 337:          public static List<string> SqliteDatabaseFileInsertListSpecificFeaturesTableListString(string fileCountry)
 338:          {
 339:              int deleted;
 340:              string sql, name, noDiacriticLowerCaseName, nativeName, noDiacriticNativeName, fullTextSearchName, createdString, updatedString;
 341:              Ia.Cl.Model.Result result;
 342:              List<string> sqlList, searchSubstringList;
 343:              List<Ia.TentPlay.Cl.Model.Trek.Feature> featuresList;
 344:   
 345:              sqlList = new List<string>();
 346:   
 347:              using (var db = new Ia.TentPlay.Db.Trek())
 348:              {
 349:                  featuresList = Ia.TentPlay.Cl.Model.Data.Trek.Feature.List(fileCountry, out result);
 350:   
 351:                  if (!result.HasError)
 352:                  {
 353:                      foreach (Ia.TentPlay.Cl.Model.Trek.Feature ncw in featuresList)
 354:                      {
 355:                          // below: we make sure to change single ''' to "''" in name, noDiacriticLowerCaseName, nativeName, noDiacriticNativeName to store in SQLite
 356:                          name = (string.IsNullOrEmpty(ncw.Name)) ? null : ncw.Name.Replace("'", "''");
 357:                          noDiacriticLowerCaseName = (string.IsNullOrEmpty(ncw.NoDiacriticLowerCaseName)) ? null : ncw.NoDiacriticLowerCaseName.Replace("'", "''");
 358:                          nativeName = (string.IsNullOrEmpty(ncw.NativeName)) ? null : ncw.NativeName.Replace("'", "''");
 359:                          noDiacriticNativeName = (string.IsNullOrEmpty(ncw.NoDiacriticNativeName)) ? null : ncw.NoDiacriticNativeName.Replace("'", "''");
 360:   
 361:                          searchSubstringList = Ia.TentPlay.Cl.Model.Business.Trek.Default.SearchSubstringList(fileCountry, noDiacriticLowerCaseName + " " + noDiacriticNativeName);
 362:                          fullTextSearchName = string.Join(" ", searchSubstringList);
 363:   
 364:                          deleted = Convert.ToInt32(ncw.Deleted);
 365:   
 366:                          createdString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(ncw.Created);
 367:                          updatedString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(ncw.Updated);
 368:   
 369:                          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 + "')";
 370:                          //  deleted, created, updated,
 371:   
 372:                          sqlList.Add(sql);
 373:                      }
 374:                  }
 375:              }
 376:   
 377:              return sqlList;
 378:          }
 379:   
 380:          ////////////////////////////////////////////////////////////////////////////
 381:   
 382:          /// <summary>
 383:          ///
 384:          /// </summary>
 385:          public static List<string> AllowedFeatureDesignationList(string countryFeatureFileNameIso2)
 386:          {
 387:              List<string> fullVersion, liteVersion;
 388:   
 389:              liteVersion = LiteVersionAllowedFeatureDesignationList(countryFeatureFileNameIso2);
 390:              fullVersion = FullVersionAllowedFeatureDesignationList(countryFeatureFileNameIso2);
 391:   
 392:              return fullVersion.Union(liteVersion).ToList();
 393:          }
 394:   
 395:          ////////////////////////////////////////////////////////////////////////////
 396:   
 397:          /// <summary>
 398:          ///
 399:          /// </summary>
 400:          public static List<string> LiteVersionAllowedFeatureDesignationList(string countryFeatureFileNameIso2)
 401:          {
 402:              //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" };
 403:   
 404:              // below: this is a list of all features
 405:              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" };
 406:   
 407:              return list;
 408:          }
 409:   
 410:          ////////////////////////////////////////////////////////////////////////////
 411:   
 412:          /// <summary>
 413:          ///
 414:          /// </summary>
 415:          public static List<string> FullVersionAllowedFeatureDesignationList(string countryFeatureFileNameIso2)
 416:          {
 417:              //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" };
 418:   
 419:              // below: this is a list of all features
 420:              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" };
 421:   
 422:              return list;
 423:          }
 424:   
 425:          ////////////////////////////////////////////////////////////////////////////
 426:   
 427:          /// <summary>
 428:          ///
 429:          /// </summary>
 430:          public static void DownloadNgaGnsCountryZipFileAndExtractAndSaveIt(string countryFeatureFips, out string extractedFile)
 431:          {
 432:              string url, temporaryFile;
 433:   
 434:              extractedFile = null;
 435:              temporaryFile = Ia.Cl.Model.Default.AbsoluteTempPath() + DateTime.UtcNow.AddHours(3).Ticks + ".zip";
 436:              url = ngaGnsCountryZipFileFtpLocation + "/" + countryFeatureFips + ".zip";
 437:   
 438:              if (Ia.Cl.Model.Default.DownloadFile(url, temporaryFile))
 439:              {
 440:                  using (ZipFile zf = ZipFile.Read(temporaryFile))
 441:                  {
 442:                      // below: the ZIP file might have multiple files. For our purposes we will look for the file inside the ZIP that has the same name as the *.zip file
 443:   
 444:                      foreach (ZipEntry ze in zf.Entries)
 445:                      {
 446:                          if (ze.FileName.ToLower().Contains(countryFeatureFips))
 447:                          {
 448:                              ze.Extract(Ia.Cl.Model.Default.AbsoluteTempPath(), ExtractExistingFileAction.OverwriteSilently);
 449:   
 450:                              extractedFile = Ia.Cl.Model.Default.AbsoluteTempPath() + ze.FileName;
 451:   
 452:                              break;
 453:                          }
 454:                      }
 455:                  }
 456:   
 457:                  File.Delete(temporaryFile);
 458:              }
 459:              else
 460:              {
 461:   
 462:              }
 463:          }
 464:   
 465:          ////////////////////////////////////////////////////////////////////////////
 466:          ////////////////////////////////////////////////////////////////////////////
 467:      }
 468:   
 469:      ////////////////////////////////////////////////////////////////////////////
 470:      ////////////////////////////////////////////////////////////////////////////
 471:  }