示例#1
0
 public Relation(List<KeyValuePair<string,string>> relationsWithLabels)
 {
     entities = new List<RelationEntity>();
     foreach (KeyValuePair<string,string> s in relationsWithLabels)
     {
         entities.Add(new RelationEntity( 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];
 }
示例#2
0
        public Relation(List<string> relations)
        {
            entities = new List<RelationEntity>();

            foreach (string s in relations)
            {
                entities.Add(new RelationEntity(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];
        }
示例#3
0
 public Relation(List <KeyValuePair <string, string> > relationsWithLabels)
 {
     entities = new List <RelationEntity>();
     foreach (KeyValuePair <string, string> s in relationsWithLabels)
     {
         entities.Add(new RelationEntity(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];
 }
示例#4
0
        public Relation(List <string> relations)
        {
            entities = new List <RelationEntity>();

            foreach (string s in relations)
            {
                entities.Add(new RelationEntity(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];
        }
示例#5
0
 public Relation()
 {
     this.source      = new RelationEntity();
     this.destination = new RelationEntity();
     this.entities    = new List <RelationEntity>();
 }
示例#6
0
 public Relation()
 {
     this.source = new RelationEntity();
     this.destination = new RelationEntity();
     this.entities = new List<RelationEntity>();
 }
示例#7
0
 public RelationEntity(string uri, string label, RelationEntity next)
 {
     this.uri   = uri;
     this.label = label;
     this.next  = next;
 }
示例#8
0
 public RelationEntity()
 {
     next = new RelationEntity();
 }
 public RelationEntity(string uri, string label, RelationEntity next)
 {
     this.uri = uri;
     this.label = label;
     this.next = next;
 }
示例#10
0
 public RelationEntity()
 {
     next = new RelationEntity();
 }