bridgepoint/ooaofooa.py
def mk_linked_association(m, r_assoc):
    '''
    Create pyxtuml associations from a linked association in BridgePoint.
    '''
    r_rel = one(r_assoc).R_REL[206]()
    r_rgo = one(r_assoc).R_ASSR[211].R_RGO[205]()
    source_o_obj = one(r_rgo).R_OIR[203].O_OBJ[201]()
    
    def _mk_assoc(side1, side2):
        r_rto = one(side1).R_RTO[204]()

        target_o_obj = one(r_rto).R_OIR[203].O_OBJ[201]()
        source_ids, target_ids = _get_related_attributes(r_rgo, r_rto)
        if side1.Obj_ID != side2.Obj_ID:
            source_phrase = target_phrase = ''
        else:
            source_phrase = side1.Txt_Phrs
            target_phrase = side2.Txt_Phrs
            
        m.define_association(rel_id=r_rel.Numb, 
                             source_kind=source_o_obj.Key_Lett,
                             target_kind=target_o_obj.Key_Lett,
                             source_keys=source_ids,
                             target_keys=target_ids,
                             source_conditional=side2.Cond,
                             target_conditional=False,
                             source_phrase=source_phrase,
                             target_phrase=target_phrase,
                             source_many=side2.Mult,
                             target_many=False)
        
    r_aone = one(r_assoc).R_AONE[209]()
    r_aoth = one(r_assoc).R_AOTH[210]()
    
    _mk_assoc(r_aone, r_aoth)
    _mk_assoc(r_aoth, r_aone)
def mk_linked_association(m, r_assoc):
    '''
    Create pyxtuml associations from a linked association in BridgePoint.
    '''
    r_rel = one(r_assoc).R_REL[206]()
    r_rgo = one(r_assoc).R_ASSR[211].R_RGO[205]()
    source_o_obj = one(r_rgo).R_OIR[203].O_OBJ[201]()
    
    def _mk_assoc(side1, side2):
        r_rto = one(side1).R_RTO[204]()

        target_o_obj = one(r_rto).R_OIR[203].O_OBJ[201]()
        source_ids, target_ids = _get_related_attributes(r_rgo, r_rto)
        if side1.Obj_ID != side2.Obj_ID:
            source_phrase = target_phrase = ''
        else:
            source_phrase = side1.Txt_Phrs
            target_phrase = side2.Txt_Phrs
            
        m.define_association(rel_id=r_rel.Numb, 
                             source_kind=source_o_obj.Key_Lett,
                             target_kind=target_o_obj.Key_Lett,
                             source_keys=source_ids,
                             target_keys=target_ids,
                             source_conditional=side2.Cond,
                             target_conditional=False,
                             source_phrase=source_phrase,
                             target_phrase=target_phrase,
                             source_many=side2.Mult,
                             target_many=False)
        
    r_aone = one(r_assoc).R_AONE[209]()
    r_aoth = one(r_assoc).R_AOTH[210]()
    
    _mk_assoc(r_aone, r_aoth)
    _mk_assoc(r_aoth, r_aone)
def mk_linked_association ( m , r_assoc ) : r_rel = one ( r_assoc ) . R_REL [ 206 ] ( ) r_rgo = one ( r_assoc ) . R_ASSR [ 211 ] . R_RGO [ 205 ] ( ) source_o_obj = one ( r_rgo ) . R_OIR [ 203 ] . O_OBJ [ 201 ] ( ) def _mk_assoc ( side1 , side2 ) : r_rto = one ( side1 ) . R_RTO [ 204 ] ( ) target_o_obj = one ( r_rto ) . R_OIR [ 203 ] . O_OBJ [ 201 ] ( ) source_ids , target_ids = _get_related_attributes ( r_rgo , r_rto ) if side1 . Obj_ID != side2 . Obj_ID : source_phrase = target_phrase = '' else : source_phrase = side1 . Txt_Phrs target_phrase = side2 . Txt_Phrs m . define_association ( rel_id = r_rel . Numb , source_kind = source_o_obj . Key_Lett , target_kind = target_o_obj . Key_Lett , source_keys = source_ids , target_keys = target_ids , source_conditional = side2 . Cond , target_conditional = False , source_phrase = source_phrase , target_phrase = target_phrase , source_many = side2 . Mult , target_many = False ) r_aone = one ( r_assoc ) . R_AONE [ 209 ] ( ) r_aoth = one ( r_assoc ) . R_AOTH [ 210 ] ( ) _mk_assoc ( r_aone , r_aoth ) _mk_assoc ( r_aoth , r_aone )
Create pyxtuml associations from a linked association in BridgePoint.
Create pyxtuml associations from a linked association in BridgePoint .