This SPARQL query example works fine:
require 'sparql/client'
rdfs_vocabulary = RDF::Vocabulary.new("http://www.w3.org/2000/01/rdf-schema#")
sparql_client.select.where(:x, rdfs_vocabulary.subClassOf, :type)
Extending it with the Property Path *
operator to get all subclasses, the following syntax works as well:
sparql_client.select.where(:x, "<http://www.w3.org/2000/01/rdf-schema#subClassOf>*", :type)
but is it possible to avoid the full-URI?
Try
sparql_client.select.where([:x, [RDF::RDFS.subClassOf,"*"], :type])
.See query_spec.rb. Related GitHub issue.