Skip to content

Commit

Permalink
POSTs not right
Browse files Browse the repository at this point in the history
  • Loading branch information
danja committed Aug 4, 2023
1 parent e6d8b47 commit 4bcaa4c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
15 changes: 15 additions & 0 deletions docs/devlog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**2023-08-04**

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?class ?label ?description
WHERE {
?s rdf:type ?class .
OPTIONAL { ?class rdfs:label ?label}
OPTIONAL { ?class rdfs:comment ?description}
}
LIMIT 25


8 changes: 7 additions & 1 deletion src/main/java/it/danja/newsmonitor/io/SparqlConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,15 @@ public synchronized String query(String queryEndpoint, String sparql) {
new UsernamePasswordCredentials(config.getProperty("USERNAME"), config.getProperty("PASSWORD")));
HttpClientContext context = HttpClientContext.create();
context.setCredentialsProvider(credsProvider);

// 2023
System.out.println("request : "+request);
System.out.println("User : "+config.getProperty("USERNAME"));
System.out.println("Pass : "+config.getProperty("PASSWORD"));

try {
response = client.execute(targetHost, request, context);
response = client.execute(request);
// response = client.execute(request);
} catch (ClientProtocolException e) {
log.error(e.getMessage());
} catch (IOException e) {
Expand Down

0 comments on commit 4bcaa4c

Please sign in to comment.