private static void mergeAttrs(ArrayList attrv, Viewable v, boolean isRoot)
	{
		Logger logger = Logger.getLogger(ModelUtility.class);
		logger.setLevel(Level.DEBUG);

		Iterator iter = null;
		if (isRoot) {
			iter=v.getAttributesAndRoles2();
		}else{
			iter=v.getDefinedAttributesAndRoles2();
		}
		while (iter.hasNext()) {
			ViewableTransferElement obj = (ViewableTransferElement)iter.next();
			
//			logger.debug("____" + obj.obj);
			
			
			if (obj.obj instanceof AttributeDef) {
				attrv.add(obj);
			}
			if (obj.obj instanceof RoleDef) {
				RoleDef role = (RoleDef) obj.obj;
				// not an embedded role and roledef not defined in a lightweight association?
				if (!obj.embedded && !((AssociationDef)v).isLightweight()){
					attrv.add(obj);
				}
				// a role of an embedded association?
				if(obj.embedded){
					AssociationDef roleOwner = (AssociationDef) role.getContainer();
					if(roleOwner.getDerivedFrom()==null){
						attrv.add(obj);
					}
				}
			}
		}
	}