Esempio n. 1
0
        /*********************************************************************
        * calls for general learning
        *********************************************************************/
        public void learn(clsConcept subjectConcept, clsConcept typeConcept, clsConcept objectConcept)
        {
            clsRelationship relationship = subjectConcept.objectRelationship(typeConcept, objectConcept);

            if (relationship == null)
            {
                subjectConcept.connectObject(typeConcept, objectConcept);
            }
        }
Esempio n. 2
0
 public void connectObject(clsRelationship relationship)
 {
     if (relationship.subjectConcept == this)
     {
         if (!_objectRelationships.Contains(relationship))
         {
             _objectRelationships.Add(relationship);
         }
     }
 }
Esempio n. 3
0
        // make a parent relationship between this object and a subject (subject is object)
        public clsRelationship connectObject(clsConcept typeConcept, clsConcept objectConcept)
        {
            clsRelationship relationship = this.objectRelationship(typeConcept, objectConcept);

            if (relationship == null)
            {
                relationship = new clsRelationship(this, typeConcept, objectConcept);
                _objectRelationships.Add(relationship);
                objectConcept.connectSubject(relationship);
            }
            return(relationship);
        }
Esempio n. 4
0
        // make a child relationship between this subject and an object (subject is object)
        public clsRelationship connectSubject(clsConcept typeConcept, clsConcept subjectConcept)
        {
            clsRelationship relationship = this.subjectRelationship(typeConcept, subjectConcept);

            if (relationship == null)
            {
                relationship = new clsRelationship(subjectConcept, typeConcept, this);
                _subjectRelationships.Add(relationship);
                subjectConcept.connectObject(relationship);
            }
            return(relationship);
        }