|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEDU.utwente.CoCompose.lang.ModelVisitor
EDU.utwente.CoCompose.translate.DetermineFormsVisitor
Determines the concept forms of all concepts in a model.
Field Summary | |
protected FormConstraintsVisitor |
constraintCheck
The form checking visitor needed to check constraints |
protected Model |
thisModel
The model on which this visitor is applied. |
Fields inherited from class EDU.utwente.CoCompose.lang.ModelVisitor |
log |
Constructor Summary | |
DetermineFormsVisitor()
Constructs a ModelVisitor. |
Method Summary | |
protected void |
applyHeuristics()
Applies the concept form heuristics defined in the model to eliminate permutations. |
protected java.util.Hashtable |
comparePermutations(java.util.Hashtable perm1,
java.util.Hashtable perm2)
Compares two permutations and returns the one that should be deleted according to the concept form heuristics. |
protected void |
createAdditionalPermutations(Concept concept,
java.util.Set forms)
Creates new concept forms permutations from Concept |-> form. |
protected void |
createNewPermutations(Concept concept,
java.util.Set forms)
Creates new concept forms permutations from Concept |-> form. |
protected void |
createPermutations(Concept concept,
java.util.Set forms)
Creates new concept forms permutations from Concept |-> form. |
void |
createResultingModels()
Creates the resulting models using the valid permutations of concept forms. |
protected void |
eliminatePermutations()
Eliminates permutations that violate concept form constraints. |
protected java.util.Set |
getConceptForms(AbstractConcept concept)
Gets the set of concept forms for a concept. |
protected java.util.Set |
getFormPermutations()
Gets the concept form permutations for the entire model. |
java.util.Collection |
getResultingModels()
Retrieves the resulting models using the valid permutations of concept forms. |
protected void |
setConceptForms(AbstractConcept concept,
java.util.Set forms)
Sets the set of concept forms for a concept. |
protected void |
setConceptForms(Concept concept,
java.util.Set forms)
Sets the set of concept forms for a concept and generates permutations. |
protected void |
setFormPermutations(java.util.Set permutations)
Sets the concept form permutations for the entire model. |
void |
visitCompositeRole(CompositeRole role)
Gets the possible concept forms for which the composite will translate into the model's target language. |
void |
visitConcept(Concept concept)
Determines the possible concept forms for this concept using the target language of the model. |
void |
visitModel(Model model)
Determines the concept forms for each concept in the model. |
Methods inherited from class EDU.utwente.CoCompose.lang.ModelVisitor |
getUpdate, run, setErrorReporter, setLogger, setUpdate, startModel, visitAbstractConcept, visitComposite, visitCompositePartConcept, 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 |
Field Detail |
protected Model thisModel
protected FormConstraintsVisitor constraintCheck
Constructor Detail |
public DetermineFormsVisitor()
Method Detail |
protected java.util.Set getConceptForms(AbstractConcept concept)
concept
- The concept to get the forms for.
protected void setConceptForms(AbstractConcept concept, java.util.Set forms)
concept
- - the concept to set the forms for.forms
- - the Setprotected void setConceptForms(Concept concept, java.util.Set forms) throws CoComposeException
concept
- - the concept to set the forms for.forms
- - the SetCoComposeException
- - if no permutations left afterwards.protected java.util.Set getFormPermutations()
protected void setFormPermutations(java.util.Set permutations)
permutations
- - the concept form permutations: Setprotected void createPermutations(Concept concept, java.util.Set forms) throws CoComposeException
concept
- - the concept to create permutations for.forms
- - the SetCoComposeException
- - if no permutation is left afterwards.protected void createNewPermutations(Concept concept, java.util.Set forms)
concept
- - the concept to create permutations for.forms
- - the Setprotected void createAdditionalPermutations(Concept concept, java.util.Set forms) throws CoComposeException
concept
- - the concept to create permutations for.forms
- - the SetCoComposeException
- - if no permutation is left afterwards.protected void eliminatePermutations() throws CoComposeException
CoComposeException
- if all permutations got eliminated.protected void applyHeuristics()
protected java.util.Hashtable comparePermutations(java.util.Hashtable perm1, java.util.Hashtable perm2)
perm1
- - the first permutation Hashtableperm2
- - the second permutation Hashtablepublic void createResultingModels()
public java.util.Collection getResultingModels()
public void visitModel(Model model) throws CoComposeException
visitModel
in class ModelVisitor
model
- - the model to visit.
CoComposeException
- - if one of the model's constraints are not fulfilled or
if not all concept forms could be determined.public void visitConcept(Concept concept) throws CoComposeException
visitConcept
in class ModelVisitor
concept
- - the concept to determine the forms for.
CoComposeException
- - if the concept forms could not be determined.public void visitCompositeRole(CompositeRole role) throws CoComposeException
visitCompositeRole
in class ModelVisitor
role
- - the composite role to get the forms for.
CoComposeException
- - if the concept forms could not be retrieved.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |