[PATCH 2 of 6 saem_ref] [rdf] Change import to ease import of more names

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Mar 16 10:46:31 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1489575801 -3600
#      Wed Mar 15 12:03:21 2017 +0100
# Node ID 95ff948c8494fe27da3f37bd20e34f15956d11f1
# Parent  e6191c95a0cbcff1eb0af18147cfe5a05e21e410
[rdf] Change import to ease import of more names

will be useful in later csets.

diff --git a/cubicweb_saem_ref/entities/rdf.py b/cubicweb_saem_ref/entities/rdf.py
--- a/cubicweb_saem_ref/entities/rdf.py
+++ b/cubicweb_saem_ref/entities/rdf.py
@@ -15,12 +15,11 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 """Adapters to export content to RDF"""
 
 from cubicweb.predicates import is_instance
 
-from cubes.skos import rdfio
-from cubes.skos.entities import AbstractRDFAdapter
+from cubes.skos import rdfio, entities as skos
 
 from .. import permanent_url
 
 
 def _register_agent_prov_mapping(reg):  # XXX move to the prov cube
@@ -67,21 +66,21 @@ def _complete_authority_record_rdf_mappi
     reg.register_attribute_equivalence('PostalAddress', 'city', 'vcard:locality')
     reg.register_attribute_equivalence('PostalAddress', 'country', 'vcard:country-name')
     reg.register_attribute_equivalence('PostalAddress', 'state', 'vcard:region')
 
 
-class AgentRDFListAdapter(AbstractRDFAdapter):
+class AgentRDFListAdapter(skos.AbstractRDFAdapter):
     __regid__ = 'RDFList'
     __select__ = is_instance('Agent')
 
     def register_rdf_mapping(self, reg):
         _base_rdf_mapping(reg, self.entity.cw_etype, 'foaf:Person')
         reg.register_attribute_equivalence(
             self.entity.cw_etype, 'name', 'foaf:name')
 
 
-class OrgRDFListAdapter(AbstractRDFAdapter):
+class OrgRDFListAdapter(skos.AbstractRDFAdapter):
     __regid__ = 'RDFList'
     __select__ = is_instance('Organization', 'OrganizationUnit')
 
     def register_rdf_mapping(self, reg):
         etype = self.entity.cw_etype
@@ -144,11 +143,11 @@ class OrganizationRDFPrimaryAdapter(OrgR
         reg.register_relation_equivalence(
             'Organization', 'archival_authority', 'Organization',
             'saem:archivalAuthority')
 
 
-class AuthorityRecordRDFPrimaryAdapter(AbstractRDFAdapter):
+class AuthorityRecordRDFPrimaryAdapter(skos.AbstractRDFAdapter):
     __regid__ = 'RDFPrimary'
     __select__ = is_instance('AuthorityRecord')
 
     hierarchical_role = 'http://www.logilab.org/saem/hierarchical_role'
     association_role = 'http://www.logilab.org/saem/association_role'


More information about the saem-devel mailing list