changeset 1:c6478f155400

id eingebaut
author dwinter
date Sat, 27 Apr 2013 10:05:39 +0200
parents 373e6610e290
children 9dbb9354abbe
files zopePubmanConnector.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/zopePubmanConnector.py	Fri Apr 26 19:07:19 2013 +0200
+++ b/zopePubmanConnector.py	Sat Apr 27 10:05:39 2013 +0200
@@ -14,6 +14,7 @@
 import re
 import xml.etree.ElementTree as ET
 import json
+import logging
 
 def zptFile(self, path, orphaned=False):
     """returns a page template file from the product"""
@@ -29,8 +30,6 @@
     
     
     connectorString="http://pubman.mpiwg-berlin.mpg.de/search/SearchAndExport?"
-    connectorString+="cqlQuery=escidoc.any-identifier=%22http://pubman.mpiwg-berlin.mpg.de/cone/persons/resource/303%22&"
-    connectorString+="exportFormat=APA&outputFormat=snippet&language=all&sortKeys=escidoc.any-dates&sortOrder=descending"
     
     
     meta_type="ZopePubmanConnector"
@@ -62,6 +61,12 @@
     def getPublications(self,personID):
         """get all publications der personID"""
         h = httplib2.Http()
+        
+        
+        self.connectorString+="cqlQuery=escidoc.any-identifier=%22"+personID+"%22&"
+        self.connectorString+="exportFormat=APA&outputFormat=snippet&language=all&sortKeys=escidoc.any-dates&sortOrder=descending"
+  
+        logging.debug(self.connectorString)
         resp, content = h.request(self.connectorString)
         ET.register_namespace("dcterms", "http://purl.org/dc/terms/")