Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OpenLink Virtuoso #24

Closed
fonji opened this issue Nov 6, 2013 · 2 comments
Closed

Support for OpenLink Virtuoso #24

fonji opened this issue Nov 6, 2013 · 2 comments

Comments

@fonji
Copy link

fonji commented Nov 6, 2013

Hello!

We changed our server to use OpenLink Virtuoso (because reasons), which is a bit meticulous.

Virtuoso doesn't like this query:

DESCRIBE ?uri WHERE {
  SELECT DISTINCT ?uri ?graph WHERE { 
    GRAPH ?graph { 
      ?uri a <http://www.w3.org/2004/02/skos/core#Concept> . 
      ?uri ?p ?o . 
      FILTER(?uri = <http://www.isyrare.fr/bamara/disease#93593> 
        || ?uri = <http://www.isyrare.fr/bamara/disease#98666> 
        || ?uri = <http://www.isyrare.fr/bamara/disease#79207> 
        || ?uri = <http://www.isyrare.fr/bamara/disease#98711> 
        || ?uri = <http://www.isyrare.fr/bamara/disease#98713>
      ) 
    } 
  } 
}

It will respond

37000 Error SP030: SPARQL compiler, line 2: syntax error at 'SELECT' before 'DISTINCT'

Solution is to use double {{ }}:

DESCRIBE ?uri WHERE {{ 
  SELECT DISTINCT ?uri ?graph WHERE { 
    GRAPH ?graph { 
      ?uri a <http://www.w3.org/2004/02/skos/core#Concept> . 
      ?uri ?p ?o . 
      FILTER(?uri = <http://www.isyrare.fr/bamara/disease#93593> 
        || ?uri = <http://www.isyrare.fr/bamara/disease#98666> 
        || ?uri = <http://www.isyrare.fr/bamara/disease#79207> 
        || ?uri = <http://www.isyrare.fr/bamara/disease#98711> 
        || ?uri = <http://www.isyrare.fr/bamara/disease#98713>
      ) 
    } 
  } 
}}

And then it's happy.
I don't know how other servers will react to this, but I patched my fork anyway.
Here's the commit.

Hope this helps.
Stay tuned, I still have stuff that doesn't want to work nicely. But it will.

@fonji
Copy link
Author

fonji commented Nov 6, 2013

Nevermind the other problems. After first investigation it seems to be more a rails 4 problem than a virtuoso one.
I'll keep you up to date.

@fonji
Copy link
Author

fonji commented Nov 6, 2013

#20 duplicate. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant