It would be great if we could have local stores for a collection of remote RDF files. For example, if I wanted to get all information about myself from my employers pages, I could make an endpoint "DERI" and populate it with pages like http://deri.ie/about/lin_clark, http://deri.ie/projects/lidrc.

Then I could set a refresh rate on the store, maybe once a week for the DERI store because I know it doesn't change much and changes aren't urgent. There could also be a "refresh now" button.

The endpoint would be available from SPARQL endpoints registry. This will require API work and database schema updates.

Comments

Anonymous’s picture

StatusFileSize
new8.79 KB

This patch doesn't get all the way there, but is a good start.

-Creates endpoints from a dataset
-Enables querying with calls like sparql_request($query, NULL, array('endpoint_id' => 1))

We will want to see how we could allow multiple files for the dataset.

scor’s picture

Status: Active » Needs work
+++ b/sparql.module
@@ -129,9 +143,6 @@ function _sparql_request($query, $endpoint, $options) {
-  // @todo fix this. Error reporting is off because ARC2 throws strict warnings.
-  error_reporting(0);

did you check that this is no longer necessary?

+++ b/sparql_registry.module
@@ -185,6 +189,10 @@ function sparql_registry_field_extra_fields() {
+        'default_widget' => 'image_image',

why image?

+++ b/sparql_registry.module
@@ -272,9 +280,23 @@ function sparql_registry_form_list() {
+      '#title' => t('What type of student are you?')

??

Anonymous’s picture

This patch cleans up some of the junk that was still in the last patch (though this isn't ready for official "needs review", still)

It also moves to using a serialized array for storing the dataset, though I haven't made the database schema change to reflect that.

I will be posting another patch soon that makes a change to the API.

Anonymous’s picture

StatusFileSize
new9.84 KB

Wait, what happened to my patch?

scor’s picture

I was thinking this afternoon: how about using a misc/data column as an alternative to using fields (what we chatted about this morning), kind of the data column in the users table, where you can store whatever data you want (serialized)? the cons if you cannot directly query it in SQL but that might be ok (pros is it is schemaless at the SQL level, and no db overhead).

Anonymous’s picture

hmm, I'm not sure whether you are talking about the dataset column? This doesn't really use fields currently. It uses hook_field_extra_field which is a fake field. So the data is already serialized in the same table. Let me know if I'm misunderstanding.

What I was looking for was a way to do the "Add another" button, and I think I might be able to add that with an example from ajax_example.

scor’s picture

how about a simple textarea with one URI per line?

Anonymous’s picture

Hm, you're right, that should be a good fix for now. The "Add another" could be added later.

The only thing left to do on this will be the API change. Currently, the sparql_request takes ($query, $endpoint, $options). I would like to change it to ($query, $endpoint) where $endpoint is a SPARQL registry object. That way it will have any additional info (like read keys). If someone wants to use the API without SPARQL registry, they just need to create an object.

Any thoughts on that API change?

scor’s picture

yes, that API change sounds good.

scor’s picture

Anonymous’s picture

scor’s picture

If someone wants to use the API without SPARQL registry, they just need to create an object.

what type of object? will the API accept any stdClass? or sparqlRegistry?

Anonymous’s picture

SPARQL Registry uses stdClass, it doesn't define it's own class.