001/**
002 * TravelDescription.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 * 28/11/2006
008 */
009package es.ucm.fdi.gaia.jcolibri.test.test1;
010
011
012import es.ucm.fdi.gaia.jcolibri.cbrcore.Attribute;
013
014/**
015 * Bean that stores the description of the case.
016 * @author Juan A. Recio-Garcia
017 * @version 1.0
018 */
019public class TravelDescription implements es.ucm.fdi.gaia.jcolibri.cbrcore.CaseComponent {
020        String  caseId;
021        String  HolidayType;
022        Integer Price;
023        Integer NumberOfPersons;
024        String  Region;
025        String  Transportation;
026        Integer Duration;
027        String  Season;
028        String  Accomodation;
029        String  Hotel;
030        
031        
032        public String toString()
033        {
034                return "("+caseId+";"+HolidayType+";"+Price+";"+NumberOfPersons+";"+Region+";"+Transportation+";"+Duration+";"+Season+";"+Accomodation+";"+Hotel+")";
035        }
036        
037        /**
038         * @return the accomodation
039         */
040        public String getAccomodation() {
041                return Accomodation;
042        }
043        /**
044         * @param accomodation the accomodation to set
045         */
046        public void setAccomodation(String accomodation) {
047                Accomodation = accomodation;
048        }
049        /**
050         * @return the caseId
051         */
052        public String getCaseId() {
053                return caseId;
054        }
055        /**
056         * @param caseId the caseId to set
057         */
058        public void setCaseId(String caseId) {
059                this.caseId = caseId;
060        }
061        /**
062         * @return the duration
063         */
064        public Integer getDuration() {
065                return Duration;
066        }
067        /**
068         * @param duration the duration to set
069         */
070        public void setDuration(Integer duration) {
071                Duration = duration;
072        }
073        /**
074         * @return the holidayType
075         */
076        public String getHolidayType() {
077                return HolidayType;
078        }
079        /**
080         * @param holidayType the holidayType to set
081         */
082        public void setHolidayType(String holidayType) {
083                HolidayType = holidayType;
084        }
085        /**
086         * @return the hotel
087         */
088        public String getHotel() {
089                return Hotel;
090        }
091        /**
092         * @param hotel the hotel to set
093         */
094        public void setHotel(String hotel) {
095                Hotel = hotel;
096        }
097        /**
098         * @return the numberOfPersons
099         */
100        public Integer getNumberOfPersons() {
101                return NumberOfPersons;
102        }
103        /**
104         * @param numberOfPersons the numberOfPersons to set
105         */
106        public void setNumberOfPersons(Integer numberOfPersons) {
107                NumberOfPersons = numberOfPersons;
108        }
109        /**
110         * @return the price
111         */
112        public Integer getPrice() {
113                return Price;
114        }
115        /**
116         * @param price the price to set
117         */
118        public void setPrice(Integer price) {
119                Price = price;
120        }
121        /**
122         * @return the region
123         */
124        public String getRegion() {
125                return Region;
126        }
127        /**
128         * @param region the region to set
129         */
130        public void setRegion(String region) {
131                Region = region;
132        }
133        /**
134         * @return the season
135         */
136        public String getSeason() {
137                return Season;
138        }
139        /**
140         * @param season the season to set
141         */
142        public void setSeason(String season) {
143                Season = season;
144        }
145        /**
146         * @return the transportation
147         */
148        public String getTransportation() {
149                return Transportation;
150        }
151        /**
152         * @param transportation the transportation to set
153         */
154        public void setTransportation(String transportation) {
155                Transportation = transportation;
156        }
157
158
159        public Attribute getIdAttribute() {
160                return new Attribute("caseId", this.getClass());
161        }
162        
163        public static void main(String[] args) {
164                TravelDescription t = new TravelDescription();
165                t.setAccomodation("prueba");
166                Attribute at = new Attribute("Accomodation", TravelDescription.class);
167                try {
168                        System.out.println(at.getValue(t));
169                } catch (Exception e) {
170                        e.printStackTrace();
171                } 
172        }
173}