internal static object ExecuteNamedSparql(string name, Dictionary <string, string> values)
        {
            var endpoint    = Resources.DB.Endpoints[name];
            var queryString = Resources.GetSparql(name);
            var query       = new SparqlParameterizedString(queryString);

            query.SetUri("schemaUri", Global.SchemaUri);

            if (endpoint.Parameters != null)
            {
                FixedQueryController.SetParameters(query, endpoint.Parameters, values);
            }

            return(FixedQueryController.ExecuteQuery(query, endpoint.Type));
        }
Пример #2
0
        internal static object ExecuteNamedSparql(string name, Dictionary <string, string> values)
        {
            var          endpoint     = Resources.GetApiPathItem(name);
            var          queryString  = Resources.GetSparql(name);
            var          query        = new SparqlParameterizedString(queryString);
            EndpointType endpointType = Resources.GetEndpointType(endpoint);

            query.SetUri("schemaUri", Global.SchemaUri);

            IEnumerable <OpenApiParameter> parameters = Resources.GetSparqlParameters(endpoint);

            if ((parameters != null) && (parameters.Any()))
            {
                FixedQueryController.SetParameters(query, parameters, values);
            }

            return(FixedQueryController.ExecuteQuery(query, endpointType));
        }