/// <summary> /// 2013a: prvenstveno je napravljeno za jednokratnu upotrebu, možda se upotrebi za eksportovanje različitog znanja sa veba /// </summary> public static void rebuildKnowledge() { imbDomainManager.afterLoad(); foreach (KeyValuePair <string, imbTopLevelDomain> item in imbDomainManager.DomainDictionary) { systemKnowledge.topLevelDomains.Add(item.Value); } foreach (imbWhoIsServer item in imbDomainManager.servers) { systemKnowledge.whoIsServers.Add(item); } foreach (imbTopLevelDomain tmpDomain in imbDomainManager.AllDomainsUnique) { imbCountryInfoEntry tmpEntry = new imbCountryInfoEntry(); tmpEntry.countryName = tmpDomain.countryName; tmpEntry.countryCode = tmpDomain.countryCode; systemKnowledge.countries.Add(tmpEntry); } foreach (KeyValuePair <string, imbCountryInfoEntry> pair in imbCountryInfoEngine.countryBase) { // systemKnowledge.countries.Add((imbCountryInfoEntry)pair.Value, pair.Key); } }
/// <summary> /// Izvrsava predmet Enginea /// </summary> /// <param name="itemToExecute"></param> public static imbCountryInfoEntry findCountry(String needle) { needle = needle.ToUpper().Trim(); //needle = imbData.imbFilterModuleWorks.imbFilterModuleEngine.filterString(needle, imbXCommand_FilterType.trimElements, "oL", "w"); imbCountryInfoEntry output = null; output = countryBase[needle]; if (output == null) { output = countryBasePerCode[needle]; } return(output); }