Link l = new Link(rone.getName(), rtwo, rone, one.isCollection(), one.isNullable()); m_symbols.setLocation(l, one); m_links.add(l); twoot.addProperty(l); l = new Link(rtwo.getName(), rone, rtwo, two.isCollection(), two.isNullable()); m_symbols.setLocation(l, two); m_links.add(l); oneot.addProperty(l); } else { Role rone = define(oneot, two); Role rtwo = define(twoot, one); if (rone != null && rtwo != null) { rone.setReverse(rtwo); } }
Link l = new Link(rone.getName(), rtwo, rone, one.isCollection(), one.isNullable()); m_symbols.setLocation(l, one); m_links.add(l); twoot.addProperty(l); l = new Link(rtwo.getName(), rone, rtwo, two.isCollection(), two.isNullable()); m_symbols.setLocation(l, two); m_links.add(l); oneot.addProperty(l); } else { Role rone = define(oneot, two); Role rtwo = define(twoot, one); if (rone != null && rtwo != null) { rone.setReverse(rtwo); }
                public void onAssociation(AssociationNd assn) {		    PropertyNd one = assn.getRoleOne();		    PropertyNd two = assn.getRoleTwo();                    if (one.isComposite()) { two.setComponent(); }                    if (two.isComposite()) { one.setComponent(); }		    Collection props = assn.getProperties();		    ObjectType oneot =			m_symbols.getEmitted(one.getType());		    ObjectType twoot =			m_symbols.getEmitted(two.getType());		    if (props.size() > 0) {			Role rone = new Role(one.getName().getName(), oneot,					     one.isComponent(), false, false);                        m_symbols.setLocation(rone, one);			Role rtwo = new Role(two.getName().getName(), twoot,					     two.isComponent(), false, false);                        m_symbols.setLocation(rtwo, two);			ObjectType ot = m_symbols.getEmitted(linkName(assn));			ot.addProperty(rone);			Role revOne = new Role(rtwo.getName() + LINK, ot,                                               true,                                               two.isCollection(),                                               two.isNullable());			rone.getType().addProperty(revOne);			rone.setReverse(revOne);			ot.addProperty(rtwo);			Role revTwo = new Role(rone.getName() + LINK, ot,                                               true,                                               one.isCollection(),                                               one.isNullable());			rtwo.getType().addProperty(revTwo);			rtwo.setReverse(revTwo);			for (Iterator it = props.iterator(); it.hasNext(); ) {			    PropertyNd prop = (PropertyNd) it.next();			    define(ot, prop);			}			Link l = new Link(rone.getName(), rtwo, rone,					  one.isCollection(),					  one.isNullable());                        m_symbols.setLocation(l, one);			m_links.add(l);			twoot.addProperty(l);			l = new Link(rtwo.getName(), rone, rtwo,				     two.isCollection(), two.isNullable());                        m_symbols.setLocation(l, two);			m_links.add(l);			oneot.addProperty(l);		    } else {			Role rone = define(oneot, two);			Role rtwo = define(twoot, one);			if (rone != null && rtwo != null) {			    rone.setReverse(rtwo);			}		    }                }