|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uci.argo.kernel.Critic
"Abstract" base class for design critics. Each subclass should define its own predicate method and define its own relevance tags.
Steps to follow when adding a critic are listed in the Argo cookbook under define_critic.
| Field Summary | |
protected Icon |
_clarifier
|
protected VectorSet |
_knowledgeTypes
|
static int |
_numCriticsFired
|
protected Vector |
_supportedDecisions
|
protected Vector |
_supportedGoals
|
protected long |
_triggerMask
|
static Icon |
DEFAULT_CLARIFIER
|
static String |
ENABLED
The keys of some predefined control records. |
static String |
KT_COMPLETENESS
|
static String |
KT_CONSISTENCY
|
static String |
KT_CORRECTNESS
|
static String |
KT_DESIGNERS
Types of knowledge that critics can deliver |
static String |
KT_EXPERIENCIAL
|
static String |
KT_OPTIMIZATION
|
static String |
KT_ORGANIZATIONAL
|
static String |
KT_PRESENTATION
|
static String |
KT_SEMANTICS
|
static String |
KT_SYNTAX
|
static String |
KT_TOOL
|
static boolean |
NO_PROBLEM
|
static boolean |
PROBLEM_FOUND
|
static String |
SNOOZE_ORDER
|
| Constructor Summary | |
Critic()
Construct a new critic instance. |
|
| Method Summary | |
Object |
addControlRec(String name,
Object controlData)
Add some attribute used by ControlMech to determine if this Critic should be active. |
void |
addKnowledgeType(String type)
|
void |
addSupportedDecision(Decision d)
|
void |
addSupportedGoal(Goal g)
|
void |
addTrigger(String s)
|
void |
beActive()
Make this critic active. |
void |
beInactive()
Make this critic inactive. |
boolean |
canFixIt(ToDoItem item)
Needs-More-Work: Not implemented yet. |
boolean |
containsKnowledgeType(String type)
|
void |
critique(Object dm,
Designer dsgr)
Examine the given Object and Designer and, if appropriate, produce one or more ToDoItem's and add them to the offending design material's and the Designer's ToDoList. |
String |
expand(String desc,
VectorSet offs)
|
void |
fixIt(ToDoItem item,
Object arg)
Needs-More-Work: Not implemented yet. |
protected Object |
getArg(String name)
|
Hashtable |
getArgs()
|
Icon |
getClarifier()
|
Object |
getControlRec(String name)
Reply the named control record, or null if not defined. |
String |
getCriticType()
Reply a string used to contol critics according to type. |
String |
getDecisionCategory()
Reply a string used to determine if this critic would be relevant to current design decisions. |
String |
getDescription(VectorSet offenders,
Designer dsgr)
Reply the description used in feedback produced by this Critic. |
String |
getDescriptionTemplate()
|
String |
getExpertEmail()
Reply the email address of the person who is the author or maintainer of this critic. |
String |
getHeadline()
|
String |
getHeadline(Object dm,
Designer dsgr)
Reply the headline used in feedback produced by this Critic. |
String |
getHeadline(VectorSet offenders,
Designer dsgr)
|
VectorSet |
getKnowledgeTypes()
|
String |
getMoreInfoURL()
|
String |
getMoreInfoURL(VectorSet offenders,
Designer dsgr)
Reply the moreInfoURL used in feedback produced by this Critic. |
int |
getPriority()
|
int |
getPriority(VectorSet offenders,
Designer dsgr)
Reply the priority used in feedback produced by this Critic. |
Vector |
getSupportedDecisions()
|
Vector |
getSupportedGoals()
|
long |
getTriggerMask()
|
Class |
getWizardClass(ToDoItem item)
Return the Class of wizard that can fix the problem identifed by this critic. |
void |
initWizard(Wizard w)
Initialize a newly created wizard with information found by the critic. |
boolean |
isActive()
Reply true iff this Critic can execute. |
boolean |
isEnabled()
This is a convient method for accessing one well-known control record. |
boolean |
isRelevantToDecisions(Designer dsgr)
Reply true iff this Critic is relevant to the decisions that the Designer is considering. |
boolean |
isRelevantToGoals(Designer dsgr)
Reply true iff this Critic is relevant to the goals that the Designer is trying to achieve. |
Wizard |
makeWizard(ToDoItem item)
Create a new Wizard to help the user fix the identified problem. |
boolean |
matchReason(long patternCode)
|
void |
postItem(ToDoItem item,
Object dm,
Designer dsgr)
|
boolean |
predicate(Object dm,
Designer dsgr)
Perform the Critic's analysis of the design. |
static int |
reasonCodeFor(String s)
|
protected void |
setArg(String name,
Object value)
|
void |
setArgs(Hashtable h)
|
protected void |
setDecisionCategory(String c)
Set the decisionCategory, usually done in the constructor. |
void |
setDescription(String d)
|
void |
setEnabled(boolean e)
|
void |
setExpertEmail(String addr)
|
void |
setHeadline(String h)
|
void |
setKnowledgeTypes(String t1)
|
void |
setKnowledgeTypes(String t1,
String t2)
|
void |
setKnowledgeTypes(String t1,
String t2,
String t3)
|
void |
setKnowledgeTypes(VectorSet kt)
|
void |
setMoreInfoURL(String m)
|
void |
setPriority(int p)
|
void |
snooze()
Disable this Critic for the next few minutes. |
SnoozeOrder |
snoozeOrder()
Reply the SnoozeOrder that is defined for this critic. |
boolean |
stillValid(ToDoItem i,
Designer dsgr)
Return true iff the given ToDoItem is still valid and should be kept in the given designers ToDoList. |
boolean |
supports(Decision d)
|
boolean |
supports(Goal g)
|
ToDoItem |
toDoItem(Object dm,
Designer dsgr)
Reply the ToDoItem that the designer should see iff predicate() returns true. |
String |
toString()
Reply a string that describes this Critic. |
void |
unsnooze()
Lift any previous SnoozeOrder. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final boolean PROBLEM_FOUND
public static final boolean NO_PROBLEM
public static final String ENABLED
public static final String SNOOZE_ORDER
public static String KT_DESIGNERS
public static String KT_CORRECTNESS
public static String KT_COMPLETENESS
public static String KT_CONSISTENCY
public static String KT_SYNTAX
public static String KT_SEMANTICS
public static String KT_OPTIMIZATION
public static String KT_PRESENTATION
public static String KT_ORGANIZATIONAL
public static String KT_EXPERIENCIAL
public static String KT_TOOL
public static Icon DEFAULT_CLARIFIER
protected Icon _clarifier
protected Vector _supportedDecisions
protected Vector _supportedGoals
protected VectorSet _knowledgeTypes
protected long _triggerMask
public static int _numCriticsFired
| Constructor Detail |
public Critic()
| Method Detail |
public void critique(Object dm,
Designer dsgr)
public void postItem(ToDoItem item,
Object dm,
Designer dsgr)
public boolean predicate(Object dm,
Designer dsgr)
public boolean stillValid(ToDoItem i,
Designer dsgr)
By default this method basically asks the critic to again critique the offending Object and then it checks if the resulting ToDoItem is the same as the one already posted. This is simple and it works fine for light-weight critics. Critics that expend a lot of computational effort in making feedback that can be easily check to see if it still holds, should override this method.
Needs-More-Work: Maybe ToDoItem should carry some data to make this method more efficient.
public boolean supports(Decision d)
public Vector getSupportedDecisions()
public void addSupportedDecision(Decision d)
public boolean supports(Goal g)
public Vector getSupportedGoals()
public void addSupportedGoal(Goal g)
public boolean containsKnowledgeType(String type)
public void addKnowledgeType(String type)
public VectorSet getKnowledgeTypes()
public void setKnowledgeTypes(VectorSet kt)
public void setKnowledgeTypes(String t1)
public void setKnowledgeTypes(String t1,
String t2)
public void setKnowledgeTypes(String t1,
String t2,
String t3)
public static int reasonCodeFor(String s)
public long getTriggerMask()
public void addTrigger(String s)
public boolean matchReason(long patternCode)
public String expand(String desc,
VectorSet offs)
public Icon getClarifier()
public boolean isActive()
public void beActive()
public void beInactive()
public Object addControlRec(String name,
Object controlData)
public Object getControlRec(String name)
public boolean isEnabled()
public void setEnabled(boolean e)
public SnoozeOrder snoozeOrder()
public void snooze()
public void unsnooze()
public boolean isRelevantToDecisions(Designer dsgr)
public boolean isRelevantToGoals(Designer dsgr)
Needs-More-Work: I would like a better default action, but goals are typed and their values must be interperted by critics. They are not as generic as the DecisionModel.
public Wizard makeWizard(ToDoItem item)
public Class getWizardClass(ToDoItem item)
public void initWizard(Wizard w)
public String getDecisionCategory()
protected void setDecisionCategory(String c)
public String getCriticType()
public String getExpertEmail()
public void setExpertEmail(String addr)
public String getHeadline(Object dm,
Designer dsgr)
public String getHeadline(VectorSet offenders,
Designer dsgr)
public String getHeadline()
public void setHeadline(String h)
public int getPriority(VectorSet offenders,
Designer dsgr)
public void setPriority(int p)
public int getPriority()
public String getDescription(VectorSet offenders,
Designer dsgr)
public void setDescription(String d)
public String getDescriptionTemplate()
public String getMoreInfoURL(VectorSet offenders,
Designer dsgr)
public void setMoreInfoURL(String m)
public String getMoreInfoURL()
protected void setArg(String name,
Object value)
protected Object getArg(String name)
public Hashtable getArgs()
public void setArgs(Hashtable h)
public ToDoItem toDoItem(Object dm,
Designer dsgr)
critique(java.lang.Object, uci.argo.kernel.Designer)public boolean canFixIt(ToDoItem item)
public void fixIt(ToDoItem item,
Object arg)
canFixIt(uci.argo.kernel.ToDoItem)public String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||