001 /** 002 * RestaurantDescription.java 003 * jCOLIBRI2 framework. 004 * @author Juan A. Recio-García. 005 * GAIA - Group for Artificial Intelligence Applications 006 * http://gaia.fdi.ucm.es 007 * 23/06/2007 008 */ 009 package jcolibri.test.test13; 010 011 import jcolibri.cbrcore.Attribute; 012 import jcolibri.cbrcore.CaseComponent; 013 import jcolibri.extensions.textual.IE.opennlp.IETextOpenNLP; 014 015 /** 016 * Stores the description of a restaurant. <br> 017 * Some attributes are loaded by the connector (name, address, location, phone and description). 018 * But the other ones are obtained (filled) by the Textual CBR methods applied to the description attribute. 019 * 020 * @author Juan A. Recio-Garcia 021 * @version 1.0 022 * @see jcolibri.extensions.textual.IE.opennlp.IETextOpenNLP 023 */ 024 public class RestaurantDescription implements CaseComponent 025 { 026 String name; 027 String address; 028 String location; 029 String phone; 030 IETextOpenNLP description; 031 032 // Extracted values from the description 033 String price; 034 String foodType; 035 String breakfastDays; 036 String lunchDays; 037 String dinnerDays; 038 String food; 039 Boolean alcohol; 040 Boolean takeout; 041 Boolean delivery; 042 Boolean parking; 043 Boolean catering; 044 045 /* (non-Javadoc) 046 * @see jcolibri.cbrcore.CaseComponent#getIdAttribute() 047 */ 048 public Attribute getIdAttribute() 049 { 050 return new Attribute("name",this.getClass()); 051 } 052 053 /** 054 * @return Returns the address. 055 */ 056 public String getAddress() 057 { 058 return address; 059 } 060 061 /** 062 * @param address The address to set. 063 */ 064 public void setAddress(String address) 065 { 066 this.address = address; 067 } 068 069 /** 070 * @return Returns the alcohol. 071 */ 072 public Boolean getAlcohol() 073 { 074 return alcohol; 075 } 076 077 /** 078 * @param alcohol The alcohol to set. 079 */ 080 public void setAlcohol(Boolean alcohol) 081 { 082 this.alcohol = alcohol; 083 } 084 085 /** 086 * @return Returns the breakfastDays. 087 */ 088 public String getBreakfastDays() 089 { 090 return breakfastDays; 091 } 092 093 /** 094 * @param breakfastDays The breakfastDays to set. 095 */ 096 public void setBreakfastDays(String breakfastDays) 097 { 098 this.breakfastDays = breakfastDays; 099 } 100 101 /** 102 * @return Returns the catering. 103 */ 104 public Boolean getCatering() 105 { 106 return catering; 107 } 108 109 /** 110 * @param catering The catering to set. 111 */ 112 public void setCatering(Boolean catering) 113 { 114 this.catering = catering; 115 } 116 117 /** 118 * @return Returns the delivery. 119 */ 120 public Boolean getDelivery() 121 { 122 return delivery; 123 } 124 125 /** 126 * @param delivery The delivery to set. 127 */ 128 public void setDelivery(Boolean delivery) 129 { 130 this.delivery = delivery; 131 } 132 133 /** 134 * @return Returns the description. 135 */ 136 public IETextOpenNLP getDescription() 137 { 138 return description; 139 } 140 141 /** 142 * @param description The description to set. 143 */ 144 public void setDescription(IETextOpenNLP description) 145 { 146 this.description = description; 147 } 148 149 /** 150 * @return Returns the dinnerDays. 151 */ 152 public String getDinnerDays() 153 { 154 return dinnerDays; 155 } 156 157 /** 158 * @param dinnerDays The dinnerDays to set. 159 */ 160 public void setDinnerDays(String dinnerDays) 161 { 162 this.dinnerDays = dinnerDays; 163 } 164 165 /** 166 * @return Returns the food. 167 */ 168 public String getFood() 169 { 170 return food; 171 } 172 173 /** 174 * @param food The food to set. 175 */ 176 public void setFood(String food) 177 { 178 this.food = food; 179 } 180 181 /** 182 * @return Returns the foodType. 183 */ 184 public String getFoodType() 185 { 186 return foodType; 187 } 188 189 /** 190 * @param foodType The foodType to set. 191 */ 192 public void setFoodType(String foodType) 193 { 194 this.foodType = foodType; 195 } 196 197 /** 198 * @return Returns the location. 199 */ 200 public String getLocation() 201 { 202 return location; 203 } 204 205 /** 206 * @param location The location to set. 207 */ 208 public void setLocation(String location) 209 { 210 this.location = location; 211 } 212 213 /** 214 * @return Returns the lunchDays. 215 */ 216 public String getLunchDays() 217 { 218 return lunchDays; 219 } 220 221 /** 222 * @param lunchDays The lunchDays to set. 223 */ 224 public void setLunchDays(String lunchDays) 225 { 226 this.lunchDays = lunchDays; 227 } 228 229 /** 230 * @return Returns the name. 231 */ 232 public String getName() 233 { 234 return name; 235 } 236 237 /** 238 * @param name The name to set. 239 */ 240 public void setName(String name) 241 { 242 this.name = name; 243 } 244 245 /** 246 * @return Returns the parking. 247 */ 248 public Boolean getParking() 249 { 250 return parking; 251 } 252 253 /** 254 * @param parking The parking to set. 255 */ 256 public void setParking(Boolean parking) 257 { 258 this.parking = parking; 259 } 260 261 /** 262 * @return Returns the phone. 263 */ 264 public String getPhone() 265 { 266 return phone; 267 } 268 269 /** 270 * @param phone The phone to set. 271 */ 272 public void setPhone(String phone) 273 { 274 this.phone = phone; 275 } 276 277 /** 278 * @return Returns the price. 279 */ 280 public String getPrice() 281 { 282 return price; 283 } 284 285 /** 286 * @param price The price to set. 287 */ 288 public void setPrice(String price) 289 { 290 this.price = price; 291 } 292 293 /** 294 * @return Returns the takeout. 295 */ 296 public Boolean getTakeout() 297 { 298 return takeout; 299 } 300 301 /** 302 * @param takeout The takeout to set. 303 */ 304 public void setTakeout(Boolean takeout) 305 { 306 this.takeout = takeout; 307 } 308 309 public String toString() 310 { 311 StringBuffer sb = new StringBuffer(); 312 sb.append(this.name); 313 sb.append(", "); 314 sb.append(this.address); 315 sb.append(", "); 316 sb.append(this.location); 317 sb.append(", "); 318 sb.append(this.phone); 319 sb.append(","); 320 sb.append(this.description); 321 322 return sb.toString(); 323 } 324 325 }