diff --git a/data/long_recipebook.xml b/data/long_recipebook.xml
index 6727e03..1ecb5a5 100644
--- a/data/long_recipebook.xml
+++ b/data/long_recipebook.xml
@@ -1796,7 +1796,7 @@ with crunbled bacon and grated cheese to taste.
- Tabasco Classic - Perfect Seared Steaks ****
+ Tabasco Classic Seared Steaks
Tabasco
@@ -2152,14 +2152,15 @@ couple inches margin around for sauce --- see above). VEGAN/OVO.
- Black Bean Soup
+ Lemon Pork Chops
- Appetizers
- Vegetarian
- Soups
+ Easy
+ Low-cal
+ Main dish
+ Pork
- 6servings
+ 4servings
@@ -2643,7 +2589,7 @@ California Beach Recipe" by Joan and Carl Stromquist ISBN:
- EGGPLANT LASAGNE
+ Eggplant Lasagna
Vegan
diff --git a/data/long_survey.xml b/data/long_survey.xml
index 2b6f832..9fa0219 100644
--- a/data/long_survey.xml
+++ b/data/long_survey.xml
@@ -3,23 +3,23 @@
0
- Catalan Rice
-
-
- 1
Hamburger Steak
+
+ 1
+ Ice Cream, Lowfat
+
2
- Potatoes in a Thick Sauce
+ Margarita Sunrise
3
- Tomato-Zucchini Casserole
+ Weinerschnitzel
- 4
- Honey Cake
+ 4
+ Blender Double Fudge Cake
5
@@ -27,19 +27,75 @@
6
- Kahlua Cake
+ Coconut Beer Batter Shrimp
7
- Ice Cream, Lowfat
+ Coconut Fish Curry
8
- Blender Double Fudge Cake
+ Catalan Rice
- 9
- Weinerschnitzel
+ 9
+ Tomato-Zucchini Casserole
+
+
+ 10
+ Tabasco Classic Seared Steaks
+
+
+ 11
+ Honey cake
+
+
+ 12
+ Southwest Smoothie
+
+
+ 13
+ Bayou Shrimp Creole
+
+
+ 14
+ Crab Burgers
+
+
+ 15
+ Broiled Flounder
+
+
+ 16
+ Baked Steak And Lima Beans
+
+
+ 17
+ Eggplant Lasagna
+
+
+ 18
+ Salisbury Steak with Mushroom Sauce
+
+
+ 19
+ Meatless Loaf
+
+
+ 20
+ Lemon Pork Chops
+
+
+ 21
+ Fava Bean Burgers
+
+
+ 22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+445,104 @@
+ No allergies, only prefers Pork and Desserts(9) everything else is (3)
3
0
- 9
+ 3
1
- 2
+ 9
2
- 2
+ 3
3
- 2
+ 3
4
- 5
+ 9
5
- 7
+ 3
6
- 5
+ 3
7
- 5
+ 3
8
- 5
+ 3
9
- 5
+ 3
+
+
+ 10
+ 3
+
+
+ 11
+ 3
+
+
+ 12
+ 3
+
+
+ 13
+ 3
+
+
+ 14
+ 3
+
+
+ 15
+ 3
+
+
+ 16
+ 3
+
+
+ 17
+ 3
+
+
+ 18
+ 3
+
+
+ 19
+ 3
+
+
+ 20
+ 9
+
+
+ 21
+ 3
+
+
+ 22
+ 3
+
+
+ 23
+ 9
diff --git a/src/net/woodyfolsom/cs6601/p2/Diner.java b/src/net/woodyfolsom/cs6601/p2/Diner.java
index d9f6bd9..8db4269 100644
--- a/src/net/woodyfolsom/cs6601/p2/Diner.java
+++ b/src/net/woodyfolsom/cs6601/p2/Diner.java
@@ -10,6 +10,11 @@ public class Diner {
private int id;
private Map ratings = new HashMap();
private Map categories = new HashMap();
+ private String description;
+
+ public String getDescription() {
+ return description;
+ }
public int getId() {
return id;
diff --git a/test/net/woodyfolsom/cs6601/p2/RecipeBookReaderTest.java b/test/net/woodyfolsom/cs6601/p2/RecipeBookReaderTest.java
index 0661047..ab42819 100644
--- a/test/net/woodyfolsom/cs6601/p2/RecipeBookReaderTest.java
+++ b/test/net/woodyfolsom/cs6601/p2/RecipeBookReaderTest.java
@@ -24,7 +24,6 @@ public class RecipeBookReaderTest {
assertThat(recipeBook.getSize(), is(equalTo(25)));
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));
diff --git a/test/net/woodyfolsom/cs6601/p2/SurveyReaderTest.java b/test/net/woodyfolsom/cs6601/p2/SurveyReaderTest.java
index 0b86a18..bd470f2 100644
--- a/test/net/woodyfolsom/cs6601/p2/SurveyReaderTest.java
+++ b/test/net/woodyfolsom/cs6601/p2/SurveyReaderTest.java
@@ -16,7 +16,7 @@ public class SurveyReaderTest {
Survey survey = SurveyReader.readSurvey(new File("data/long_survey.xml"));
assertNotNull(survey);
- assertThat(survey.getDishCount(), equalTo(10));
+ assertThat(survey.getDishCount(), equalTo(24));
assertThat(survey.getDinerCount(), equalTo(4));
assertThat(survey.isCategory(0,"vegetarian"), is(false));
@@ -28,9 +28,21 @@ public class SurveyReaderTest {
assertThat(survey.isCategory(2,"vegan"), is(false));
assertThat(survey.isCategory(2,"allergic-nuts"), is(true));
+ assertThat(survey.isCategory(3,"vegan"), is(false));
+ assertThat(survey.isCategory(3,"allergic-nuts"), is(false));
+
assertThat(survey.isDiner("vegetarian"), is(true));
assertThat(survey.isDiner("allergic-nuts"), is(true));
assertThat(survey.isDiner("rastafarian"), is(false));
+
+ for (int i=0;i
-Babel and hyphenation patterns for english, afrikaans, ancientgreek, ar
-abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
-croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
-lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
-ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
-vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
-an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,
-romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
-sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
-senglishmax, welsh, loaded.
-("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"
-Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
-("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo"
-File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
-)
-\c@part=\count79
-\c@section=\count80
-\c@subsection=\count81
-\c@subsubsection=\count82
-\c@paragraph=\count83
-\c@subparagraph=\count84
-\c@figure=\count85
-\c@table=\count86
-\abovecaptionskip=\skip41
-\belowcaptionskip=\skip42
-\bibindent=\dimen102
-)
-("C:\Users\Woody\Desktop\GaTechMS\Spring 2012\CS6601 AI\Project 2\latex8.sty"
-IEEE 8.5 x 11-Inch Proceedings Style `latex8.sty'.
-\@ctmp=\skip43
-\@figindent=\skip44
-) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\titlesec\titlesec.sty"
-Package: titlesec 2011/12/15 v2.10.0 Sectioning titles
-\ttl@box=\box26
-\beforetitleunit=\skip45
-\aftertitleunit=\skip46
-\ttl@plus=\dimen103
-\ttl@minus=\dimen104
-\ttl@toksa=\toks14
-\titlewidth=\dimen105
-\titlewidthlast=\dimen106
-\titlewidthfirst=\dimen107
-)
-("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.sty"
-Package: geometry 2010/09/12 v5.6 Page Geometry
-
-("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty"
-Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV@toks@=\toks15
-)
-("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"
-Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
-Package ifpdf Info: pdfTeX in PDF mode is detected.
-)
-("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty"
-Package: ifvtex 2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)
-Package ifvtex Info: VTeX not detected.
-)
-("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty"
-Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
-)
-\Gm@cnth=\count87
-\Gm@cntv=\count88
-\c@Gm@tempcnt=\count89
-\Gm@bindingoffset=\dimen108
-\Gm@wd@mp=\dimen109
-\Gm@odd@mp=\dimen110
-\Gm@even@mp=\dimen111
-\Gm@layoutwidth=\dimen112
-\Gm@layoutheight=\dimen113
-\Gm@layouthoffset=\dimen114
-\Gm@layoutvoffset=\dimen115
-\Gm@dimlist=\toks16
-
-("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.cfg"))
-("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
-Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-
-("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
-Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-
-("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty"
-Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
-)
-("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg"
-File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
-)
-Package graphics Info: Driver file: pdftex.def on input line 91.
-
-("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"
-File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
-
-("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"
-Package: infwarerr 2010/04/08 v1.3 Providing info/warning/message (HO)
-)
-("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"
-Package: ltxcmds 2011/04/18 v1.20 LaTeX kernel commands for general use (HO)
-)
-\Gread@gobject=\count90
-))
-\Gin@req@height=\dimen116
-\Gin@req@width=\dimen117
-)
-
-LaTeX Warning: Unused global option(s):
- [times,08pt].
-
-
-("C:\Users\Woody\Desktop\GaTechMS\Spring 2012\CS6601 AI\Project 2\P2 Proposal.a
-ux")
-LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 10.
-LaTeX Font Info: ... okay on input line 10.
-LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 10.
-LaTeX Font Info: ... okay on input line 10.
-LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 10.
-LaTeX Font Info: ... okay on input line 10.
-LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 10.
-LaTeX Font Info: ... okay on input line 10.
-LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 10.
-LaTeX Font Info: ... okay on input line 10.
-LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 10.
-LaTeX Font Info: ... okay on input line 10.
-
-*geometry* driver: auto-detecting
-*geometry* detected driver: pdftex
-*geometry* verbose mode - [ preamble ] result:
-* driver: pdftex
-* paper:
-* layout:
-* layoutoffset:(h,v)=(0.0pt,0.0pt)
-* modes:
-* h-part:(L,W,R)=(36.135pt, 542.02501pt, 36.135pt)
-* v-part:(T,H,B)=(36.135pt, 722.7pt, 36.135pt)
-* \paperwidth=614.295pt
-* \paperheight=794.96999pt
-* \textwidth=542.02501pt
-* \textheight=722.7pt
-* \oddsidemargin=-36.135pt
-* \evensidemargin=-36.135pt
-* \topmargin=-36.135pt
-* \headheight=0.0pt
-* \headsep=0.0pt
-* \topskip=10.0pt
-* \footskip=30.0pt
-* \marginparwidth=4.0pt
-* \marginparsep=10.0pt
-* \columnsep=22.58437pt
-* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
-* \hoffset=0.0pt
-* \voffset=0.0pt
-* \mag=1000
-* \@twocolumntrue
-* \@twosidefalse
-* \@mparswitchfalse
-* \@reversemarginfalse
-* (1in=72.27pt=25.4mm, 1cm=28.453pt)
-
-("C:\Program Files (x86)\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count91
-\scratchdimen=\dimen118
-\scratchbox=\box27
-\nofMPsegments=\count92
-\nofMParguments=\count93
-\everyMPshowfont=\toks17
-\MPscratchCnt=\count94
-\MPscratchDim=\dimen119
-\MPnumerator=\count95
-\makeMPintoPDFobject=\count96
-\everyMPtoPDFconversion=\toks18
-)
-LaTeX Font Info: External font `cmex10' loaded for size
-(Font) <12> on input line 17.
-LaTeX Font Info: External font `cmex10' loaded for size
-(Font) <8> on input line 17.
-LaTeX Font Info: External font `cmex10' loaded for size
-(Font) <6> on input line 17.
-LaTeX Font Info: External font `cmex10' loaded for size
-(Font) <7> on input line 80.
-LaTeX Font Info: External font `cmex10' loaded for size
-(Font) <5> on input line 80.
-
-File: bayes.jpeg Graphic file (type jpg)
-