Beispiel #1
0
 public relation(List<KeyValuePair<string,string>> relationsWithLabels)
 {
     entities = new List<entity>();
     foreach (KeyValuePair<string,string> s in relationsWithLabels)
     {
         entities.Add(new entity( s.Key , s.Value, null));
     }
     for (int i = 0; i < relationsWithLabels.Count ; i++)
     {
         if (i < entities.Count - 1)
             this.entities[i].next = this.entities[i + 1];
     }
     source = entities[0];
     destination = entities[entities.Count - 1];
 }
Beispiel #2
0
        public relation(List<string> relations)
        {
            entities = new List<entity>();

            foreach (string s in relations)
            {
                entities.Add(new entity(s,null,null));
            }
            for (int i = 0; i < relations.Count; i++)
            {
                if(i < entities.Count-1 )
                this.entities[i].next = this.entities[i+1];
            }
            source = entities[0];
            destination = entities[entities.Count - 1];
        }
Beispiel #3
0
 public entity(string uri, string label, entity next)
 {
     this.uri = uri;
     this.label = label;
     this.next = next;
 }
Beispiel #4
0
 public entity()
 {
     next = new entity();
 }
Beispiel #5
0
 public relation()
 {
     this.source = new entity();
     this.destination = new entity();
     this.entities = new List<entity>();
 }