yams api update
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 21 Dec 2009 19:20:45 +0100
changeset 4157 f7830377b215
parent 4156 1bbb0ee42c8e
child 4158 0e97cf2cf55b
yams api update
web/views/owl.py
--- a/web/views/owl.py	Mon Dec 21 19:18:49 2009 +0100
+++ b/web/views/owl.py	Mon Dec 21 19:20:45 2009 +0100
@@ -96,10 +96,7 @@
             if not self.should_display_rschema(eschema, rschema, role):
                 continue
             for oeschema in targetschemas:
-                if role == 'subject':
-                    card = rschema.rproperty(eschema, oeschema, 'cardinality')[0]
-                else:
-                    card = rschema.rproperty(oeschema, eschema, 'cardinality')[1]
+                card = rschema.role_rdef(eschema, oeschema, role).role_cardinality(role)
                 cardtag = OWL_CARD_MAP[card]
                 if cardtag:
                     self.w(u'''<rdfs:subClassOf>