Esempio n. 1
0
  public boolean isFromEdgeLink(Group g) {
    final Group g1 = EntityUtils.getContainerOrEquivalent(getEntity1());
    final Group g2 = EntityUtils.getContainerOrEquivalent(getEntity2());
    if (EntityUtils.equals(g1, g) == false || EntityUtils.equals(g2, g) == false) {
      return false;
    }
    assert EntityUtils.equals(g1, g) && EntityUtils.equals(g2, g);
    if (isAutolink(g)) {
      return false;
    }

    if (((EntityMutable) getEntity1()).isGroup()) {
      assert ((EntityMutable) getEntity2()).isGroup() == false;
      return true;
    }
    return false;
  }
Esempio n. 2
0
 public Link mute(Group g, IEntity proxy) {
   final Group g1 = EntityUtils.getContainerOrEquivalent(cl1);
   final Group g2 = EntityUtils.getContainerOrEquivalent(cl2);
   if (EntityUtils.equals(g1, g)
       && ((IEntityMutable) cl1).isGroup() == false
       && EntityUtils.equals(g, g2)
       && ((IEntityMutable) cl2).isGroup() == false) {
     return null;
   }
   final IEntity ent1 = muteProxy(cl1, g, proxy);
   final IEntity ent2 = muteProxy(cl2, g, proxy);
   if (this.cl1 == ent1 && this.cl2 == ent2) {
     return this;
   }
   return new Link(
       ent1, ent2, getType(), label, length, qualifier1, qualifier2, labeldistance, labelangle);
 }