KnowledgeCaptureAndDiscovery / DISK-API

Apache License 2.0
3 stars 1 forks source link

Bike rented examples doesn't work #53

Closed mosoriob closed 1 year ago

mosoriob commented 2 years ago

I have created a LOI and Hypotheses.

When I trigger the execution, the query doesn't work.

The problem seems to be that the code is adding the workflow variables. However, the workflow variables are not included in the query

https://github.com/KnowledgeCaptureAndDiscovery/DISK-WEB/blob/7039e9089b2f0f5062217d161b43367466c9c4c2/server/src/main/java/org/diskproject/server/repository/DiskRepository.java#L1205

You can check the error using dev tools

Error querying endpoint: 

PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX disk: <http://disk-project.org/ontology/disk#>
PREFIX hyp: <http://disk-project.org/ontology/hypothesis#>
SELECT DISTINCT ?ClimateVariable1 ?ClimateVariable2 ?url ?ClimateVariable3 {
?resource <http://disk-project.org/ontology/disk#hasVariableName> "Temperature", "Temperature", "Temperature" ;?resource <http://www.w3.org/ns/dcat#downloadURL> ?URL
}

Encountered " <VAR1> "?url "" at line 8, column 51.Was expecting one of:    "values" ...    "graph" ...    "optional" ...    "minus" ...    "bind" ...    "service" ...    "filter" ...    "{" ...    "}" ...    ";" ...    "," ...    "." ...    
mosoriob commented 2 years ago

@hvarg help!

hvarg commented 2 years ago

Thats non valid sparql, The query should be:

SELECT DISTINCT ?ClimateVariable1 ?ClimateVariable2 ?url ?ClimateVariable3 {
  ?resource <http://disk-project.org/ontology/disk#hasVariableName> "Temperature",
                                                                    "Temperature", 
                                                                    "Temperature" ;
            <http://www.w3.org/ns/dcat#downloadURL> ?URL .
}

after a ; you must follow with two resources

mosoriob commented 1 year ago

Thanks. The server sends a 400 bad request when the query doesn't parse