001 /** 002 * User.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 * 11/11/2007 008 */ 009 package jcolibri.test.recommenders.rec12.moviesDB; 010 011 import jcolibri.cbrcore.Attribute; 012 import jcolibri.cbrcore.CaseComponent; 013 014 /** 015 * Bean that represents a user. 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 User implements CaseComponent 022 { 023 public enum Gender {Male, Female}; 024 public enum Occupation { 025 administrator, 026 artist, 027 doctor, 028 educator, 029 engineer, 030 entertainment, 031 executive, 032 healthcare, 033 homemaker, 034 lawyer, 035 librarian, 036 marketing, 037 none, 038 other, 039 programmer, 040 retired, 041 salesman, 042 scientist, 043 student, 044 technician, 045 writer 046 } 047 048 Integer id; 049 Integer age; 050 Gender gender; 051 Occupation occupation; 052 String zipCode; 053 054 public String toString() 055 { 056 return id+","+age+","+gender+","+occupation+","+zipCode; 057 } 058 059 /** 060 * @return Returns the age. 061 */ 062 public Integer getAge() 063 { 064 return age; 065 } 066 /** 067 * @param age The age to set. 068 */ 069 public void setAge(Integer age) 070 { 071 this.age = age; 072 } 073 /** 074 * @return Returns the gender. 075 */ 076 public Gender getGender() 077 { 078 return gender; 079 } 080 /** 081 * @param gender The gender to set. 082 */ 083 public void setGender(Gender gender) 084 { 085 this.gender = gender; 086 } 087 /** 088 * @return Returns the id. 089 */ 090 public Integer getId() 091 { 092 return id; 093 } 094 /** 095 * @param id The id to set. 096 */ 097 public void setId(Integer id) 098 { 099 this.id = id; 100 } 101 /** 102 * @return Returns the occupation. 103 */ 104 public Occupation getOccupation() 105 { 106 return occupation; 107 } 108 /** 109 * @param occupation The occupation to set. 110 */ 111 public void setOccupation(Occupation occupation) 112 { 113 this.occupation = occupation; 114 } 115 /** 116 * @return Returns the zipCode. 117 */ 118 public String getZipCode() 119 { 120 return zipCode; 121 } 122 /** 123 * @param zipCode The zipCode to set. 124 */ 125 public void setZipCode(String zipCode) 126 { 127 this.zipCode = zipCode; 128 } 129 130 131 public Attribute getIdAttribute() 132 { 133 return new Attribute("id",User.class); 134 } 135 136 137 }