org/andromda/cartridges/arc/DictionaryTreatment.java

Go to the documentation of this file.
00001 package org.andromda.cartridges.arc;
00002 
00003 import java.util.Collection;
00004 import java.util.Iterator;
00005 
00009 public class DictionaryTreatment extends Treatment {
00010         public DictionaryTreatment(Responsibility resp) {
00011                 super("Dictionary", "Domain", resp);
00012         }
00013         public String getDescription() {
00014                 String desc="";
00015                 if(resp instanceof KeyResponsibility) {
00016                         desc="A dictionary can be used to determine if a key is valid.";
00017                 }
00018                 else if(resp instanceof CardinalityResponsibility) {
00019                         desc="One dictionary for the class '"+((CardinalityResponsibility)resp).getElementClassName()+"' can be used to count the number of instances associated with the class'"+((CardinalityResponsibility)resp).getModelElementName()+"'.";
00020                 }
00021                 else if(resp instanceof ConstraintResponsibility) {
00022                         desc="The constraint can be handled using a dictionary in the domain layer.";
00023                 }
00024                 return desc;
00025         }
00026 }

Generated on Tue Jan 9 16:10:05 2007 for AndroMDA ARC by  doxygen 1.4.7