001 /** 002 * Travel Recommender example for the jCOLIBRI2 framework. 003 * @author Juan A. Recio-García. 004 * GAIA - Group for Artificial Intelligence Applications 005 * http://gaia.fdi.ucm.es 006 * 25/07/2006 007 */ 008 package jcolibri.test.recommenders.travelData; 009 010 011 import jcolibri.cbrcore.Attribute; 012 import jcolibri.datatypes.Instance; 013 014 015 /** 016 * Bean that stores the description of the case. 017 * @author Juan A. Recio-Garcia 018 * @author Developed at University College Cork (Ireland) in collaboration with Derek Bridge. 019 * @version 1.0 020 */ 021 public class TravelDescription implements jcolibri.cbrcore.CaseComponent { 022 023 public enum AccommodationTypes { OneStar, TwoStars, ThreeStars, HolidayFlat, FourStars, FiveStars}; 024 public enum Seasons { January,February,March,April,May,June,July,August,September,October,November,December }; 025 026 String caseId; 027 String HolidayType; 028 Integer NumberOfPersons; 029 Instance Region; 030 String Transportation; 031 Integer Duration; 032 Seasons Season; 033 AccommodationTypes Accommodation; 034 Integer Price; 035 036 037 public String toString() 038 { 039 return "("+caseId+";"+HolidayType+";"+NumberOfPersons+";"+Region+";"+Transportation+";"+Duration+";"+Season+";"+Accommodation+")"; 040 } 041 042 /** 043 * @return the accomodation 044 */ 045 public AccommodationTypes getAccommodation() { 046 return Accommodation; 047 } 048 /** 049 * @param accomodation the accomodation to set 050 */ 051 public void setAccommodation(AccommodationTypes accomodation) { 052 Accommodation = accomodation; 053 } 054 /** 055 * @return the caseId 056 */ 057 public String getCaseId() { 058 return caseId; 059 } 060 /** 061 * @param caseId the caseId to set 062 */ 063 public void setCaseId(String caseId) { 064 this.caseId = caseId; 065 } 066 /** 067 * @return the duration 068 */ 069 public Integer getDuration() { 070 return Duration; 071 } 072 /** 073 * @param duration the duration to set 074 */ 075 public void setDuration(Integer duration) { 076 Duration = duration; 077 } 078 /** 079 * @return the holidayType 080 */ 081 public String getHolidayType() { 082 return HolidayType; 083 } 084 /** 085 * @param holidayType the holidayType to set 086 */ 087 public void setHolidayType(String holidayType) { 088 HolidayType = holidayType; 089 } 090 /** 091 * @return the numberOfPersons 092 */ 093 public Integer getNumberOfPersons() { 094 return NumberOfPersons; 095 } 096 /** 097 * @param numberOfPersons the numberOfPersons to set 098 */ 099 public void setNumberOfPersons(Integer numberOfPersons) { 100 NumberOfPersons = numberOfPersons; 101 } 102 /** 103 * @return the region 104 */ 105 public Instance getRegion() { 106 return Region; 107 } 108 /** 109 * @param region the region to set 110 */ 111 public void setRegion(Instance region) { 112 Region = region; 113 } 114 /** 115 * @return the season 116 */ 117 public Seasons getSeason() { 118 return Season; 119 } 120 /** 121 * @param season the season to set 122 */ 123 public void setSeason(Seasons season) { 124 Season = season; 125 } 126 /** 127 * @return the transportation 128 */ 129 public String getTransportation() { 130 return Transportation; 131 } 132 /** 133 * @param transportation the transportation to set 134 */ 135 public void setTransportation(String transportation) { 136 Transportation = transportation; 137 } 138 139 /** 140 * @return Returns the price. 141 */ 142 public Integer getPrice() { 143 return Price; 144 } 145 146 /** 147 * @param price The price to set. 148 */ 149 public void setPrice(Integer price) { 150 this.Price = price; 151 } 152 153 public Attribute getIdAttribute() { 154 return new Attribute("caseId", this.getClass()); 155 } 156 157 }