view xy.py @ 7642:64eee2a83bfa

backport stable
author Sylvain Thénault <sylvain.thenault@logilab.fr>
date Mon, 11 Jul 2011 09:21:44 +0200
parents bc0ebfbf5c5d
children 8ca1a0da5a29
line source
1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
3 #
4 # This file is part of CubicWeb.
5 #
6 # CubicWeb is free software: you can redistribute it and/or modify it under the
7 # terms of the GNU Lesser General Public License as published by the Free
8 # Software Foundation, either version 2.1 of the License, or (at your option)
9 # any later version.
10 #
11 # CubicWeb is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 # details.
15 #
16 # You should have received a copy of the GNU Lesser General Public License along
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>.
18 """map standard cubicweb schema to xml vocabularies"""
20 from yams import xy
22 xy.register_prefix('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#')
23 xy.register_prefix('dc', 'http://purl.org/dc/elements/1.1/')
24 xy.register_prefix('foaf', 'http://xmlns.com/foaf/0.1/')
25 xy.register_prefix('doap', 'http://usefulinc.com/ns/doap#')
26 xy.register_prefix('sioc', 'http://rdfs.org/sioc/ns#')
27 xy.register_prefix('owl', 'http://www.w3.org/2002/07/owl#')
28 xy.register_prefix('dcterms', 'http://purl.org/dc/terms/')
30 xy.add_equivalence('creation_date', 'dc:date')
31 xy.add_equivalence('created_by', 'dc:creator')
32 xy.add_equivalence('description', 'dc:description')
33 xy.add_equivalence('CWUser', 'foaf:Person')
34 xy.add_equivalence('CWUser login', 'foaf:Person dc:title')
35 xy.add_equivalence('CWUser surname', 'foaf:Person foaf:name')