Method: PubliSci::Query#execute
- Defined in:
- lib/publisci/query/query_helper.rb
#execute(string, store, type = :fourstore) ⇒ Object
def execute_internal(query,repo)
SPARQL.execute(query,repo)
end
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/publisci/query/query_helper.rb', line 39 def execute(string,store,type=:fourstore) if store.is_a?(PubliSci::Store) || store.is_a?(RDF::FourStore) sparql = SPARQL::Client.new(store.url+"/sparql/") elsif type == :graph || store.is_a?(RDF::Graph) || store.is_a?(RDF::Repository) sparql = SPARQL::Client.new(store) elsif type == :fourstore sparql = SPARQL::Client.new(store+"/sparql/") end sparql.query(string) end |