community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r949184 - in /comdev/nearby_people: local_settings.py.example nearby/foaf.py
Date Fri, 28 May 2010 14:24:24 GMT
Author: nick
Date: Fri May 28 14:24:23 2010
New Revision: 949184

URL: http://svn.apache.org/viewvc?rev=949184&view=rev
Log:
Switch the default URI for apache foaf files from the confusing http://people.apache.org/
to urn:org:apache:

Modified:
    comdev/nearby_people/local_settings.py.example
    comdev/nearby_people/nearby/foaf.py

Modified: comdev/nearby_people/local_settings.py.example
URL: http://svn.apache.org/viewvc/comdev/nearby_people/local_settings.py.example?rev=949184&r1=949183&r2=949184&view=diff
==============================================================================
--- comdev/nearby_people/local_settings.py.example (original)
+++ comdev/nearby_people/local_settings.py.example Fri May 28 14:24:23 2010
@@ -5,7 +5,9 @@ import os, sys
 BASE_PATH = os.path.realpath(os.path.dirname(__file__))
 
 # FOAF/DOAP settings:
-PEOPLE_FOAF_NAMESPACE = "http://people.apache.org/"
+PEOPLE_FOAF_NAMESPACE = "urn:org:apache:"
+PEOPLE_FOAF_ALT_NAMESPACE = "http://people.apache.org/" # Remove in a bit
+
 # These should point to where you checked out bits of the commiters repo to
 COMDEV_DOAP = os.path.join(BASE_PATH, "data/local-outreach/CommunityDevelopment.rdf")
 SPEAKERS_DOAP = os.path.join(BASE_PATH, "data/local-outreach/LocalSpeakers.rdf")

Modified: comdev/nearby_people/nearby/foaf.py
URL: http://svn.apache.org/viewvc/comdev/nearby_people/nearby/foaf.py?rev=949184&r1=949183&r2=949184&view=diff
==============================================================================
--- comdev/nearby_people/nearby/foaf.py (original)
+++ comdev/nearby_people/nearby/foaf.py Fri May 28 14:24:23 2010
@@ -18,7 +18,7 @@
 # Parses and caches foaf files
 
 from xml.dom.minidom import parse
-from settings import PEOPLE_FOAF_PATH, PEOPLE_FOAF_NAMESPACE
+from settings import PEOPLE_FOAF_PATH, PEOPLE_FOAF_NAMESPACE, PEOPLE_FOAF_ALT_NAMESPACE
 import datetime
 import geo_helper
 import sys,os
@@ -71,7 +71,9 @@ class FOAF(object):
                 continue
             #print uri
 
-            people_rel_uri = uri.replace(PEOPLE_FOAF_NAMESPACE,"")
+			people_rel_uri = uri
+            people_rel_uri = people_rel_uri.replace(PEOPLE_FOAF_NAMESPACE,"")
+            people_rel_uri = people_rel_uri.replace(PEOPLE_FOAF_ALT_NAMESPACE,"")
             if uri != people_rel_uri and people_rel_uri.find("/") == -1:
                 file = os.path.join(PEOPLE_FOAF_PATH, people_rel_uri)
                 self._parse_foaf(file, people_rel_uri)



Mime
View raw message