ncbo / goo

Graph Oriented Objects (GOO) for Ruby. A RDF/SPARQL based ORM.
http://ncbo.github.io/goo/
Other
15 stars 6 forks source link

No parsed ontology records in AllegroGraph after ontology has been parsed #102

Closed mdorf closed 4 years ago

mdorf commented 4 years ago

There appear to be no parsed ontology records in AllegroGraph at a point in the test code, where an ontology should have been parsed. At the same point in the code, here is the content of each datastore:

4store: 4362 records, which include enum values, ontology metadata and contents
AllegroGraph: 91 record, which include only enum values and ontology metadata
mdorf commented 4 years ago

An outdated example from the AG documentation wrapped graph names with double-quotes, which resulted in request failures. After much trial-and-error, the actual working format turned out to be instead of "graph_uri”:

if backend_name == BACKEND_4STORE
  params[:payload] = {
    graph: graph.to_s,
    data: data_file,
    "mime-type" => mime_type
  }
  #for some reason \\\\ breaks parsing
  params[:payload][:data] = params[:payload][:data].split("\n").map { |x| x.sub("\\\\","") }.join("\n")
else
  params[:url] << "?context=#{CGI.escape("<#{graph.to_s}>")}"
  params[:payload] = data_file
end