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