[ckan-changes] commit/ckanext-inspire: 3 new changesets

Bitbucket commits-noreply at bitbucket.org
Fri May 20 13:13:26 UTC 2011


3 new changesets in ckanext-inspire:

http://bitbucket.org/okfn/ckanext-inspire/changeset/4b75d7327d9a/
changeset:   r31:4b75d7327d9a
user:        amercader
date:        2011-05-20 14:54:58
summary:     Remove different sources exception. If a package comes from a new source, the publisher will be updated
affected #:  1 file (822 bytes)

--- a/ckanext/inspire/harvesters.py	Wed May 18 10:31:23 2011 +0100
+++ b/ckanext/inspire/harvesters.py	Fri May 20 13:54:58 2011 +0100
@@ -187,21 +187,6 @@
 
         if last_harvested_object:
             # We've previously harvested this (i.e. it's an update)
-            if last_harvested_object.source.id != self.obj.source.id:
-                # A 'user' error: there are two or more sources
-                # pointing to the same harvested document
-                if self.obj.source.id is None:
-                    raise Exception('You cannot have an unsaved job source')
-
-                #TODO: Maybe a Warning?
-                if last_harvested_object.source.active:
-                    raise Exception(
-                        'Another active source %s (publisher %s, user %s) is using metadata GUID %s' % (
-                            last_harvested_object.source.url,
-                            last_harvested_object.source.publisher_id,
-                            last_harvested_object.source.user_id,
-                            gemini_guid,
-                        ))
 
             # Use metadata modified date instead of content to determine if the package
             # needs to be updated


http://bitbucket.org/okfn/ckanext-inspire/changeset/d77bf6146505/
changeset:   r32:d77bf6146505
user:        amercader
date:        2011-05-20 14:56:55
summary:     Use new info method instead of get_type to return harvester description
affected #:  1 file (481 bytes)

--- a/ckanext/inspire/harvesters.py	Fri May 20 13:54:58 2011 +0100
+++ b/ckanext/inspire/harvesters.py	Fri May 20 13:56:55 2011 +0100
@@ -442,8 +442,12 @@
     '''
     implements(IHarvester)
 
-    def get_type(self):
-        return 'CSW Server'
+    def info(self):
+        return {
+            'name': 'csw',
+            'title': 'CSW Server',
+            'description': 'A server that implements OGC\'s Catalog Service for the Web (CSW) standard'
+            }
 
     def gather_stage(self,harvest_job):
         log.debug('In GeminiHarvester gather_stage')
@@ -529,8 +533,12 @@
 
     implements(IHarvester)
 
-    def get_type(self):
-        return 'Single Document'
+    def info(self):
+        return {
+            'name': 'gemini-single',
+            'title': 'Single GEMINI 2 document',
+            'description': 'A single GEMINI 2.1 document'
+            }
 
     def gather_stage(self,harvest_job):
         log.debug('In GeminiDocHarvester gather_stage')
@@ -581,8 +589,12 @@
 
     implements(IHarvester)
 
-    def get_type(self):
-        return 'Web Accessible Folder (WAF)'
+    def info(self):
+        return {
+            'name': 'gemini-waf',
+            'title': 'Web Accessible Folder (WAF) - GEMINI',
+            'description': 'A Web Accessible Folder (WAF) displaying a list of GEMINI 2.1 documents'
+            }
 
     def gather_stage(self,harvest_job):
         log.debug('In GeminiWafHarvester gather_stage')


http://bitbucket.org/okfn/ckanext-inspire/changeset/88cc739e8e34/
changeset:   r33:88cc739e8e34
user:        amercader
date:        2011-05-20 15:05:53
summary:     Save an error if the remote server has no records
affected #:  1 file (143 bytes)

--- a/ckanext/inspire/harvesters.py	Fri May 20 13:56:55 2011 +0100
+++ b/ckanext/inspire/harvesters.py	Fri May 20 14:05:53 2011 +0100
@@ -491,6 +491,10 @@
             self._save_gather_error('Error gathering the identifiers from the CSW server [%r]' % e, harvest_job)
             return None
 
+        if len(ids) == 0:
+            self._save_gather_error('No records received from the CSW server', harvest_job)
+            return None
+
         return ids
 
     def fetch_stage(self,harvest_object):

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

--

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