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

AllegroGraph request chain breaks with existing Goo code #101

Closed mdorf closed 4 years ago

mdorf commented 4 years ago

Out-of-the-box, the GOO implementation of request chain does not work properly with AllegroGraph.

mdorf commented 4 years ago

The format of the request differs between 4store (4s) and AllegroGraph (AG):

4s - the body of the message contained a hash of two values:

{ 
  graph: "http://data.bioontology.org/ontologies/MAPPING_TEST1/submissions/11",
  data: "the actual graph data in turtle format"
}

AG - the graph name passed as a (query) parameter called "context” and body of the POST had to contain solely the actual graph data (no individual parameters):

http://server:port/repositories/bioportal/statements?context=%22http%3A%2F%2Fdata.bioontology.org%2Fontologies%2FMAPPING_TEST1%2Fsubmissions%2F11%22

Solution:

  1. Added the type of backend as a configurable parameter.
  2. Modified the append_triples_no_bnodes method to allow connections to both 4store and AllegroGraph. AllegroGraph supposedly uses the "standard" request format.