Beispiel #1
0
 public virtual object Visit(CogniPy.CNL.DL.RelatedInstances e)
 {
     using (isKindOf.set("R"))
     {
         e.R.accept(this);
     }
     e.I.accept(this);
     e.J.accept(this);
     return(e);
 }
Beispiel #2
0
        public object Visit(CogniPy.CNL.DL.RelatedInstances e)
        {
            StringBuilder sb = new StringBuilder();

            using (isKindOf.set(EntityKind.Role))
            {
                sb.Append(e.R.accept(this));
                sb.Append(Modality(e.modality));
            }
            sb.Append("(");
            sb.Append(e.I.accept(this));
            if (e.I is NamedInstance)
            {
                signature.Add(Tuple.Create(EntityKind.Instance, (e.I as NamedInstance).name));
            }
            sb.Append(",");
            sb.Append(e.J.accept(this));
            if (e.J is NamedInstance)
            {
                signature.Add(Tuple.Create(EntityKind.Instance, (e.J as NamedInstance).name));
            }
            sb.Append(")");
            return(sb.ToString());
        }