001    /**
002     * HouseDescription.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     * 26/10/2007
008     */
009    package jcolibri.test.recommenders.rec8.housesData;
010    
011    import jcolibri.cbrcore.Attribute;
012    import jcolibri.cbrcore.CaseComponent;
013    
014    /**
015     * Implements the house description.
016     * @author Juan A. Recio-Garcia
017     * @author Developed at University College Cork (Ireland) in collaboration with Derek Bridge.
018     * @version 1.0
019     *
020     */
021    public class HouseDescription implements CaseComponent
022    {
023        public enum Beds  {StudioFlat,one,two,three,four,five,six,seven};
024        public enum Type  {Flat,House};
025        public enum Area  {Acton,Addlestone,Alperton,Balham,Barnes,Battersea,Bayswater,Belsize_Park,Bermondsey,Bloomsbury,Brentford,Brixton,Brondesbury,Byfleet,Camden,Canary_Wharf,Chelsea,Chiswick,Clapham,Clerkenwell,Cricklewood,Croyden,Earls_Court,Egham,Finchley,Finsbury,Fulham,Golders_Green,Greenwich,Hammersmith,Hampstead,Highgate,Holland_Park,Holloway,Hornsey,Hounslow,Hyde_Park,Islington,Kensington,Kilburn,Kings_Cross,Kingston,Knightsbridge,Lambeth,Little_Venice,Maida_Vale,Marylebone,Mayfair,Mitcham,Notting_Hill,Paddington,Parsons_Green,Pimlico,Primrose_Hill,Putney,Regents_Park,Richmond,Shepherds_Bush,Shoreditch,Soho,South_Kensington,Southwark,St_Johns_Wood,Stepney,Streatham,Swiss_Cottage,The_City,Tooting,Twickenham,Walton_on_Thames,Wandsworth,Wapping,West_Ham,West_Horsley,West_Kensington,Westminster,Weybridge,Whitechapel,Willesden,Wimbledon};
026        public enum PriceRange { from_0_to_99, from_100_to_199, from_200_to_299, from_300_to_399, from_400_to_499, from_500_to_599, 
027            from_600_to_699, from_700_to_799, from_800_to_899, from_900_to_999,
028            from_1000_to_1099, from_1100_to_1199, from_1200_to_1299, from_1300_to_1399, from_1400_to_1499, from_1500_to_1599, 
029            from_1600_to_1699, from_1700_to_1799, from_1800_to_1899, from_1900_to_1999, from_2000_to_2099,
030            form_2100_to_2199, from_2200_to_2299, from_2300_to_2399, from_2400_to_2499, more_than_2500};
031        
032        Integer id;
033        Area area;
034        Beds beds;
035        PriceRange priceRange;
036        Boolean furnished;
037        Type type;
038        Integer baths;
039        
040        public String toString() 
041        {
042                    return "("+id+";"+area+";"+beds+";"+priceRange+";"+furnished+";"+type+";"+baths+")";
043        }
044    
045        
046    
047        public PriceRange getPriceRange()
048        {
049            return priceRange;
050        }
051    
052    
053    
054        public void setPriceRange(PriceRange priceRange)
055        {
056            this.priceRange = priceRange;
057        }
058    
059    
060    
061        public Area getArea()
062        {
063            return area;
064        }
065    
066    
067        public void setArea(Area area)
068        {
069            this.area = area;
070        }
071    
072    
073        public Integer getBaths()
074        {
075            return baths;
076        }
077    
078    
079        public void setBaths(Integer baths)
080        {
081            this.baths = baths;
082        }
083    
084    
085        public Beds getBeds()
086        {
087            return beds;
088        }
089    
090    
091        public void setBeds(Beds beds)
092        {
093            this.beds = beds;
094        }
095    
096    
097        public Boolean getFurnished()
098        {
099            return furnished;
100        }
101    
102    
103        public void setFurnished(Boolean furnished)
104        {
105            this.furnished = furnished;
106        }
107    
108    
109        public Integer getId()
110        {
111            return id;
112        }
113    
114    
115        public void setId(Integer id)
116        {
117            this.id = id;
118        }
119    
120    
121    
122    
123        
124        public Type getType()
125        {
126            return type;
127        }
128    
129    
130        public void setType(Type type)
131        {
132            this.type = type;
133        }
134    
135    
136        /* (non-Javadoc)
137         * @see jcolibri.cbrcore.CaseComponent#getIdAttribute()
138         */
139        public Attribute getIdAttribute()
140        {
141            return new Attribute("id",this.getClass());
142        }
143    
144    }