001 /** 002 * CritiqueOption.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 * 31/10/2007 008 */ 009 package jcolibri.extensions.recommendation.navigationByProposing; 010 011 import jcolibri.cbrcore.Attribute; 012 import jcolibri.method.retrieve.FilterBasedRetrieval.predicates.FilterPredicate; 013 014 /** 015 * Utility object to encapsulte information about the user's critique to an attribute. 016 * It stores: the critiqued attribute, the label shown to the user and the FilterPredicate 017 * that implements the critique. 018 * @author Juan A. Recio-Garcia 019 * @author Developed at University College Cork (Ireland) in collaboration with Derek Bridge. 020 * @version 1.0 021 * 022 * @see jcolibri.method.retrieve.FilterBasedRetrieval.predicates.FilterPredicate 023 */ 024 public class CritiqueOption 025 { 026 String label; 027 Attribute attribute; 028 FilterPredicate predicate; 029 030 031 /** 032 * Creates a new critiqueOption 033 * @param label 034 * @param attribute 035 * @param predicate 036 */ 037 public CritiqueOption(String label, Attribute attribute, FilterPredicate predicate) 038 { 039 super(); 040 this.label = label; 041 this.attribute = attribute; 042 this.predicate = predicate; 043 } 044 045 046 /** 047 * @return Returns the attribute. 048 */ 049 public Attribute getAttribute() 050 { 051 return attribute; 052 } 053 054 055 /** 056 * @param attribute The attribute to set. 057 */ 058 public void setAttribute(Attribute attribute) 059 { 060 this.attribute = attribute; 061 } 062 063 064 /** 065 * @return Returns the label. 066 */ 067 public String getLabel() 068 { 069 return label; 070 } 071 072 073 /** 074 * @param label The label to set. 075 */ 076 public void setLabel(String label) 077 { 078 this.label = label; 079 } 080 081 082 /** 083 * @return Returns the predicate. 084 */ 085 public FilterPredicate getPredicate() 086 { 087 return predicate; 088 } 089 090 091 /** 092 * @param predicate The predicate to set. 093 */ 094 public void setPredicate(FilterPredicate predicate) 095 { 096 this.predicate = predicate; 097 } 098 099 100 101 102 103 }