relation editing for multiple selections
[potlatch2.git] / net / systemeD / halcyon / connection / Entity.as
index eac19a376238a87cb1581d671a9b746d6184dcd3..3e9204df4bb295a01f5b9d993d5c1b2bac654efc 100644 (file)
@@ -300,6 +300,22 @@ package net.systemeD.halcyon.connection {
             return a;
         }
 
+               public function getRelationMemberships():Array {
+                       var memberships:Array = [];
+                       for each( var rel:Relation in parentRelations ) {
+                               for each( var memberIndex:int in rel.findEntityMemberIndexes(this)) {
+                                       memberships.push({
+                                               relation: rel,
+                                               id: rel.id,
+                                               index: memberIndex,
+                                               role: rel.getMember(memberIndex).role,
+                                               description: rel.getDescription(),
+                                               id_idx: rel.id + "/"+memberIndex });
+                               }
+                       }
+                       return memberships;
+               }
+
         /** How many parents does this entity have that satisfy the "within" constraint? */
         public function countParentObjects(within:Object):uint {
             var count:uint=0;