Ejemplo n.º 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];
 }
Ejemplo n.º 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];
        }
Ejemplo n.º 3
0
 public entity(string uri, string label, entity next)
 {
     this.uri = uri;
     this.label = label;
     this.next = next;
 }
Ejemplo n.º 4
0
 public relation()
 {
     this.source = new entity();
     this.destination = new entity();
     this.entities = new List<entity>();
 }
Ejemplo n.º 5
0
 public entity()
 {
     next = new entity();
 }