-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store::SPARQL reads and writes to Virtuoso (>=6.1.7) #113
base: master
Are you sure you want to change the base?
Conversation
I'm not sure what's going on with some parts of the patch here. It seems they're coming from my repo, but didn't rebase correctly...? I've tried to merge it with my HEAD in the new kasei:merge-dorian-sparql-auth branch. I'm also going to add some comments to specific parts of the pull request asking some questions... |
@@ -247,6 +247,8 @@ sub end_element { | |||
push( @{ $results{ $addr } }, $vb ); | |||
} | |||
} elsif ($tag eq 'bnode') { | |||
# guess what! virtuoso uses funny bnodes | |||
$string =~ s!nodeID://!!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd much prefer we didn't hard-code this, and instead found some way to modularize the code so that the SPARQL store could apply this fix only when it thinks necessary (or have it be applied to all results, but only when called from the SPARQL store or when explicitly requested). I'll try to think about what sort of API would work well for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here is that bnodes come through the sparql-results+xml format as nodeID://… The net effect is that without that line, the SPARQL results XML parser crashes when it tries to create a malformed bnode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, understood. I'd just like to fix this by updating the API instead of hard-coding the fix into the XML parser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure how to do this, other than making some kind of callback you can pass into the constructor (ugly), or otherwise a Virtuoso-specific subclass (worse).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the ::Iterator::SAXHandler constructor could already take optional configuration arguments, it just wasn't documented. I've updated the code to allow passing in a custom handler to generate the bnode IDs. Have a look at commit eea4393.
I didn't notice this:
I'm not sure. This is branched off 7e9559d. I had to do major, major surgery to my repo to tease apart disparate patches. It's possible I (or it) screwed something up. It seems like other PRs didn't have any issues like that, however. So how about this:
|
Do you have an example Virtuoso results file (with the "nodeID://" stuff included) that I can use in testing? |
Oh, never mind. Realized I could get one from DBPedia. |
Sure, I have to sync up anyway. |
We're probably going to have to chat about this one:
q=
values in theAccept:
header, which made response handling complicated. At the moment it's hard-coded to JSON because V does some stupid, stupid behaviour otherwise.Otherwise, it works.