xy.py
changeset 2422 96da7dc42eb5
child 2425 ba898e4ba09a
equal deleted inserted replaced
2418:8f06e4f02733 2422:96da7dc42eb5
       
     1 """map standard cubicweb schema to xml vocabularies
       
     2 
       
     3 :organization: Logilab
       
     4 :copyright: 2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
       
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
       
     6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
       
     7 """
       
     8 
       
     9 from yams import xy
       
    10 
       
    11 xy.register_prefix('http://purl.org/dc/elements/1.1/', 'dc')
       
    12 xy.register_prefix('http://xmlns.com/foaf/0.1/', 'foaf')
       
    13 xy.register_prefix('http://usefulinc.com/ns/doap#', 'doap')
       
    14 
       
    15 xy.add_equivalence('creation_date', 'dc:date')
       
    16 xy.add_equivalence('created_by', 'dc:creator')
       
    17 xy.add_equivalence('description', 'dc:description')
       
    18 xy.add_equivalence('CWUser', 'foaf:Person')
       
    19 xy.add_equivalence('CWUser.login', 'dc:title')
       
    20 xy.add_equivalence('CWUser.surname', 'foaf:Person.foaf:name')