public void debugCategories(String input, StreamWriter file, ArrayList categoriesManquantes) { Boolean exists = false; for (int i = 0; i < this.categories.Count; i++) { ItemCategorie categorie = (ItemCategorie)this.categories[i]; for (int j = 0; j < categorie.motsCategorie.Length; j++) { if (input.Equals(categorie.motsCategorie[j])) { exists = true; break; } } if (exists) { break; } } if (!exists) { exists = checkIfThere(input, categoriesManquantes); if (!exists) { file.WriteLine(input); } } }
public void checkCategories(String input, ArrayList listeCategories) { for (int i = 0; i < this.categories.Count; i++) { ItemCategorie categorie = (ItemCategorie)this.categories[i]; for (int j = 0; j < categorie.motsCategorie.Length; j++) { if (input.Equals(categorie.motsCategorie[j])) { addIfNotThere(categorie.nomCategorie, listeCategories); addIfNotThere(categorie.categorieParent, listeCategories); } else if (input.Equals(categorie.nomCategorie)) { addIfNotThere(categorie.nomCategorie, listeCategories); addIfNotThere(categorie.categorieParent, listeCategories); } } } }
public static String getCategoryContext(String category, CatConversionList conversionList) { ArrayList categoryList = conversionList.categories; for (int i = 0; i < categoryList.Count; i++) { ItemCategorie categoryCheck = (ItemCategorie)categoryList[i]; if (category.Equals(categoryCheck.nomCategorie)) { if (categoryCheck.categorieContext.Equals("")) { return(getCategoryContext(categoryCheck.categorieParent, conversionList)); } else { return(categoryCheck.categorieContext); } } } return("N/A"); }