Ejemplo n.º 1
0
    public string testQuery(string q)
    {
        Dictionary <int, string> vertexLabel = new Dictionary <int, string>();

        vertexLabel[3] = "<http://www.Department2.University1.edu/GraduateStudent*";
        vertexLabel[5] = "<http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#GraduateStudent>";
        //vertexLabel[2] = "<http://www.Department2.University1.edu/FullProfessor0/Publication*";
        List <GBE.Core.EdgeID> edgeLabel = new List <GBE.Core.EdgeID>();
        var edge = new GBE.Core.EdgeID(3, 5, "#type");

        edgeLabel.Add(edge);
        // edge = new GBE.Core.EdgeID(2, 0, "#publicationAuthor");
        // edgeLabel.Add(edge);

        var    res      = RunQuery(vertexLabel, edgeLabel);
        string toReturn = "";

        foreach (var r in res)
        {
            foreach (KeyValuePair <int, string> kv in r)
            {
                toReturn += kv.Key + " " + kv.Value + ", ";
            }
            toReturn += " -- ";
        }
        return(toReturn);
    }
Ejemplo n.º 2
0
        protected virtual void AddPathRelationShip(PathRelationShip path)
        {
            AddRelationship(path);
            //the following two is to add the edges to the array we want. it is put here because both the insert new and the load will go through this stage.
            EdgeID edgeID = new EdgeID(path.FirstVertex.ID, path.SecondVertex.ID, path.Label);

            pathLabel.Add(edgeID);
        }
Ejemplo n.º 3
0
        protected virtual void AddEdgeRelationship(EdgeRelationship edgeRelationship)
        {
            AddRelationship(edgeRelationship);
            //the following two is to add the edges to the array we want. it is put here because both the insert new and the load will go through this stage.
            EdgeID edgeID = new EdgeID(edgeRelationship.FirstVertex.ID, edgeRelationship.SecondVertex.ID, edgeRelationship.Label);

            edgeLabel.Add(edgeID);
        }
    public string testQuery(string q)
    {
        Dictionary<int, string> vertexLabel = new Dictionary<int, string>();
        vertexLabel[3] = "<http://www.Department2.University1.edu/GraduateStudent*";
        vertexLabel[5] = "<http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#GraduateStudent>";
           //vertexLabel[2] = "<http://www.Department2.University1.edu/FullProfessor0/Publication*";
        List<GBE.Core.EdgeID> edgeLabel = new List<GBE.Core.EdgeID>();
        var edge = new GBE.Core.EdgeID(3, 5, "#type");
        edgeLabel.Add(edge);
           // edge = new GBE.Core.EdgeID(2, 0, "#publicationAuthor");
           // edgeLabel.Add(edge);

        var res = RunQuery(vertexLabel, edgeLabel);
        string toReturn = "";
        foreach(var r in res)
        {
            foreach(KeyValuePair<int,string> kv in r)
            {
                toReturn += kv.Key + " " + kv.Value + ", ";
            }
            toReturn += " -- ";
        }
        return toReturn;
    }
 protected virtual void AddPathRelationShip(PathRelationShip path)
 {
     AddRelationship(path);
     //the following two is to add the edges to the array we want. it is put here because both the insert new and the load will go through this stage.
     EdgeID edgeID = new EdgeID(path.FirstVertex.ID, path.SecondVertex.ID, path.Label);
     pathLabel.Add(edgeID);
 }
 protected virtual void AddEdgeRelationship(EdgeRelationship edgeRelationship)
 {
     AddRelationship(edgeRelationship);
     //the following two is to add the edges to the array we want. it is put here because both the insert new and the load will go through this stage.
     EdgeID edgeID = new EdgeID(edgeRelationship.FirstVertex.ID, edgeRelationship.SecondVertex.ID, edgeRelationship.Label);
     edgeLabel.Add(edgeID);
 }