sparql

How to use AWSRequestSigningApacheInterceptor with AWS SDK2

扶醉桌前 提交于 2019-12-11 03:09:20
问题 I am trying to use REST calls to Neptune SPARQL on existing Java code which already uses Apache HTTP clients. I'd like to not mix and match AWS SDK1 and SDK2 (which I use for the S3 portion of loading owl to Neptune). I see these solutions: AWSRequestSigningApacheInterceptor that works with SDK1, but can't find the equivalent in SDK2. aws-request-signing-apache-interceptor on github for building an adaptor class so it can be used in SDK 2 with mix-and-match SDK 1 & 2 javaquery/Examples where

Parsing returns from AltLabel in a SPARQL query

只愿长相守 提交于 2019-12-11 02:35:25
问题 In a Wikidata SPARQL query such as the following, I want to be able to use a custom delimiter for the returns for ?placeOfBirthAltLabel . The problem is that some values under ?placeOfBirthAltLabel contain commas e.g. synonyms for "New York" include "New York, USA" as a single entry. However, as the returns are comma delimited, this single entry will be parsed as two separate strings. So in other words I need the return to be [New York, USA ; NYC ; NYC, USA ] as opposed to [New York, USA, NYC

SPARQL queries causing XDMP-MEMCANCELED

谁都会走 提交于 2019-12-11 02:33:28
问题 We are performing a series of different SPARQL queries on a database containing ~5 million triples. Our queries often cause a XDMP-MEMCANCELED-error though not consistently, they mostly return a correct result within a few seconds or less. Some queries occationally seems to hang and cause the server to run at 100% CPU until the query times out. We have tried increasing what memory-related settings we could find. This query runs fine on other triple stores/engines. We are running MarkLogic 8.0

How can I create customized builtins in Jena?

泄露秘密 提交于 2019-12-11 02:12:50
问题 I just wondering how I can create new custom builtins for Jena. I know that for this purpose it should be used both the class "BaseBuiltin" and the class "BuiltinRegistry" (but how ?). I have also found out a plugin for Eclipse which is called "SADL" but I am not sure if I can use if for this purpose. If I can...which method is better and why ? Could anyone of you explain me which way I should take ? Cheers! 回答1: In a follow-up to a later question of yours, I provide code demonstrating the

Federated query with secured SPARQL endpoint

南笙酒味 提交于 2019-12-11 02:04:58
问题 I'm trying to use federated queries with Jena via a Fuseki endpoint. With the SERVICE keyword in my SPARQL query, I'm connecting to a Stardog endpoint. As it's a secured URL, the endpoint is specified as follows: http://admin:admin@url. As this is not secure, Jena shows the following message: Code: 36/HAS_PASSWORD in USER: Including passwords in URIs is deprecated. According to the docs, you can specify srv:queryAuthUser and srv:queryAuthPwd for the credentials. Is there any way to do this

Syntax to query for optional relationships in Microsoft SQL Server 2017 Graph Database?

冷暖自知 提交于 2019-12-11 02:02:48
问题 I want to select optional relationships in sql-server-2017-graph. Similar to optional in sparql e.g.: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name ?mbox WHERE { ?x foaf:name ?name . OPTIONAL { ?x foaf:mbox ?mbox } } from https://www.w3.org/2001/sw/DataAccess/rq23/#OptionalMatching. And similar to LEFT JOIN in normal sql; e.g.: SELECT name, mbox FROM Persons LEFT JOIN PersonMailBoxLink ON Persons.$node_id = PersonMailBoxLink.$from_id LEFT JOIN MailBoxes ON PersonMailBoxLink.$to_id =

Count values that satisfy a constraint and return 0 for those that don't satisfy it in SPARQL

僤鯓⒐⒋嵵緔 提交于 2019-12-11 01:55:44
问题 I want to detect all values that satisfy a condition on the value of a property using a SPARQL query. For example, imagine that I want to detect all resources in which the value of rdfs:label has type xsd:string . A definition in logic could be: ∀x(stringLabel(x) ≡ ∀y(rdfs:label(x,y)→xsd:string(y))) I have found a way to do it in SPARQL as: prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix : <http://example.org/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> select ?s where { #

SPARQL apply MAX on a value of aggregation [duplicate]

試著忘記壹切 提交于 2019-12-11 01:49:25
问题 This question already has an answer here : SPARQL full aggregation on a group aggregation (1 answer) Closed 3 years ago . I have this query: prefix : <http://test.example/> select ?anotherUser (COUNT(?anotherItem) as ?countOfSharedLikedItems) WHERE { values ?user {:ania}. ?anotherUser :likes ?anotherItem. filter (?anotherUser != ?user) filter exists {?user :likes ?anotherItem} } group by ?anotherUser order by desc(?countOfSharedLikedItems) That runs on this data: @prefix : <http://test

SPARQL CONSTRUCT: does implicit subject/object influence the result?

牧云@^-^@ 提交于 2019-12-11 01:49:09
问题 I have a SPARQL CONSTRUCT like: CONSTRUCT { ?address schema:addressLocality ?city; schema:addressCountry ?country; schema:streetAddress ?addressLine; schema:postalCode ?zip; schema:addressRegion ?region. } WHERE { ?address schema:addressLocality ?city; schema:addressCountry ?country. OPTIONAL { ?address schema:streetAddress ?addressLine } OPTIONAL { ?address schema:postalCode ?zip } OPTIONAL { ?address schema:addressRegion ?region } } I'm getting fewer triples this way, than when the

Delete blank node from ontology through SPARQL UPDATE

北战南征 提交于 2019-12-11 01:48:35
问题 I am storing some data in my ontology model made in protege with help of a SPARQL UPDATE 'insert' operation. Below is the update query. PREFIX test: <http://www.semanticweb.org/muhammad/ontologies/2017/2/untitled-ontology-14#> insert { [] test:Kpi_Variable ?s ; test:hasValue_ROB4 ?p ; test:hasTime ?now . } where { values (?s ?p) { (test:Actual_Production_Time 33) } bind (now() as ?now) } It stores in the rdf graph in the following way: [ test:Kpi_Variable test:Actual_Production_Time ; test