collect direct relationship relationship object sourc object dest sourc element dest element illeg argument except sourc dest instanc element non nl collect direct relationship result arrai list direct relationship direct relationship element sourc sourc direct relationship target contain dest result add direct relationship element sourc target direct relationship sourc contain dest result add result 