ConcatUri() public static method

public static ConcatUri ( Uri uri ) : Uri
uri System.Uri
return System.Uri
示例#1
0
        public virtual BaseEntity UpdateProperty(BaseEntity entity, string propertyToUpdate)
        {
            var uri    = UriHelper.ConcatUri(entity.GetLocation(), "/properties");
            var result = _graphRequest.Post(RequestType.PUT, uri, propertyToUpdate);

            return(entity);
        }
示例#2
0
        internal Index GetIndex(string indexName)
        {
            Index index = new Index();

            index.SetLocation(UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/index/node/" + indexName));
            return(index);
        }
示例#3
0
        public virtual BaseEntity SetProperty(BaseEntity entity, string propertyName)
        {
            var uri    = UriHelper.ConcatUri(entity.GetLocation(), "/properties", propertyName);
            var result = _graphRequest.Post(RequestType.PUT, uri, string.Format(@"""{0}""", entity.GetProperty(propertyName)));

            return(entity);
        }
示例#4
0
        public RequestResult GetGermlinExecutionResult(Node node, string query)
        {
            query = query.Replace("#id", node.Id.ToString());
            var uri    = UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/ext/GremlinPlugin/graphdb/execute_script");
            var result = _graphRequest.Post(RequestType.POST, uri, query);

            return(result);
        }
示例#5
0
        public RequestResult GetRestExecutionResult(Node node, string query)
        {
            //Console.WriteLine(query);
            var uri    = UriHelper.ConcatUri(node.GetLocation(), "/traverse/node");
            var result = _graphRequest.Post(RequestType.POST, uri, query);

            return(result);
        }
示例#6
0
        public Node GetNode(string nodeId)
        {
            var  uri  = UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/node/" + nodeId);
            Node node = new Node();

            node.SetLocation(uri);
            return(this.GetNode(node));
        }
示例#7
0
        internal Index GetAutoIndex()
        {
            Index index = new Index();

            index.SetLocation(UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/index/auto/node"));

            return(index);
        }
示例#8
0
        public Node CreateNode(Node node)
        {
            var uri    = UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/node");
            var result = _graphRequest.Post(RequestType.POST, uri, node.GetProperties());

            node.SetLocation(result.GetLocation());

            return(node);
        }
示例#9
0
        internal Index Create(string indexName)
        {
            JObject indexNameJson = new JObject();

            indexNameJson.Add("name", new JValue(indexName));

            Index index = new Index();

            index.SetLocation(UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/index/node/" + indexName));
            var response = _graphRequest.Post(RequestType.POST, UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/index/node/"), indexNameJson.ToString());

            //Console.WriteLine(response.GetResponseData());
            return(index);
        }
示例#10
0
        public Relationship GetRelationship(string relationShipId)
        {
            var uri = UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/relationship/" + relationShipId);

            return(this.GetRelationship(uri));
        }
示例#11
0
        internal RequestResult Search(Index indexToSearch, string searchQuery)
        {
            var response = _graphRequest.Post(RequestType.GET, UriHelper.ConcatUri(indexToSearch.GetLocation(), searchQuery), null);

            return(response);
        }