A model element is a relationship, if it implements one of the following interfaces:
For checking if the model element is a relationship, call the com.nomagic.uml2.ext.jmi.helpers.CoreHelper.isRelationship(Element) method.
For getting supplier and client elements of a relationship, use CoreHelper class getSupplierElement(Element), getClientElement(Element) methods.
Use CoreHelper class setSupplierElement(Element, Element) , setClientElement(Element, Element) methods to set supplier and client elements of a relationship.
To create a new Relationship