m_linkType.addProperty( new Property(m_roles[0].getName(), m_roles[0].getType(), Property.REQUIRED, m_roles[0].isComponent()) );
Property prop = new Property( m_roles[0].getName(), m_roles[0].getType(), Property.REQUIRED, m_roles[0].isComponent() ); prop.setLineInfo(m_roles[0]); m_linkType.addProperty(prop);
    public Association(Property roleOne, Property roleTwo) {        if (roleOne == null) {            throw new IllegalArgumentException(                "The roleOne parameter must be non null."                );        }        if (roleTwo == null) {            throw new IllegalArgumentException(                "The roleTwo parameter must be non null."                );        }        if (!roleOne.isRole()) {            throw new IllegalArgumentException(                "The roleOne parameter must be a role."                );        }        if (!roleTwo.isRole()) {            throw new IllegalArgumentException(                "The roleTwo parameter must be a role."                );        }        if ( roleOne.getAssociation() != null ) {            throw new IllegalArgumentException(                "The roleOne parameter is already joined to an Association!"                );           }                if ( roleTwo.getAssociation() != null ) {            throw new IllegalArgumentException(                "The roleTwo parameter is already joined to an Association!"                );           }                m_roles[0] = roleOne;        m_roles[1] = roleTwo;        m_roles[0].setAssociation(this);        m_roles[1].setAssociation(this);        m_linkType.addProperty(            new Property(m_roles[0].getName(), m_roles[0].getType(),                         Property.REQUIRED, m_roles[0].isComponent())                );        m_linkType.addKeyProperty(m_roles[0].getName());        m_linkType.addProperty(            new Property(m_roles[1].getName(), m_roles[1].getType(),                         Property.REQUIRED, m_roles[1].isComponent())                );        m_linkType.addKeyProperty(m_roles[1].getName());        // Make sure the link type has an empty insert event.        m_linkType.setEvent(ObjectType.INSERT, new Event());        m_linkType.setEvent(ObjectType.DELETE, new Event());        for (Iterator it = m_linkType.getKeyProperties(); it.hasNext(); ) {            Property prop = (Property) it.next();            prop.setEvent(Property.ADD, new Event());            prop.setEvent(Property.REMOVE, new Event());        }    }