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 * 07/06/2007 008 */ 009 010 package jcolibri.test.test10; 011 012 import jcolibri.cbrcore.Attribute; 013 import jcolibri.datatypes.Instance; 014 015 /** 016 * Bean that stores the description of the case. 017 * 018 * @author Juan A. Recio-Garcia 019 * @version 1.0 020 */ 021 public class TravelDescription implements jcolibri.cbrcore.CaseComponent { 022 023 Instance mainConcept; 024 Instance HolidayType; 025 Instance NumberOfPersons; 026 Instance Destination; 027 Instance Transportation; 028 Instance Duration; 029 Instance Season; 030 Instance Accommodation; 031 032 033 public String toString() 034 { 035 return "("+mainConcept+";"+HolidayType+";"+NumberOfPersons+";"+Destination+";"+Transportation+";"+Duration+";"+Season+";"+Accommodation+")"; 036 } 037 038 /** 039 * @return the accomodation 040 */ 041 public Instance getAccommodation() { 042 return Accommodation; 043 } 044 /** 045 * @param accomodation the accomodation to set 046 */ 047 public void setAccommodation(Instance accomodation) { 048 Accommodation = accomodation; 049 } 050 /** 051 * @return the caseId 052 */ 053 public Instance getCaseId() { 054 return mainConcept; 055 } 056 /** 057 * @param mc the main concept to set 058 */ 059 public void setMainConcept(Instance mc) { 060 this.mainConcept = mc; 061 } 062 /** 063 * @return Returns the mainConcept. 064 */ 065 public Instance getMainConcept() { 066 return mainConcept; 067 } 068 /** 069 * @return the duration 070 */ 071 public Instance getDuration() { 072 return Duration; 073 } 074 /** 075 * @param duration the duration to set 076 */ 077 public void setDuration(Instance duration) { 078 Duration = duration; 079 } 080 /** 081 * @return the holidayType 082 */ 083 public Instance getHolidayType() { 084 return HolidayType; 085 } 086 /** 087 * @param holidayType the holidayType to set 088 */ 089 public void setHolidayType(Instance holidayType) { 090 HolidayType = holidayType; 091 } 092 /** 093 * @return the numberOfPersons 094 */ 095 public Instance getNumberOfPersons() { 096 return NumberOfPersons; 097 } 098 /** 099 * @param numberOfPersons the numberOfPersons to set 100 */ 101 public void setNumberOfPersons(Instance numberOfPersons) { 102 NumberOfPersons = numberOfPersons; 103 } 104 105 /** 106 * @return the destination 107 */ 108 public Instance getDestination() { 109 return Destination; 110 } 111 /** 112 * @param destination the destination to set 113 */ 114 public void setDestination(Instance destination) { 115 Destination = destination; 116 } 117 /** 118 * @return the season 119 */ 120 public Instance getSeason() { 121 return Season; 122 } 123 /** 124 * @param season the season to set 125 */ 126 public void setSeason(Instance season) { 127 Season = season; 128 } 129 /** 130 * @return the transportation 131 */ 132 public Instance getTransportation() { 133 return Transportation; 134 } 135 /** 136 * @param transportation the transportation to set 137 */ 138 public void setTransportation(Instance transportation) { 139 Transportation = transportation; 140 } 141 142 public Attribute getIdAttribute() { 143 return new Attribute("mainConcept", this.getClass()); 144 } 145 146 147 }