app/models/trait_bank.rb
# NOTE that this is stupid syntax, but it's what you have to do with Sparql.
# Yes, it looks very redundant! NOTE: limit must be restricted as the SQL
# query can get too long. Sigh. NOTE: ARGH! Doesn't work reliably in batches; must be done one at a time to work...
NOTE that this is stupid syntax, but it's what you have to do with Sparql.
Yes, it looks very redundant. NOTE: limit must be restricted as the SQL
query can get too long. Sigh. NOTE: ARGH. Doesn't work reliably in batches; must be done one at a time to work
NOTE that this is stupid syntax but it ' s what you have to do with Sparql . Yes it looks very redundant . NOTE : limit must be restricted as the SQL query can get too long . Sigh . NOTE : ARGH . Doesn ' t work reliably in batches ; must be done one at a time to work
def delete(triples, graph_name = nil)
      graph_name ||= graph
      triples.each do |triple_string|
        query = "WITH GRAPH <#{graph_name}> DELETE { #{triple_string} } "\
          "WHERE { #{triple_string} }"
        begin
          connection.query(query)
        rescue EOL::Exceptions::SparqlDataEmpty => e
        end
      end
    end
def delete ( triples , graph_name = nil ) graph_name ||= graph triples . each do | triple_string | query = "WITH GRAPH <#{graph_name}> DELETE { #{triple_string} } " "WHERE { #{triple_string} }" begin connection . query ( query ) rescue EOL :: Exceptions :: SparqlDataEmpty => e end end end
NOTE that this is stupid syntax, but it's what you have to do with Sparql.
NOTE that this is stupid syntax but it ' s what you have to do with Sparql .
# triple_string = triples.join(" . ") # Do nothing... this is acceptable for a delete...
triples
<not_specific>
graph_name
<not_specific>