From a021dc2fc01dca7f1ce3819a496909c852659428 Mon Sep 17 00:00:00 2001 From: Woody Folsom Date: Fri, 9 Mar 2012 21:04:45 -0500 Subject: [PATCH] Now with a 22-recipe survey_dataset.xml. Unit test shows an example of checking that Honey cake contains gluten, eggs and spice but not red meat, shellfish or poultry. --- data/survey_dataset.xml | 2830 +++++++++++++++++ src/net/woodyfolsom/cs6601/p2/Ingredient.java | 21 + .../cs6601/p2/IngredientDivision.java | 33 + .../woodyfolsom/cs6601/p2/Ingredients.java | 55 + src/net/woodyfolsom/cs6601/p2/Recipe.java | 13 +- .../cs6601/p2/SurveyDatasetReaderTest.java | 36 + 6 files changed, 2978 insertions(+), 10 deletions(-) create mode 100644 data/survey_dataset.xml create mode 100644 src/net/woodyfolsom/cs6601/p2/IngredientDivision.java create mode 100644 src/net/woodyfolsom/cs6601/p2/Ingredients.java create mode 100644 test/net/woodyfolsom/cs6601/p2/SurveyDatasetReaderTest.java diff --git a/data/survey_dataset.xml b/data/survey_dataset.xml new file mode 100644 index 0000000..8179dba --- /dev/null +++ b/data/survey_dataset.xml @@ -0,0 +1,2830 @@ + + + + + Honey cake + + + Diabetic + Cakes + + 24servings + + + + + + + + + 3 + + + eggs + + + + + 0.25 + cup + + sugar + + + + + 0.25 + cup + + Soft margarine + + + + + 2.5 + cups + + flour + + + + + 1 + teaspoon + + baking powder + + + + + 1 + teaspoon + + baking soda + + + + + 0.5 + teaspoon + + ground cinnamon + + + + + 0.25 + teaspoon + + ground nutmeg + + + + + 0.125 + teaspoon + + ground cloves + + + + + 0.25 + cup + + honey + + + + + 1 + cup + + Cold strong coffee + + + + + 1 + + + Ripe banana + mashed + + + + Beat the eggs until thck. Ad the sugar gradually. Beat in the +margarine. +Stir the flour, Baking powder, soda, and spices together. Add +gradually to the creamed mixture with the honey and the coffee. Beat +until combined. Add the banana. Pour the batter into a lightly oiled +and floured 10 inch tube pan or two 9 inch loaf pans. Bake in a 350 +F oven for 45 to 50 minutes. Remove fro mthe oven and cool on a wire +rack for 5 minutes before removing frm the pan. Cool thoroughly +before slicing. Calories per serving (1/24 of recipe): 93 calories +Note: The honey cake has 1 tsp of sugar per serving. Source: The +American diabetes association cookbook + + + + + Kahlua Cake + + + Bundt + Alcohol + Desserts + Cakes + + 10servings + + + + + + + + MARIE BARANDICA GJJF24B + + + 0 + + + Chocolate Fudge cake w/puddi + + + + + 2 + + + eggs + + + + + 0.5 + cup + + Kahlua + or Amaretto + + + + 0.25 + cup + + oil + + + + + 1 + pint + + sour cream + + + + + 12 + ounces + + Chocolate chips (2 cups) + + + + + + Mix together and pour into Bundt pan that has been lightly greased. +Bake at 350 for 50 - 60 minutes until sides of cake begin to pull +away from pan. + + + + + Ice Cream, Lowfat + + + Sugar free + Low fat + Dessert + Diabetic + + 8servings + + + + + + + + INGREDIENTS + + + 8 + ounces + + Pet Lite Milk + + + + + 4 + packages + + Sugar Substitute + + + + + 1 + teaspoon + + vanilla + + + + + ADD: ONE OF THE FOLLOWING + + + 2 + + + Peach + peeled and diced + + + + 1 + + + Banana + mashed + + + + 4 + slices + + Pineapple with juice + + + + + 8 + ounces + + orange juice + + + + + 2 + cups + + Strawberries + crushed + + + + + Directions: Mix all together and put in freezer of refrigerator until +hardened. Remove - break up - put in blender and whip until creamy. +Serve. Can also be made in one of the small electric machines, or one +of those that goes in freezer. Calories: 75 cal. Exchanges: 1/2 Milk +and 1/2 Fruit + +From Files of A.Broaddus 6-24-93 From the files of Al Rice, North +PoleAlaska, Feb 1994 + + + + + Southwest Smoothie + + + Mexican + Fruits + Drinks + + 3servings + + + + + + + + + 0.5 + cup + + Banana + sliced + + + + 0.5 + cup + + Mango + Papaya,Or Guava; * + + + + 2 + cups + + milk + + + + + 1 + tablespoon + + honey + + + + + * Fruit should be of one kind listed and be chopped. +~--------------------------------------------------------------------- +~-- Place all ingredients in food processor workbowl fitted with +steel blade or in blender container; cover and process on high speed +until smooth. Strain if using mango. + + + + + Margarita Sunrise + + + Mexican + Juices + Drinks + Fruits + Alcohol + + 6servings + + + + + + + + + 1 + each + + Lime + Cut Into Halves + + + + 1 + per serving + + Granulated sugar + + + + + 3 + cups + + Cracked Ice + + + + + 0.25 + cup + + powdered sugar + + + + + 1 + cup + + Tequila + + + + + 6 + ounces + + Frozen Orange Juice + * + + + + * Use 1 6-ounce can of thawed frozen concentrate. +~--------------------------------------------------------------------- +~-- Rub rims of 4 stemmed glasses with 1 line half; dip rims of +glasses in granulated sugar. Squeeze juice from both lime halves +into blender container. Add remaining ingredients. Cover and blend +on high speed until foamy. + + + + + Breaded Veal Cutlet ( Weinerschnitzel ) + + + Veal + Penndutch + + 1servings + + + + + + + + + 2 + pounds + + Veal steak + + + + + 0 + + + Salt & pepper + + + + + 0 + + + Crackers + crushed + + + + 0 + + + *OR: + + + + + 0 + + + bread crumbs + + + + + 1 + + + egg + beaten + + + + 0 + + + lemon juice + + + + + 0 + + + egg + fried + + + + Cut 2 pounds of veal steak, cut 1/2 inch thick, in pieces for serving. +Sprinkle with salt & pepper, dip in cracker or bread crumbs, then in +beaten egg, then again in crumbs. Let stand a few minutes then fry on +both sides. Sprinkle with lemon juice and garnish with a fried egg +per portion. + +Source: Pennsylvania Dutch Cook Book - Fine Old Recipes, Culinary +Arts Press, 1936. + + + + + Blender Double Fudge Cake + + + Cake + Nuts + Chocolate + + 10servings + + + + + + + + + 0.25 + cup + + Nuts + chopped (cinnamon or,if possible) + + + + 1 + + + egg + + + + + 3 + tablespoons + + shortening + thinly sliced + + + + 1 + cup + + milk + patty pan,crookneck or a mixtu,cut in pieces about + + + + 3 + ounces + + Unsweetened Chocolate + premelted envelopes + + + + 0.5 + teaspoon + + vanilla + peeled,seeded and chopped + + + + 1.25 + cups + + flour + + + + + 1.33333 + cups + + sugar + + + + + 1.25 + teaspoons + + baking powder + chopped + + + + 0.5 + teaspoon + + salt + + + + + 0.25 + teaspoon + + Soda + + + + + 0.5 + cup + + Semisweet chocolate pieces + + + + + Heat oven to 350~. Grease and flour baking pan, 9x9x2". Measure nuts +into b Set nuts aside. In order listed, measure remaining ingredients +except choco Blend 30 seconds on high speed, stopping blender +occasionally to scrape sid (Batter may be slightly lumpy). Pour +batter into pan. Bake about 35 minutes or until wooden pick inserted +in center comes out cle *To prepare cake with electric mixer, measure +all ingredients except nuts a **If using self-rising flour, omit +baking powder and salt. + + + + + Chinese: Cashew Chicken 1 + + + Cashews + Nuts + Chicken + Chinese + Main dish + + 4servings + + + + + + + + + 3 + per serving + + Chicken Breasts * + + + + + 0.5 + pound + + Chinese pea pods + + + + + 0.5 + pound + + mushrooms + + + + + 4 + per serving + + Green onions + + + + + 2 + cups + + Bamboo Shoots + drained + + + + 1 + cup + + Chicken broth ** + + + + + 0.25 + cup + + soy sauce + + + + + 2 + tablespoons + + corn starch + + + + + 0.5 + teaspoon + + sugar + + + + + 0.5 + teaspoon + + salt + + + + + 4 + tablespoons + + Salad oil + + + + + 1 + package + + Cashew nuts (about 4-oz) + + + + + * Boned and skinned ** Or bouillon cube dissolved in water + +Slice breasts horizontally into very thin slices and cut into inch +squares. Place on tray. Prepare vegetables, removing ends and strings +from pea pods, slicing mushrooms, green part of onions, and the +bamboo shoots. Add to tray. Mix soy sauce, cornstarch, sugar, and +salt. Heat 1 tbls of oil in skillet over moderate heat, add all the +nuts, and cook 1 min shaking the pan, toasting the nuts lightly. +Remove and reserve. Pour remaining oil in pan, fry chicken quickly, +turning often until it looks opaque. Lower heat to low. Add pea pods, +mushrooms, and broth. Cover and cook slowly for 2 mins. Remove cover, +add soy sauce mixture, bamboo shoots, and cook until thickened, +stirring constantly. Simmer uncovered a bit more and add green onions +and nuts and serve immediately. + + + + + Bayou Shrimp Creole + + + Cajun + Shellfish + Main dish + + 16servings + + + + + + + + + 1 + cup + + Salad oil + + + + + 1 + + + Stalk Celery + diced + + + + 5 + cups + + onions + sliced + + + + 1 + cup + + Chili sauce + + + + + 1 + teaspoon + + Curry Powder + + + + + 3 + + + Lge. bay leaf + + + + + 2 + packages + + Frozen sliced okra + + + + + 2 + cans + + Tomatoes (#303) + + + + + 3 + large + + green peppers + sliced + + + + 1 + + + Stalk celery leaves + chopped + + + + 1 + teaspoon + + thyme + + + + + 0 + + + salt + red & black pepper + + + + 0.5 + cup + + chopped parsley + + + + + 5 + pounds + + Shrimp + cleaned & deveined + + + + Heat oil in lge. frying pan. Add green peppers, celery, celery +leaves and onions. Cook over low heat, stirring until vegetables are +eslightly softened. Add remaining ingredients except shrimp. Cover +and simmer for 1 hour, stirring occasionally. Refrigerate for 24 +hours. Add shrimp 1 hour before serving; heat thoroughly. Serve over +hot cooked rice. Courtesy Telephone Pioneers BillSpalding +*P CRBR 38 A + + + + + Crab Burgers + + + Seafood + Sandwiches + Main dish + Eggs + Cheese + + 4servings + + + + + + + + + 2 + each + + eggs + Lg,hard cooked + + + + 1 + cup + + Crab Meat + + + + + 1 + cup + + Cheddar + Md,grated + + + + 1 + each + + green onion + Md,diced + + + + 0.5 + cup + + mayonnaise + + + + + 1 + per serving + + Catsup Or BBQ Sauce + to taste + + + + 1 + dash + + celery salt + + + + + 1 + dash + + onion salt + + + + + 1 + dash + + garlic powder + + + + + 2 + tablespoons + + Sweet Pickle Juice + + + + + Mix the first 4 ingredients together. In a small bowl, combine the +rest of the ingredients and then add them to the crab mixture. Spread +on hamburger bun halves and broil until bubbly or slightly brown. +Serve hot. + + + + + Broiled Flounder + + + Fish + Cyberealm + Main dish + + 4servings + + + + + + + + + 4 + per serving + + Double Filets of Flounder + + + + + 2 + per serving + + eggs + separated + + + + 1 + pinch + + salt + pepper,Dry Mustard + + + + 1 + cup + + Peanut oil + + + + + 4 + tablespoons + + pickle relish + + + + + 1 + tablespoon + + parsley + chopped + + + + 1 + tablespoon + + lemon juice + + + + + 1 + dash + + Tobasco + + + + + 1) Place the egg yolks in a blender, food processor or deep bowl. + +2) Blend in the salt, pepper and mustard. If blending by hand, use a +small +whisk. + +3) If using the machine, pour the oil through the funnel in a thin, +steady +stream with the machine running. If mixing by hand, add oil a few +drops +at a time, beating well in between each addition. + +4) When half the oil has been added, the rest may be added in a thin +steady stream while beating constantly with a small whisk. + +5) Mix in the relish, parsley, lemon juice and tobasco. Beat the egg +whites until stiff but not dry and fold into the mayonnaise created +through step 4. + +6) Broil the fish about 2 inches from the heat source for about 6-10 +minutes, depending on the thickness of the filets. + +7) Spread the sauce over each filet and broil for 3-5 minutes longer, +or +until the sauce puffs and browns lightly. + +From the kitchen of Peggy and Bruce Travers, Cyberealm BBS +Watertown,NY 315-786-1120 + + + + + Coconut Beer Batter Shrimp + + + Fish + Nets + Appetizers + Cyberealm + + 8servings + + + + + + + + SEASONING MIX + + + 1 + tablespoon + + Cayenne pepper + + + + + 2.25 + teaspoons + + salt + + + + + 1.5 + teaspoons + + Sweet paprika + + + + + 1.5 + teaspoons + + black pepper + + + + + 1.25 + teaspoons + + garlic powder + + + + + 0.75 + teaspoon + + onion powder + + + + + 0.75 + teaspoon + + Dried Thyme + + + + + 0.75 + teaspoon + + dried oregano + + + + + FOR THE SHRIMP + + + 2 + + + eggs + + + + + 1.75 + cups + + flour + + + + + 0.75 + cup + + beer + + + + + 1 + tablespoon + + baking powder + + + + + 4 + + + Dozen medium shrimp + peeled and deveined,about 2 lbs. + + + + 0 + + + Vegetable Oil For Frying + + + + + 3 + cups + + Grated coconut (6 oz) + + + + + + 1. Thoroughly combine the ingredients for the seasoning mix in a +small bowl and set aside. + +2. Mix 1 1/4 cups of the flour, 2 tsps. of the seasoning mix, baking +powder, eggs, and beer together in a bowl, breaking up all lumps +until it is smooth. + +3. Combine the remaining flour with 1 1/2 tsps. of the seasoning mix +and set aside. Place the coconut in a separate bowl. + +4. Sprinkle both sides of the shrimps with the remaining seasoning +mix. Then hold shrimp by the tail, dredge in the flour mixture, shake +off excess, dip each in batter and allow excess to drip off. Coat +each shrimp with the coconut and place shrimp on a baking sheet. + +5. Heat deep fryer to 350. Drop each shrimp into the hot oil and cook +until golden brown about 1/2 to 1 minute on each side. Do not crowd +the fryer. + +6. Drain on paper towels and serve immediately. Wonderful with warm +orange marmalade. + +Source: Suzzi Tiernan, FIDO Cooking conference Typed for you by Linda +Fields, Cyberealm BBS Watertown NY 1993 + + + + + Coconut Fish Curry + + + Fish + Main dish + + 4servings + + + + + + + + + 650 + grams + + Thick white fish fillets + + + + + 2 + teaspoons + + lemon juice + + + + + 1 + teaspoon + + Cumin seeds + + + + + 0.5 + teaspoon + + Fennel seeds + + + + + 0.5 + cup + + Desiccated cocunt + + + + + 2 + + + Piece ginger chopped (2cm) + + + + + 2 + + + Dried chillies + soaked for + + + + 0 + + + 15 minutes in hot water + + + + + 2 + + + cloves garlic + + + + + 1 + medium + + onion + + + + + 0.75 + teaspoon + + turmeric + + + + + 2 + teaspoons + + Tamarind concentrate + + + + + 2 + tablespoons + + butter + + + + + 1.5 + cups + + water + + + + + 2 + tablespoons + + Chopped coriander + + + + + Preparation time: 20 minutes Cooking time: 12 minutes + +Cut across the fillets to make thick slices. Sprinkle with lemon +juice and set aside. Toast the cumin, fennel seeds and coconut in a +dry pan until lightly golden and aromatic. Grind to a powder in a +spice grinder. Grind the ginger, chillies, garlic and onion to a +paste and add the ground spices, turmeric and tamarind. Fry the +prepared seasoning paste in the butter for 1.5-2 minutes, stirring. +Add water and bring to boil. Simmer for 6 minutes. Add the fish with +half the coriander. Simmer gently until the fish is tender, about 6 +minutes. Serve with rice, garnishing with the remaining coriander. + + + + + Catalan Rice + + + Fish + Casserole + Main dish + Pork + Clams + + 6servings + + + + + + + + + 2.5 + cups + + Fish stock + + + + + 0.25 + teaspoon + + Saffron Threads + + + + + 0.25 + cup + + Dry white wine + + + + + 6 + tablespoons + + Lard + + + + + 0.5 + pound + + Chorizo + Sliced 1/4" + + + + 1.5 + pounds + + Pork Loin + 1" Cubes + + + + 1 + + + onion + thinly sliced + + + + 2 + + + Bell peppers + julienned + + + + 2 + + + tomatoes + peeled,seeded + + + + 3 + + + Large Squid + + + + + 2 + cups + + Long-Grained Rice + + + + + 0.75 + cup + + Blanched almonds + + + + + 0.333333 + cup + + Pine Nuts + + + + + 3 + + + garlic cloves + minced + + + + 1 + cup + + Artichoke hearts + drained + + + + 18 + + + Clams Or Mussels + scrubbed + + + + 0.5 + cup + + Peas + + + + + 0.25 + cup + + Pimientos + julienned + + + + 2 + tablespoons + + Fresh parsley + minced + + + + Clean squid and cut body sacs into rings. Cut tentacles in half. In +a small saucepan, bring stock to a bare simmer. Crush saffron and +combine it with wine in a small bowl. In a flameproof casserole or +paella pan, heat the lard over moderately high heat. Saute the +chorizo and pork, turning them until they are browned. Add the +onion, bell peppers, tomatoes, and squid and cook the mixture over +moderate heat, stirring, for 15 minutes. Stir in the rice and cook +for 1 minute, stirring. Stir in almonds, pine nuts, garlic, saffron +mixture, and artichoke hearts. Ladle in enough stock to just cover +the rice mixture. Bring to a boil and simmer it, covered, for 20 +minutes. Arrange the clams in the rice, add the peas, and simmer for +10-15 minutes, or until the rice is just tender and the clams open. +Discard any clams that do not open. Garnish with pimientos and +parsley. This is a recipe by Elizabeth David, appearing in an article +in 1972 by James Beard. It originated on Spain's Costa Brava. "not a +true paella, but it is quite good." A 1972 Gourmet Magazine Favorite. + + + + + Baked Steak And Lima Beans + + + Beef + + 8servings + + + + + + + + + 1 + pound + + Dry lima beans + + + + + 6 + cups + + water + + + + + 4 + each + + Slices bacon + + + + + 2 + pounds + + Round steak (cutin 1"stri + + + + + 18 + ounces + + (1 cn) tomato juice + + + + + 1 + tablespoon + + Packed brown sugar + + + + + 0.5 + teaspoon + + salt + or to taste + + + + 1 + teaspoon + + dry mustard + + + + + 0.5 + teaspoon + + black pepper + + + + + Rinse beans; add 6 cups of water. Bring to a boil; simmer 5 minutes. +Remove from heat; let stand, covered, 1 hour. Do not drain. After 1 +hour cover, simmer 30 minutes. In Dutch oven, cook bacon til crisp. +Drain, reserve drippings. Crumble bacon; set aside. Coat beef with +flour. Brown beef in hot drippings, pour off excess fat. Stir in +beans and onion. Combine toamto juice, brown sugar, salt, peper and +mustard. Pour over beans and beef mizture. Bake covered in 325 +degree F. oven til tender, about 1 1/2 to 2 hours. Serve hot topped +with crunbled bacon and grated cheese to taste. + + + + + Tabasco Classic - Perfect Seared Steaks **** + + + Tabasco + Hot + Barbecue + Beef + + 4servings + + + + + + + + + 4 + + + New York Strip Or: + + + + + 0 + + + Rib Eye Steaks + 2" Thick + + + + 2.66667 + teaspoons + + Tabasco Pepper Sauce + + + + + 0 + + + Freshly Cracked Black Pepper + + + + + 0 + + + salt + + + + + This is our favorite way to cook steaks outdoors on a charcoal grill, +and it works well with hamburgers, too. Start with a good "steak +fire" of white coals 3 to 4 inches below the grill. To test the +fire, put the palm of your hand just above the grill. If you can +keep it there only for as long as it takes to say "One thousand and +one," the fire is ready. +~--------------------------------------------------------------------- +~-- Place the steaks on a cutting board and, with the back of a +spoon, briskly rub about 1/3 teaspoon Tabasco sauce and some pepper +into both sides of each steak. Grill the steaks over a hot fire for +about 5 minutes on each side for medium-rare. + +To broil, preheat the broiler, place the seasoned steaks on an oiled +broiler rack, and cook 6 inches from the heat for 4 to 5 minutes on +each side for medium-rare. Add salt to taste. + +From: The Tabasco Cookbook. + + + + + Salisbury Steak with Mushroom Sauce + + + Hamburger + Stove top + Beef + + 1servings + + + + + + + + + 1 + pound + + Beef chuck + ground + + + + 0.25 + teaspoon + + pepper + + + + + 2 + tablespoons + + butter or margarine + + + + + 1 + teaspoon + + Curry Powder + + + + + 1 + + + Beef bouillon cube + + + + + 1 + teaspoon + + salt + + + + + 4 + ounces + + Canned mushrooms + drained + + + + 2 + tablespoons + + flour + + + + + 1 + cup + + water + + + + + Mix meat, salt and pepper and shape into 4 patties. Pan fry in +lightly greased skillet until of desired doneness. Remove from +skillet and keep hot. Cook mushrooms in butter for 2 - 3 minutes. +Blend in flour and curry powder. Add water and bouillon cube; cook +until smooth and thickened. Pour sauce over meat patties and serve at +once. + + + + + Meatless Loaf + + + Vegan + Vegetarian + + 4servings + + + + + + + + + 2 + tablespoons + + Sunflower or other veg. oil + + + + + 2 + medium + + onions + chopped + + + + 4.5 + ounces + + TVP granules + + + + + 1 + cup + + Hot water or vegetable stock + + + + + 1.5 + cups + + Breadcrumbs + + + + + 0.5 + tablespoon + + Mixed herbs (such as parsley + sage,rosemary and thyme) + + + + 1 + tablespoon + + freshly chopped parsley + + + + + 2 + + + garlic cloves + crushed + + + + 1 + + + Egg (or egg replacer) (beat egg if using) + + + + + 2 + tablespoons + + soy sauce + + + + + 0 + + + Salt and pepper to taste + + + + SAUCE + + + 32 + ounces + + Canned chopped tomatoes + + + + + 6 + ounces + + tomato paste + + + + + 0 + + + Salt and pepper to taste + + + + + + Preheat oven to 350 degrees. In a large saucepan, heat oil and saute +onions until lightly browned. Add the TVP mince, stir and cook for +two minutes. Pour the hot water or stock over the saute and simmer +for four minutes. + +In a separate bowl, mix the breadcrumbs, herbs and garlic together +with one cup cold water. Stir in the egg and leave to one side for +ten minutes. + +Combine the cooked TVP mince with the breadcrumbs mixture, then add +the soy sauce. Stir well and season to taste. Using your hands, +shape the mixture into an oval mound and place it in the center of a +large baking dish, leaving plenty of space all around for the tomato +sauce to run. + +Heat the tomatoes, tomato paste and seasoning in a small saucepan, +and pour over the loaf, then bake for one hour. Serves 6. + +JTK's notes: I usually add more herbs & chopped garlic, and saute +chopped vegetables like celery, carrots, and/or mushrooms after +onions are done but before adding TVP. Hot sauce is a good addition, +too, or other flavored sauce like veg. Worcestershire. The egg +replacer works fine --- not sure if it's even necessary. Also, I make +the tomato sauce differently (sometimes I use canned/jar or homemade +frozen sauce, and I prefer canned whole tomatoes, pureed, to +prechopped ones), but it doesn't matter much. I make breadcrumbs from +whatever bread is available, preferably wholewheat (lightly toasted +for dryness) --- doesn't matter much either. Cracker crumbs would +probably do as well, if you don't have bread around or a food +processor/blender. I've made 1.5x recipe into a single loaf OK, but +larger wouldn't work (would have to make separate loaves, if larger +quantities are desired) + +makes 1 loaf, approx. 6x10" (fits comfortably into a 9x13" pan with a +couple inches margin around for sauce --- see above). VEGAN/OVO. + +(orig. posted by Jean Reese, adapted from Veg. Times) + + + + + Black Bean Soup + + + Appetizers + Vegetarian + Soups + + 6servings + + + + + + + + + 1 + pound + + Black beans + soaked + + + + 8 + cups + + water + + + + + 2 + tablespoons + + salt + + + + + 1 + cup + + onion + chopped + + + + 1 + cup + + green pepper + chopped + + + + 1 + cup + + celery + chopped + + + + 1 + cup + + carrots + chopped + + + + 8 + tablespoons + + olive oil + + + + + 6 + + + garlic cloves + + + + + 1 + tablespoon + + cumin + + + + + 4 + teaspoons + + white vinegar + + + + + 1 + teaspoon + + soy sauce + + + + + Simmer beans in water till soft. + +Saute onions, pepper, celery & carrots in olive oil til the onions +turn golden brown. Add garlic, cumin, vinegar & soy sauce. Cook, +stirring for 3 minutes. + +Drain about 1/2 c water from beans & add it to the saute. Cook over +a low heat for 30 minutes. + +Combine vegetables with beans. Cook for another 30 minutes, adding +more water if necessary. + +Joel Rapp, "Mother Nature's Vegetarian Feasts" + + + + + Fava Bean Burgers + + + D/g + Boat + Burger + Vegetarian + Beans + + 7servings + + + + + + + + + 1 + cup + + Multi grain oats + + + + + 0.125 + cup + + Bran + + + + + 0.25 + cup + + Wheat germ + + + + + 0.333333 + cup + + Dry potato flakes + + + + + 0.75 + cup + + V-8 juice + + + + + 1 + + + egg + + + + + 1 + can + + Fava beans - 19 oz. drained + + + + + 1 + cup + + carrots + shredded + + + + 0.5 + cup + + onion + finely chopped + + + + 0.25 + cup + + green pepper + finely chopped + + + SPICES (REGULAR OPTION + + + 0.125 + teaspoon + + garlic powder + + + + + 0.125 + teaspoon + + white pepper + + + + + 0.25 + teaspoon + + oregano + + + + + 0.25 + teaspoon + + basil + + + + + 0.25 + teaspoon + + rosemary + + + + + 0.25 + teaspoon + + Ground sage + + + + + 4 + dashes + + Tabasco + + + + + + Place Oats, potato buds, bran, wheat germ in bowl and mix with the V +8. Let stand for 15 minutes. Stir in egg and spices. + +Drain Fava beans, place in small bowl and mash with a fork. + +Mix vegetables, oat mixture and beans in medium bowl until well +blended. + +Press firmly into 1/4 lb hamburger press. + +Lightly oil non stick fry pan and fry over med heat (325 if using +electric fry pan) for approximately 8 minutes per side or until +browned and crisp. + +Place on cake rack over cookie sheet and bake for 20-30 minutes so +inside of burger gets set. Or make thinner burgers. + +Cool, wrap individually, freeze. + +Spices can be changed to Cajun, Indian, Italian, Mexican + +Adapted from recipe of Elizabeth Rodier == Courtesy of Dale & Gail +Shipp, Columbia Md. == + + + + + Angel Hair Pesto Primavera + + + Vegetarian + Pasta + California + + 8servings + + + + + + + + + 8 + tablespoons + + olive oil + + + + + 1 + bunch + + Fresh basil + + + + + 0.25 + cup + + Pine Nuts + + + + + 4 + + + garlic cloves + + + + + 0 + + + Salt (to taste) + + + + + 0 + + + White pepper (to taste) + + + + + 3 + tablespoons + + butter + + + + + 2 + + + shallots + chopped + + + + 1 + tablespoon + + Fresh basil + chopped + + + + 1.5 + cups + + Broccoli (tiny florets) + + + + + 1.5 + cups + + carrots + julienned + + + + 1.5 + cups + + zucchini + julienned + + + + 1.5 + cups + + Snow peas + + + + + 2 + cups + + heavy cream + + + + + 32 + ounces + + Angel hair pasta cooked al dente + + + + + 0.5 + cup + + Parmesan + freshly grated + + + + In a food processor place the olive oil, the bunch of basil, pine +nuts, and garlic. Blend the ingredients together until a paste is +formed. Add the salt and white pepper, and stir them in. Set the +pesto aside. + +In a large skillet place the butter and heat it on medium high until +it has melted. Add the shallots, the 1 tablespoon of basil, +broccoli, carrots, zucchini, and snow peas. Saut� the vegetables for +3 to 4 minutes, or until they are cooked al dente. + +Add the heavy cream and stir it in. Bring the ingredients to a boil. +Add the cooked pasta and stir it in. Add the pesto to the angel hair +pasta and stir it in well. Season the dish with the salt and the +white pepper. + +On each of 4 individual serving plates place the pasta. Sprinkle the +Parmesan cheese on top. + +Source: La Rive Gauche - Palos Verdes Estates, California "Southern +California Beach Recipe" by Joan and Carl Stromquist ISBN: +0-9622807-3-9 Typed for you by Karen Mintzias + + + + + EGGPLANT LASAGNE + + + Vegan + Vegetarian + Pasta + Main dish + + 6servings + + + + + + + + + 1 + medium + + eggplant + + + + + 0.5 + + + lemon + juiced + + + + 0 + + + salt + + + + + 0.25 + cup + + Unbleached Flour + + + + + 0.25 + cup + + cornmeal + + + + + 0.5 + teaspoon + + oregano + + + + + 0.5 + teaspoon + + garlic powder + + + + + 0.125 + teaspoon + + black pepper + + + + + 2 + tablespoons + + oil + + + + RICOTTA-STYLE FILLING + + + 1.5 + pounds + + Firm tofu + + + + + 0.25 + cup + + lemon juice + + + + + 2 + teaspoons + + dried basil + -=OR=- + + + + 2 + tablespoons + + -Fresh chopped basil + + + + + 2 + teaspoons + + honey + + + + + 1 + teaspoon + + salt + + + + + 1 + + + garlic clove + + + + + 1.5 + cups + + tomato sauce + + + + + + Wash, peel and slice eggplant into 1/4" pieces. Spread slices out on +racks or paper towels, then sprinkle with lemon juice and salt. Let +stand 5-10 min then wipe off with paper towels. While eggplant is +standing, mix flour, cornmeal, oregano, garlic powder and black +pepper together in a bowl. Preheat oven to 350. Dredge eggplant +slices in flour-cornmeal mix. Lay on cookie sheet spread with the +oil. Oven-fry slices for 8-10 min on each side or until golden brown. + +Ricotta-Style Filling: While the eggplant slices are baking, prepare +the tofu filling. Process the tofu, lemon juice, basil, honey, salt +and garlic in food processor to a fine grainy texture like ricotta +cheese. + +Cover bottom of 8x8" pan with 1/3 of the tomato sauce. Use half the +oven fried eggplant slices to cover the bottom of the pan. Then +spread the tofu filling over, reserving 1/2 cup for the top. Next, +cover the tofu filling with the rest of the eggplant slices, and pour +the remaining tomato sauce over the top. Arrange reserved tofu mix in +small dollops over the top. Bake about 45 min or until dollops are +slightly browned. + +Makes 4 to 6 servings. per serving: Cal 318, Protein 17 g, Fat 12 g, +Carbs 36 g. + +FROM: MADELINE HIMY (NFBH49A) + + + \ No newline at end of file diff --git a/src/net/woodyfolsom/cs6601/p2/Ingredient.java b/src/net/woodyfolsom/cs6601/p2/Ingredient.java index d8a1fd2..b27da77 100644 --- a/src/net/woodyfolsom/cs6601/p2/Ingredient.java +++ b/src/net/woodyfolsom/cs6601/p2/Ingredient.java @@ -4,9 +4,30 @@ import com.thoughtworks.xstream.annotations.XStreamAlias; @XStreamAlias("ing") public class Ingredient { + public enum TYPE { ALCOHOL, DAIRY, EGGS, FISH, GLUTEN, GRAIN, NUTS, PORK, POULTRY, RED_MEAT, SHELLFISH, SPICE, SUGAR} + private String item; public String getItem() { return item; } + + public boolean isType(TYPE type) { + switch (type) { + case DAIRY : + return item.contains("margarine"); + case EGGS : + return item.equals("egg") || item.equals("eggs"); + case GLUTEN : + return item.contains("flour"); + case RED_MEAT : + return item.contains("beef"); + case SPICE : + return item.endsWith("cinnamon") || item.endsWith("nutmeg") || item.endsWith("cloves"); + case SUGAR : + return item.endsWith("sugar"); + default : //unknown ingredient, e.g. coffee, bananas, honey + return false; + } + } } diff --git a/src/net/woodyfolsom/cs6601/p2/IngredientDivision.java b/src/net/woodyfolsom/cs6601/p2/IngredientDivision.java new file mode 100644 index 0000000..cd50ea8 --- /dev/null +++ b/src/net/woodyfolsom/cs6601/p2/IngredientDivision.java @@ -0,0 +1,33 @@ +package net.woodyfolsom.cs6601.p2; + +import java.util.List; + +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamImplicit; + +@XStreamAlias("ing-div") +public class IngredientDivision { + @XStreamImplicit + private List ingredients; + private String title; + + public boolean contains(Ingredient.TYPE ingredientType) { + for (Ingredient ingredient : ingredients) { + if (ingredient.isType(ingredientType)) { + return true; + } + } + return false; + } + public Ingredient getIngredient(int index) { + return ingredients.get(index); + } + + public int getIngredientsSize() { + return ingredients.size(); + } + + public String getTitle() { + return title; + } +} diff --git a/src/net/woodyfolsom/cs6601/p2/Ingredients.java b/src/net/woodyfolsom/cs6601/p2/Ingredients.java new file mode 100644 index 0000000..077b569 --- /dev/null +++ b/src/net/woodyfolsom/cs6601/p2/Ingredients.java @@ -0,0 +1,55 @@ +package net.woodyfolsom.cs6601.p2; + +import java.util.ArrayList; +import java.util.List; + +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamImplicit; + +@XStreamAlias("ingredients") +public class Ingredients { + @XStreamImplicit + private List ingredients; + @XStreamImplicit + private List ingDivs; + + public boolean contains(Ingredient.TYPE ingredientType) { + for (Ingredient ingredient : ingredients) { + if (ingredient.isType(ingredientType)) { + return true; + } + } + for (IngredientDivision ingDiv : ingDivs) { + if (ingDiv.contains(ingredientType)) { + return true; + } + } + return false; + } + + public List getIngredients() { + return ingredients; + } + + public void setIngredients(List ingredients) { + this.ingredients = ingredients; + } + + public List getIngDivs() { + return ingDivs; + } + + private Object readResolve() { + if (ingDivs == null) { + ingDivs = new ArrayList(); + } + if (ingredients == null) { + ingredients = new ArrayList(); + } + return this; + } + + public void setIngDivs(List ingDivs) { + this.ingDivs = ingDivs; + } +} diff --git a/src/net/woodyfolsom/cs6601/p2/Recipe.java b/src/net/woodyfolsom/cs6601/p2/Recipe.java index 24d6182..fb1a655 100644 --- a/src/net/woodyfolsom/cs6601/p2/Recipe.java +++ b/src/net/woodyfolsom/cs6601/p2/Recipe.java @@ -1,24 +1,17 @@ package net.woodyfolsom.cs6601.p2; -import java.util.List; - import com.thoughtworks.xstream.annotations.XStreamAlias; @XStreamAlias("recipe") public class Recipe { - - private List ingredients; + private Ingredients ingredients; private RecipeHead head; public RecipeHead getHead() { return head; } - public Ingredient getIngredient(int index) { - return ingredients.get(index); - } - - public int getIngredientsSize() { - return ingredients.size(); + public Ingredients getIngredients() { + return ingredients; } } \ No newline at end of file diff --git a/test/net/woodyfolsom/cs6601/p2/SurveyDatasetReaderTest.java b/test/net/woodyfolsom/cs6601/p2/SurveyDatasetReaderTest.java new file mode 100644 index 0000000..7278b89 --- /dev/null +++ b/test/net/woodyfolsom/cs6601/p2/SurveyDatasetReaderTest.java @@ -0,0 +1,36 @@ +package net.woodyfolsom.cs6601.p2; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.hamcrest.CoreMatchers.*; + +import java.io.File; + +import net.woodyfolsom.cs6601.p2.Ingredient.TYPE; +import net.woodyfolsom.cs6601.p2.Recipe; +import net.woodyfolsom.cs6601.p2.RecipeBook; +import net.woodyfolsom.cs6601.p2.RecipeBookReader; + +import org.junit.Test; + +public class SurveyDatasetReaderTest { + + @Test + public void testReadSurveyDataset() { + RecipeBook recipeBook = RecipeBookReader.readRecipeBook(new File("data/survey_dataset.xml")); + assertNotNull(recipeBook); + assertThat(recipeBook.getSize(), is(equalTo(22))); + + Recipe recipe = recipeBook.getRecipe(0); + System.out.println(recipe.getHead().getTitle()); + assertThat(recipe.getHead().getTitle(), is(equalTo("Honey cake"))); + assertTrue(recipe.getIngredients().contains(TYPE.EGGS)); + assertTrue(recipe.getIngredients().contains(TYPE.GLUTEN)); + assertTrue(recipe.getIngredients().contains(TYPE.SPICE)); + assertFalse(recipe.getIngredients().contains(TYPE.RED_MEAT)); + assertFalse(recipe.getIngredients().contains(TYPE.POULTRY)); + assertFalse(recipe.getIngredients().contains(TYPE.SHELLFISH)); + } +}