changeset 24:345dd913f520 default tip

new pubman
author Dirk Wintergr?n <dwinter@mpiwg-berlin.mpg.de>
date Fri, 10 Jan 2014 12:43:43 +0100
parents d24a8673d68e
children
files zopePubmanConnector.py
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/zopePubmanConnector.py	Thu Oct 24 18:22:54 2013 +0200
+++ b/zopePubmanConnector.py	Fri Jan 10 12:43:43 2014 +0100
@@ -41,7 +41,7 @@
 class ZopePubmanConnector(SimpleItem):
     
     
-    connectorString="http://pubman.mpiwg-berlin.mpg.de/search/SearchAndExport?"
+    #connectorString="http://pubman.mpiwg-berlin.mpg.de/search/SearchAndExport?"
     
     
     meta_type="ZopePubmanConnector"
@@ -76,10 +76,10 @@
         
         if publicationType is None:
            # cn = self.connectorString+"cqlQuery=escidoc.any-identifier=%22"+personID+"%22&"
-            cn = self.connectorString+"cqlQuery=escidoc.publication.creator.person.identifier=%22"+personID+"%22&"
+            cn = self.pubmanURL+"cqlQuery=escidoc.publication.creator.person.identifier=%22"+personID+"%22&"
         else:
             #cn = self.connectorString+"cqlQuery=escidoc.any-identifier=%22"+personID+"%22"
-            cn = self.connectorString+"cqlQuery=%28escidoc.publication.creator.person.identifier=%22"+personID+"%22%29"
+            cn = self.pubmanURL+"cqlQuery=%28escidoc.publication.creator.person.identifier=%22"+personID+"%22%29"
             cn +="%20and%28%20escidoc.publication.type=%22"+publicationType+"%22%29&"
         
         cn +="exportFormat=APA&outputFormat=snippet&language=all&sortKeys=escidoc.any-dates&sortOrder=descending"
@@ -180,7 +180,7 @@
                         "any":"escidoc.metadata"}
         
              
-        cn = self.connectorString+"cqlQuery=%s&"
+        cn = self.pubmanURL+"cqlQuery=%s&"
         #cn +="exportFormat=APA&outputFormat=snippet&language=all&sortKeys=escidoc.any-dates&sortOrder=descending"
         #cn +="exportFormat=APA&outputFormat=snippet&language=all&sortKeys=escidoc.property.creation-date&sortOrder=descending"
         cn +="exportFormat=APA&outputFormat=snippet&language=all&sortKeys="+sortKeys+"&sortOrder=descending"
@@ -293,7 +293,7 @@
     
         escidocid=escidocid.lstrip().strip()
         h = httplib2.Http(cacheFolder,timeout=TIMEOUT)
-        cn = self.connectorString+"cqlQuery=escidoc.objid=%s&"
+        cn = self.pubmanURL+"cqlQuery=escidoc.objid=%s&"
         cn +="exportFormat=APA&outputFormat=snippet&language=all&sortKeys=escidoc.any-dates&sortOrder=descending"
         content = None
         try:
@@ -397,7 +397,7 @@
         return "",''
         
     def pubmanConnectorURL(self):
-        return self.connectorString
+        return self.pubmanURL
     
     
     def getPublicationsFromContext(self,context,limit=None,publicationType=None,search=None):
@@ -415,10 +415,10 @@
         h = httplib2.Http(cacheFolder,timeout=TIMEOUT)
         
         if publicationType is None:
-            cn = self.connectorString+"cqlQuery=(escidoc.context.objid=%22"+context+"%22"
-            #cn = self.connectorString+"cqlQuery=escidoc.objid=%22"+"escidoc:643455"+"%22&"
+            cn = self.pubmanURL+"cqlQuery=(escidoc.context.objid=%22"+context+"%22"
+            #cn = self.pubmanURL+"cqlQuery=escidoc.objid=%22"+"escidoc:643455"+"%22&"
         else:
-            cn = self.connectorString+"cqlQuery=(escidoc.context.objid=%22"+context+"%22"
+            cn = self.pubmanURL+"cqlQuery=(escidoc.context.objid=%22"+context+"%22"
             cn +="%20and%20escidoc.publication.type=%22"+publicationType+"%22"
         
         if search is not None and search != "":