[ckan-changes] commit/ckanext-rdf: pudo: support for in-process updating of a connected SPARQL store; given that the store supports SPAQL Update 1.1 (which none do AFAIK)

Bitbucket commits-noreply at bitbucket.org
Thu Jun 9 13:59:15 UTC 2011


1 new changeset in ckanext-rdf:

http://bitbucket.org/okfn/ckanext-rdf/changeset/2dcbf8434b5f/
changeset:   2dcbf8434b5f
user:        pudo
date:        2011-06-08 10:25:16
summary:     support for in-process updating of a connected SPARQL store; given that the store supports SPAQL Update 1.1 (which none do AFAIK)
affected #:  5 files (2.2 KB)

--- a/ckanext/rdf/controllers.py	Thu Jun 02 12:44:41 2011 +0100
+++ b/ckanext/rdf/controllers.py	Wed Jun 08 10:25:16 2011 +0200
@@ -26,3 +26,6 @@
         else:
             abort(404)
 
+    def sparql(self):
+        pass
+


--- a/ckanext/rdf/plugin.py	Thu Jun 02 12:44:41 2011 +0100
+++ b/ckanext/rdf/plugin.py	Wed Jun 08 10:25:16 2011 +0200
@@ -5,10 +5,10 @@
         
     def before_map(self, route_map):
         controller = "ckanext.rdf.controllers:DCatApiController"
-
-        route_map.connect("/package/{id}.rdf", controller=controller,
+        route_map.connect("/rdf/package/{id}", controller=controller,
                           action="show")
-
+        route_map.connect("/rdf/sparql", controller=controller,
+                          action="sparql")
         return route_map
 
     def after_map(self, route_map):


--- a/ckanext/rdf/produce.py	Thu Jun 02 12:44:41 2011 +0100
+++ b/ckanext/rdf/produce.py	Wed Jun 08 10:25:16 2011 +0200
@@ -14,7 +14,7 @@
     return dict_produce(pkg.as_dict())
 
 def dict_produce(data):
-    uri = data['ckan_url'] if 'ckan_url' in data else BNode()
+    uri = URIRef(data['ckan_url']) if 'ckan_url' in data else BNode()
     rec = Graph(identifier=uri)
     rec.remove((None, None, None))
 
@@ -33,7 +33,6 @@
 
     if data["notes"] is not None:
         rec.add((uri, DC["description"], Literal(data["notes"])))
-
     if data["license_id"] is not None:
         rec.add((uri, DC["rights"], LICENSES[data["license_id"]]))
 


--- a/setup.py	Thu Jun 02 12:44:41 2011 +0100
+++ b/setup.py	Wed Jun 08 10:25:16 2011 +0200
@@ -28,5 +28,6 @@
 	"""
     [ckan.plugins]
     dcat_api=ckanext.rdf.plugin:DCatApi
+    rdf_store=ckanext.rdf.update:StoreUpdatePlugin
 	""",
 )

Repository URL: https://bitbucket.org/okfn/ckanext-rdf/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list