diff options
Diffstat (limited to 'lib/utils/sparql/dataset.rb')
-rw-r--r-- | lib/utils/sparql/dataset.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/utils/sparql/dataset.rb b/lib/utils/sparql/dataset.rb index 7ba57ee..ecf55b6 100644 --- a/lib/utils/sparql/dataset.rb +++ b/lib/utils/sparql/dataset.rb @@ -51,9 +51,8 @@ module OpenTox # @return [Array] compounds Compounds in order def self.find_compounds_sparql(uri) sparql = "SELECT DISTINCT ?compound FROM <#{uri}> WHERE { - ?s <#{RDF.type}> <#{RDF::OT.DataEntry}> ; - <#{RDF::OLO.index}> ?cidx; - <#{RDF::OT.compound}> ?compound + ?compound <#{RDF.type}> <#{RDF::OT.Compound}> ; + <#{RDF::OLO.index}> ?cidx; } ORDER BY ?cidx" OpenTox::Backend::FourStore.query(sparql, "text/uri-list").split("\n").collect { |uri| OpenTox::Compound.new uri.strip } end |