示例#1
0
 public object Visit(CogniPy.CNL.DL.DataRoleDisjoint e)
 {
     using (isKindOf.set(EntityKind.DataRole))
     {
         StringBuilder sb = new StringBuilder();
         if (e.Disjoints.Count == 2)
         {
             sb.Append(e.Disjoints[0].accept(this));
             sb.Append("⋐¬");
             sb.Append(e.Disjoints[1].accept(this));
         }
         else
         {
             sb.Append("¬≣(");
             bool first = true;
             foreach (var x in e.Disjoints)
             {
                 if (first)
                 {
                     first = false;
                 }
                 else
                 {
                     sb.Append(",");
                 }
                 sb.Append(x.accept(this));
             }
             sb.Append(")");
         }
         return(sb.ToString());
     }
 }
示例#2
0
 public virtual object Visit(CogniPy.CNL.DL.DataRoleDisjoint e)
 {
     using (isKindOf.set("D"))
     {
         for (int i = 0; i < e.Disjoints.Count; i++)
         {
             e.Disjoints[i].accept(this);
         }
         return(e);
     }
 }