EDU.utwente.CoCompose.translate
Class FormConstraintsVisitor

java.lang.Object
  extended byEDU.utwente.CoCompose.lang.ModelVisitor
      extended byEDU.utwente.CoCompose.translate.FormConstraintsVisitor
All Implemented Interfaces:
java.lang.Runnable

public class FormConstraintsVisitor
extends ModelVisitor

Checks the concept form constraints of the model. Supports incremental checking, i.e. only checks for concepts with determined concept forms.

Version:
0.1.18, 24 November 2003
Author:
Dennis Wagelaar

Field Summary
 
Fields inherited from class EDU.utwente.CoCompose.lang.ModelVisitor
log
 
Constructor Summary
FormConstraintsVisitor()
          Constructs a FormConstraintsVisitor.
 
Method Summary
protected  java.util.Hashtable getForms()
          Retrieves the concept form mapping.
protected  Concept getOnlyNewConcept()
          Gets the OnlyNewConcept attribute.
 void setForms(java.util.Hashtable forms)
          Sets the concept forms mapping attribute.
 void setLogger(Logger logger)
          Sets the logger object.
 void setOnlyNewConcept(Concept concept)
          Sets the OnlyNewConcept attribute.
 void visitModel(Model model)
          Checks the concept form constraints for the model.
 
Methods inherited from class EDU.utwente.CoCompose.lang.ModelVisitor
getUpdate, run, setErrorReporter, setUpdate, startModel, visitAbstractConcept, visitComposite, visitCompositePartConcept, visitCompositeRole, visitConcept, visitConstrainedConcept, visitImplementation, visitImplementationGenerator, visitImplementationRolePart, visitLink, visitPublishedConcept, visitSolutionPattern, visitSolutionRole
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormConstraintsVisitor

public FormConstraintsVisitor()
Constructs a FormConstraintsVisitor.

Method Detail

getForms

protected java.util.Hashtable getForms()
Retrieves the concept form mapping.

Returns:
The concept form mapping.

getOnlyNewConcept

protected Concept getOnlyNewConcept()
Gets the OnlyNewConcept attribute. When defined, only checks composites linked to this concept.

Returns:
The concept or null.

setForms

public void setForms(java.util.Hashtable forms)
Sets the concept forms mapping attribute.

Parameters:
forms - The mapping of concepts to forms: Concept |-> String.

setOnlyNewConcept

public void setOnlyNewConcept(Concept concept)
Sets the OnlyNewConcept attribute. When defined, only checks composites linked to this concept.

Parameters:
concept - The concept or null.

visitModel

public void visitModel(Model model)
                throws CoComposeException
Checks the concept form constraints for the model.

Overrides:
visitModel in class ModelVisitor
Parameters:
model - The model to check.
Throws:
CoComposeException - if one of the model's constraints are not fulfilled or if the concept form constraints are not met.

setLogger

public void setLogger(Logger logger)
Sets the logger object.

Overrides:
setLogger in class ModelVisitor
Parameters:
logger - The object to log to