changeset 49:0610142a2550

closed: small bug in export (https://otrs.mpiwg-berlin.mpg.de/otrs/index.pl?Action=AgentTicketZoom;TicketID=38)
author dwinter
date Thu, 05 Dec 2013 13:21:00 +0100
parents cb20308fe412
children 8bfd713e5d99
files MPIWGThesaurus.py
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/MPIWGThesaurus.py	Thu Dec 05 13:11:41 2013 +0100
+++ b/MPIWGThesaurus.py	Thu Dec 05 13:21:00 2013 +0100
@@ -28,6 +28,7 @@
 import urllib2
 import urllib
 import json
+import md5
 
 from SrvTxtUtils import utf8ify
 
@@ -77,11 +78,11 @@
    
     TMP_PERSON_NS="http://ontologies.mpiwg-berlin.mpg.de/tempObjects/person/"
     ONTOLOGY_NS="http://ontologies.mpiwg-berlin.mpg.de/authorities/namedIdentities/"
-    personproviderURL="http://127.0.0.1:8280/MetaDataManagerRestlet/person/"
-    #personproviderURL="http://virtuoso.mpiwg-berlin.mpg.de:8080/MetaDataManagerRestlet/person/"
+    #personproviderURL="http://127.0.0.1:8280/MetaDataManagerRestlet/person/"
+    personproviderURL="http://virtuoso.mpiwg-berlin.mpg.de:8080/MetaDataManagerRestlet/person/"
     #PERSONS_LOOKUP_URL="http://127.0.0.1:8280/MetaDataManagerRestlet/search/persons"
-    PERSONS_LOOKUP_URL="http://127.0.0.1:8280/MetaDataManagerRestlet/persons"
-    EDIT_URL="http://127.0.0.1:8280/MetaDataManagerRestlet/edit?id="
+    PERSONS_LOOKUP_URL="http://virtuoso.mpiwg-berlin.mpg.de:8080/MetaDataManagerRestlet/persons"
+    EDIT_URL="http://virtuoso.mpiwg-berlin.mpg.de:8080/MetaDataManagerRestlet/edit?id="
     #PERSONS_LOOKUP_URL="http://virtuoso.mpiwg-berlin.mpg.de:8080/MetaDataManagerRestlet/person/"
     
     additionalNamesGraphURL="file://newpersonsFromProjects"
@@ -286,7 +287,7 @@
                     logging.debug(tagsOfType)
                     tagsOfType.add(subTag.decode('utf-8'))
                                   
-                    #logging.debug("Adding %s to %s"%(subTag,projectID))
+                    logging.debug("Adding %s to %s"%(subTag,projectID))
                     project.tags[tag]=tagsOfType
                     
                     projectTags[projectID]=project
@@ -774,9 +775,8 @@
         return entry.title
     
     def thes_quote(self,txt):
-        import md5
-        logging.debug("@*%s*@"%txt)
-        return md5.md5(txt.lower()).hexdigest()
+        logging.debug("@*%s*@"%repr(txt))
+        return md5.md5(utf8ify(txt.lower())).hexdigest()
 
     
     def formatTag(self,tag):
@@ -857,7 +857,7 @@
         for tagType in tagTypes:
             
             #retHash[tagType]=[]
-            
+
 
             tags =self.getTagsFromDB(projectID, tagType)
             if len(tags) !=0:
@@ -867,7 +867,7 @@
             
         if tagCnt==0:
             return None
-                      
+        
         return retHash
     
     
@@ -1756,4 +1756,4 @@
 
 
     if RESPONSE is not None:
-        redirect(RESPONSE,'manage_main')
\ No newline at end of file
+        redirect(RESPONSE,'manage_main')