The Open Anzo Project

Semantic Application Middleware

Ticket #80 (closed task: fixed)

Opened 1 year ago

Last modified 1 year ago

Add SolutionGenerator for OpenRDF graphs

Reported by: jpbetz Assigned to: jpbetz
Priority: major Milestone: 3.0 milestone1
Component: openanzo-glitter Version: 3.0
Keywords: openrdf Cc: lee

Description

Need to be able to glitter against OpenRDF graphs, primarily for testing purposes.

Change History

10/30/07 17:41:34 changed by jpbetz

(In [662]) re #80 reviewer: lee

Add a solution generator for OpenRDF graphs: GraphSolutionGenerator? Test GraphSolutionGenerator? and GraphEngineConfig? Clean up solution generator class hiarchy Fix BGP clone to perform deep copy Add flags to regression tests and start scripts to run anzo server with '-server' Increase memory allowances for maven, surefire and regress anzo server to 1024M

10/31/07 22:38:31 changed by jpbetz

  • owner changed from jpbetz to lee.

11/05/07 17:21:43 changed by lee

  • owner changed from lee to jpbetz.

It all looks good except for:

  104	                    if (namedGraphVariable != null && context != null) {
  105 	                        solution.setBinding(namedGraphVariable, context);
  106 	                    }

...if you're binding graph variables you need to make sure that the graph variable is not already bound to a different value. If it is already bound to a different value, you should reject that solution. Consider:

  GRAPH ?g {
    ?g a :reallyCoolGraph .
  }

11/05/07 18:59:47 changed by jpbetz

  • owner changed from jpbetz to lee.

interesting. Wouldn't the correct solution be to write a general purpose validator we use to check all graphs for this issue rather than require the solution generator implementations handle it?

11/05/07 19:01:54 changed by jpbetz

  • owner changed from lee to jpbetz.

my bad, I understand. This is not an error but an invalid solution. Will fix.

11/05/07 19:05:59 changed by lee

Of course, the query executor _does_ do this on its own if the solution generator doesn't claim to handle graph variables correctly (that is, return true to canBindGraphVariables returns true).

If the solution generator does bind graph variables, it's guaranteeing to do it correctly. There are three things at work here, two philosophical and one practical:

  • Philosophical. The executor is allowed to trust the solution generator when it claims to have provided solutions to part of the query.
  • Philosophical. The executor should not spend time double-checking something that the solution generator provides.
  • Practical. There's no way the executor could check this if it wanted to. If the query is as above and I hand your solution generator the triple pattern node:
      ?g a :reallyCoolGraph .
    

and I get back the result ?g = ex:graph1 -- there's no way for the executor to know whether that binding matched the provenance of the named graph it was from the way the query pattern requires it to.

11/10/07 00:30:43 changed by jpbetz

(In [767]) re #80 review followup

Fix bound variable matching in GraphSolutionGenerator? and LdapSolutionGenerator?. Add tests for bound variable matching.

11/10/07 00:31:06 changed by jpbetz

  • status changed from new to closed.
  • resolution set to fixed.
Copyright © 2007 - 2008 OpenAnzo.org