Git Product home page Git Product logo

Comments (3)

JanWielemaker avatar JanWielemaker commented on July 20, 2024

Not really sure, but i think that the predicate cannot be a bnode.

   JanWouter Beek [email protected] wrote:Posting the following SPARQL Update request to a ClioPatria instance throws a syntax error:

INSERT DATA { _:1 _:1 _:1 . }
Reproducing code, assuming a ClioPatria instance is running at localhost port 3020:

:- module(
test_sparql_update,
[
test_sparql_update/0
]
).

/** Test SPARQL Update

This tests the occurrence of blank nodes in SPARQL Update INSERT DATA
in ClioPatria.

@author Wouter Beek
@Version 2014/06/16
*/

:- use_module(library(ansi_term)).
:- use_module(library(base64)).
:- use_module(library(debug)).
:- use_module(library(http/http_client)).

:- debug(test_sparql_update).

test_sparql_update:-
% ClioPatria user name.
format(user_output, 'Enter a ClioPatria user name.\n', []),
read_line_to_string(user_input, User),

% ClioPatria password.
format(user_output, 'Enter the password for user ~s.\n', [User]),
read_line_to_string(user_input, Password),

phrase(test_sparql_update, Query),
http_authentication(User, Password, Authentication),
http_post(
'http://localhost:3020/sparql/update',
codes('application/sparql-update', Query),
Reply,
[request_header('Authorization'=Authentication)]
),
debug(test_sparql_update, 'Reply: ~w', [Reply]).

test_sparql_update -->
INSERT DATA { _:1 _:1 _:1 . }.

http_authentication(User, Password, Authentication):-
atomics_to_string([User,Password], ':', Plain),
base64(Plain, Encoded),
atomics_to_string(['Basic',Encoded], ' ', Authentication).

Reply to this email directly or view it on GitHub.

from cliopatria.

wouterbeek avatar wouterbeek commented on July 20, 2024

Sorry, that was a copy/paste mistake. Please have a look at the updated question, in which the predicate is no longer a bnode.

from cliopatria.

wouterbeek avatar wouterbeek commented on July 20, 2024

Solved!

from cliopatria.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.