From: Benjamin B. <bg...@us...> - 2005-07-11 07:29:32
|
Update of /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19429/Plugin/com/ibm/ecute/plugins/output/funcionality Modified Files: RSAModelCreator.java Log Message: Index: RSAModelCreator.java =================================================================== RCS file: /cvsroot/sblim/ecute/Plugin/com/ibm/ecute/plugins/output/funcionality/RSAModelCreator.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- RSAModelCreator.java 7 Jul 2005 15:42:48 -0000 1.14 +++ RSAModelCreator.java 11 Jul 2005 07:29:19 -0000 1.15 @@ -212,32 +212,33 @@ } - } else { - //if there is a root association checks if the role names are not - // overwritten - if (lastRootClass != null) { - AssociationClass rootAssoc; - if(lastRootClass instanceof AssociationClass){ - rootAssoc = (AssociationClass) lastRootClass; - Property rootAssocProp1 = (Property) rootAssoc.getOwnedEnds().get(0); - String rootAssocPropName1 = rootAssocProp1.getName(); - - Property rootAssocProp2 = (Property) rootAssoc.getOwnedEnds().get(1); - String rootAssocPropName2 = rootAssocProp2.getName(); - - if ((!rootAssocPropName1.equalsIgnoreCase(roleName1)) - || (!rootAssocPropName2.equalsIgnoreCase(roleName2))){ - if ((rootAssocPropName1.equalsIgnoreCase(roleName2)) - && (rootAssocPropName2.equalsIgnoreCase(roleName1))) { - String temp = className2; - className2 = className1; - className1 = temp; - } else - return OVERWRITTEN; - } - } - } - } + } +// else { +// //if there is a root association checks if the role names are not +// // overwritten +// if (lastRootClass != null) { +// AssociationClass rootAssoc; +// if(lastRootClass instanceof AssociationClass){ +// rootAssoc = (AssociationClass) lastRootClass; +// Property rootAssocProp1 = (Property) rootAssoc.getOwnedEnds().get(0); +// String rootAssocPropName1 = rootAssocProp1.getName(); +// +// Property rootAssocProp2 = (Property) rootAssoc.getOwnedEnds().get(1); +// String rootAssocPropName2 = rootAssocProp2.getName(); +// +// if ((!rootAssocPropName1.equalsIgnoreCase(roleName1)) +// || (!rootAssocPropName2.equalsIgnoreCase(roleName2))){ +// if ((rootAssocPropName1.equalsIgnoreCase(roleName2)) +// && (rootAssocPropName2.equalsIgnoreCase(roleName1))) { +// String temp = className2; +// className2 = className1; +// className1 = temp; +// } else +// return OVERWRITTEN; +// } +// } +// } +// } if ((className1 == null) || (className2 == null)) return NOLINKS; @@ -260,22 +261,22 @@ //as Qualifier Aggregate "is toSubClass" check if there are roles with the same name //and take over the Aggregation Kind - if(lastRootClass != null && lastRootClass instanceof AssociationClass){ - Property superProp = ((AssociationClass)lastRootClass).getOwnedEnd(roleName1); - if(superProp!=null){ - if(superProp.getAggregation().getValue() == AggregationKind.SHARED) - assocProp1.setAggregation(AggregationKind.SHARED_LITERAL); - else if(superProp.getAggregation().getValue() == AggregationKind.COMPOSITE) - assocProp1.setAggregation(AggregationKind.COMPOSITE_LITERAL); - //Qualifier Min and Max and Key are also "toSubClass" - assocProp1.setLowerBound(superProp.getLower()); - assocProp1.setUpperBound(superProp.getUpper()); - - if(superProp.isApplied(superProp.getApplicableStereotype("CIM::Key"))){ - assocProp1.apply(superProp.getApplicableStereotype("CIM::Key")); - } - } - } +// if(lastRootClass != null && lastRootClass instanceof AssociationClass){ +// Property superProp = ((AssociationClass)lastRootClass).getOwnedEnd(roleName1); +// if(superProp!=null){ +// if(superProp.getAggregation().getValue() == AggregationKind.SHARED) +// assocProp1.setAggregation(AggregationKind.SHARED_LITERAL); +// else if(superProp.getAggregation().getValue() == AggregationKind.COMPOSITE) +// assocProp1.setAggregation(AggregationKind.COMPOSITE_LITERAL); +// //Qualifier Min and Max and Key are also "toSubClass" +// assocProp1.setLowerBound(superProp.getLower()); +// assocProp1.setUpperBound(superProp.getUpper()); +// +// if(superProp.isApplied(superProp.getApplicableStereotype("CIM::Key"))){ +// assocProp1.apply(superProp.getApplicableStereotype("CIM::Key")); +// } +// } +// } lastAssocProp1 = assocProp1; @@ -288,23 +289,23 @@ //as Qualifier Aggregate is "toSubClass" check if there are roles with the same name //and take over the Aggregation Kind - if(lastRootClass != null && lastRootClass instanceof AssociationClass){ - Property superProp = ((AssociationClass)lastRootClass).getOwnedEnd(roleName2); - if(superProp!=null){ - if(superProp.getAggregation().getValue() == AggregationKind.SHARED) - assocProp2.setAggregation(AggregationKind.SHARED_LITERAL); - else if(superProp.getAggregation().getValue() == AggregationKind.COMPOSITE) - assocProp2.setAggregation(AggregationKind.COMPOSITE_LITERAL); - //Qualifier Min and Max are also "toSubClass" - assocProp2.setLowerBound(superProp.getLower()); - assocProp2.setUpperBound(superProp.getUpper()); - - if(superProp.isApplied(superProp.getApplicableStereotype("CIM::Key"))){ - assocProp2.apply(superProp.getApplicableStereotype("CIM::Key")); - } - - } - } +// if(lastRootClass != null && lastRootClass instanceof AssociationClass){ +// Property superProp = ((AssociationClass)lastRootClass).getOwnedEnd(roleName2); +// if(superProp!=null){ +// if(superProp.getAggregation().getValue() == AggregationKind.SHARED) +// assocProp2.setAggregation(AggregationKind.SHARED_LITERAL); +// else if(superProp.getAggregation().getValue() == AggregationKind.COMPOSITE) +// assocProp2.setAggregation(AggregationKind.COMPOSITE_LITERAL); +// //Qualifier Min and Max are also "toSubClass" +// assocProp2.setLowerBound(superProp.getLower()); +// assocProp2.setUpperBound(superProp.getUpper()); +// +// if(superProp.isApplied(superProp.getApplicableStereotype("CIM::Key"))){ +// assocProp2.apply(superProp.getApplicableStereotype("CIM::Key")); +// } +// +// } +// } lastAssocProp2 = assocProp2; |