uci.argo.kernel
Class CompoundCritic

java.lang.Object
  |
  +--uci.argo.kernel.Critic
        |
        +--uci.argo.kernel.CompoundCritic

public class CompoundCritic
extends Critic

A CompoundCritic acts like a regular critic in that it checks the design and produces design feedback. However, a CompoundCritic is composed of several regular critics that are applied in order. The first one the produces feedback ends the application. This is useful when criticism can be ordered from specific to general: general feedback should not be produced if specific feedback is available. For example, one critic might check for the legality of the name of a design element, and another might check for the presence of any name. If a given design element has no name, both critics could produce feedback, but it would be more useful if only the first one did.

See Also:
Serialized Form

Field Summary
protected  Vector _critics
          The sub-critics that make up this CompoundCritic.
 
Fields inherited from class uci.argo.kernel.Critic
_clarifier, _knowledgeTypes, _numCriticsFired, _supportedDecisions, _supportedGoals, _triggerMask, DEFAULT_CLARIFIER, ENABLED, KT_COMPLETENESS, KT_CONSISTENCY, KT_CORRECTNESS, KT_DESIGNERS, KT_EXPERIENCIAL, KT_OPTIMIZATION, KT_ORGANIZATIONAL, KT_PRESENTATION, KT_SEMANTICS, KT_SYNTAX, KT_TOOL, NO_PROBLEM, PROBLEM_FOUND, SNOOZE_ORDER
 
Constructor Summary
CompoundCritic()
           
CompoundCritic(Critic c1, Critic c2)
           
CompoundCritic(Critic c1, Critic c2, Critic c3)
           
CompoundCritic(Critic c1, Critic c2, Critic c3, Critic c4)
           
 
Method Summary
 void addCritic(Critic c)
           
 void addKnowledgeType(String type)
           
 void addSupportedDecision(Decision d)
           
 void addSupportedGoal(Goal g)
           
 boolean containsKnowledgeType(String type)
           
 void critique(Object dm, Designer dsgr)
           
 String expand(String desc, VectorSet offs)
           
 Icon getClarifier()
           
 Vector getCritics()
           
 VectorSet getKnowledgeTypes()
           
 Vector getSupportedDecisions()
           
 Vector getSupportedGoals()
           
 boolean isActive()
           
 boolean isEnabled()
           
 void removeCritic(Critic c)
           
 void setCritics(Vector critics)
           
 boolean supports(Decision d)
           
 boolean supports(Goal g)
           
 ToDoItem toDoItem(Object dm, Designer dsgr)
           
 
Methods inherited from class uci.argo.kernel.Critic
addControlRec, addTrigger, beActive, beInactive, canFixIt, fixIt, getArg, getArgs, getControlRec, getCriticType, getDecisionCategory, getDescription, getDescriptionTemplate, getExpertEmail, getHeadline, getHeadline, getHeadline, getMoreInfoURL, getMoreInfoURL, getPriority, getPriority, getTriggerMask, getWizardClass, initWizard, isRelevantToDecisions, isRelevantToGoals, makeWizard, matchReason, postItem, predicate, reasonCodeFor, setArg, setArgs, setDecisionCategory, setDescription, setEnabled, setExpertEmail, setHeadline, setKnowledgeTypes, setKnowledgeTypes, setKnowledgeTypes, setKnowledgeTypes, setMoreInfoURL, setPriority, snooze, snoozeOrder, stillValid, toString, unsnooze
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_critics

protected Vector _critics
The sub-critics that make up this CompoundCritic.
Constructor Detail

CompoundCritic

public CompoundCritic()

CompoundCritic

public CompoundCritic(Critic c1,
                      Critic c2)

CompoundCritic

public CompoundCritic(Critic c1,
                      Critic c2,
                      Critic c3)

CompoundCritic

public CompoundCritic(Critic c1,
                      Critic c2,
                      Critic c3,
                      Critic c4)
Method Detail

setCritics

public void setCritics(Vector critics)

getCritics

public Vector getCritics()

addCritic

public void addCritic(Critic c)

removeCritic

public void removeCritic(Critic c)

critique

public void critique(Object dm,
                     Designer dsgr)
Overrides:
critique in class Critic

supports

public boolean supports(Decision d)
Overrides:
supports in class Critic

getSupportedDecisions

public Vector getSupportedDecisions()
Overrides:
getSupportedDecisions in class Critic

addSupportedDecision

public void addSupportedDecision(Decision d)
Overrides:
addSupportedDecision in class Critic

supports

public boolean supports(Goal g)
Overrides:
supports in class Critic

getSupportedGoals

public Vector getSupportedGoals()
Overrides:
getSupportedGoals in class Critic

addSupportedGoal

public void addSupportedGoal(Goal g)
Overrides:
addSupportedGoal in class Critic

containsKnowledgeType

public boolean containsKnowledgeType(String type)
Overrides:
containsKnowledgeType in class Critic

addKnowledgeType

public void addKnowledgeType(String type)
Overrides:
addKnowledgeType in class Critic

getKnowledgeTypes

public VectorSet getKnowledgeTypes()
Overrides:
getKnowledgeTypes in class Critic

expand

public String expand(String desc,
                     VectorSet offs)
Overrides:
expand in class Critic

getClarifier

public Icon getClarifier()
Overrides:
getClarifier in class Critic

isActive

public boolean isActive()
Overrides:
isActive in class Critic

isEnabled

public boolean isEnabled()
Overrides:
isEnabled in class Critic

toDoItem

public ToDoItem toDoItem(Object dm,
                         Designer dsgr)
Overrides:
toDoItem in class Critic