Example #1
0
 public Adres(int id, Straatnaam straat, string appartementnummer, string busnummer, string huisnummer, string huisnummerlabel, Gemeente gemeente)
 {
     ID                = id;
     Straat            = straat;
     Appartementnummer = appartementnummer;
     Busnummer         = busnummer;
     Huisnummer        = huisnummer;
     Huisnummerlabel   = huisnummerlabel;
     //Gemeente = gemeente;
     Postcode = 0;
 }
Example #2
0
 public Adres(int id, Straatnaam straat, string appartementnummer, string busnummer, string huisnummer, string huisnummerlabel, Gemeente gemeente, int postcode, double x, double y)
 {
     ID                = id;
     Straat            = straat;
     Appartementnummer = appartementnummer;
     Busnummer         = busnummer;
     Huisnummer        = huisnummer;
     Huisnummerlabel   = huisnummerlabel;
     //Gemeente = gemeente;
     Postcode = postcode;
     Locatie  = new AdresLocatie(x, y);
 }
Example #3
0
 public Straatnaam(int id, string straatnaam2, Gemeente gemeente)
 {
     ID         = id;
     straatnaam = straatnaam2;
     Gemeente   = gemeente;
 }
Example #4
0
 public Adres(int id, Straatnaam straatnaam, String appNumber, String busNumber, String number, String numberLabel, Gemeente gemeente, int postcode, double x, double y)
 {
     this.ID          = id;
     this.AppNumber   = appNumber;
     this.BusNumber   = busNumber;
     this.Number      = number;
     this.NumberLabel = numberLabel;
     this.Straatnaam  = straatnaam;
     this.PostCode    = postcode;
     this.Gemeente    = gemeente;
     this.addLocation(x, y);
 }
Example #5
0
        public static void buildObject(List <String> lines)
        {
            Dictionary <String, String> data = new Dictionary <String, String>();

            foreach (String line in lines)
            {
                // Collect data
                if (line.Contains(":ID>"))
                {
                    data.Add("ID", cleanObject(line));
                }

                if (line.Contains(":STRAATNMID"))
                {
                    data.Add("STRAATNMID", cleanObject(line));
                }

                if (line.Contains(":STRAATNM>"))
                {
                    data.Add("STRAATNM", cleanObject(line));
                }

                if (line.Contains(":HUISNR"))
                {
                    data.Add("HUISNR", cleanObject(line));
                }

                if (line.Contains(":APPTNR"))
                {
                    data.Add("APPTNR", cleanObject(line));
                }

                if (line.Contains(":BUSNR"))
                {
                    data.Add("BUSNR", cleanObject(line));
                }

                if (line.Contains(":HNRLABEL"))
                {
                    data.Add("HNRLABEL", cleanObject(line));
                }

                if (line.Contains(":NISCODE"))
                {
                    data.Add("NISCODE", cleanObject(line));
                }

                if (line.Contains(":GEMEENTE"))
                {
                    data.Add("GEMEENTE", cleanObject(line));
                }

                if (line.Contains(":POSTCODE"))
                {
                    data.Add("POSTCODE", cleanObject(line));
                }

                if (line.Contains(":HERKOMST"))
                {
                    data.Add("HERKOMST", cleanObject(line));
                }

                if (line.Contains(":X>"))
                {
                    data.Add("X", cleanObject(line));
                }

                if (line.Contains(":Y>"))
                {
                    data.Add("Y", cleanObject(line));
                }
            }

            // Build classes
            if (!cities.ContainsKey(Int32.Parse(data["NISCODE"])))
            {
                Gemeente temp = new Gemeente(Int32.Parse(data["NISCODE"]), data["GEMEENTE"]);
                cities.Add(Int32.Parse(data["NISCODE"]), temp);
            }

            if (!streets.ContainsKey(Int32.Parse(data["STRAATNMID"])))
            {
                Straatnaam temp = new Straatnaam(Int32.Parse(data["STRAATNMID"]), data["STRAATNM"], cities[Int32.Parse(data["NISCODE"])]);
                streets.Add(Int32.Parse(data["STRAATNMID"]), temp);
            }

            Adres adres = new Adres(Int32.Parse(data["ID"]), streets[Int32.Parse(data["STRAATNMID"])], data["APPTNR"], data["BUSNR"], data["HUISNR"], data["HNRLABEL"], cities[Int32.Parse(data["NISCODE"])], Int32.Parse(data["POSTCODE"]), Double.Parse(data["X"]), Double.Parse(data["Y"]));

            addCache.Add(Int32.Parse(data["ID"]), adres);
            // Add id to list
            addIds.Add(Int32.Parse(data["ID"]));

            List <int> tempCache = new List <int>(cacheDone);

            foreach (int key in tempCache)
            {
                addCache.Remove(key);
                cacheDone.Remove(key);
            }
        }
Example #6
0
 public Straatnaam(int ID, String straatnaam, Gemeente gemeente)
 {
     this.ID         = ID;
     this.Streetname = straatnaam;
     this.Gemeente   = gemeente;
 }