Example #1
0
 public object Visit(CogniPy.CNL.DL.RoleEquivalence e)
 {
     using (isKindOf.set(EntityKind.Role))
     {
         StringBuilder sb = new StringBuilder();
         if (e.Equivalents.Count == 2)
         {
             sb.Append(e.Equivalents[0].accept(this));
             sb.Append("≗");
             sb.Append(e.Equivalents[1].accept(this));
         }
         else
         {
             sb.Append("≗(");
             bool first = true;
             foreach (var x in e.Equivalents)
             {
                 if (first)
                 {
                     first = false;
                 }
                 else
                 {
                     sb.Append(",");
                 }
                 sb.Append(x.accept(this));
             }
             sb.Append(")");
         }
         return(sb.ToString());
     }
 }
Example #2
0
 public virtual object Visit(CogniPy.CNL.DL.RoleEquivalence e)
 {
     using (isKindOf.set("R"))
     {
         for (int i = 0; i < e.Equivalents.Count; i++)
         {
             e.Equivalents[i].accept(this);
         }
         return(e);
     }
 }