equal
deleted
inserted
replaced
324 """Mixin class for vobjects defining the 'accepts' attribute describing |
324 """Mixin class for vobjects defining the 'accepts' attribute describing |
325 a set of supported entity type (Any by default). |
325 a set of supported entity type (Any by default). |
326 """ |
326 """ |
327 # XXX deprecated, no more necessary |
327 # XXX deprecated, no more necessary |
328 |
328 |
329 |
329 def compute_cardinality(eschema, rschema, role): |
|
330 if role == 'subject': |
|
331 targetschema = rschema.objects(eschema)[0] |
|
332 return rschema.rproperty(eschema, targetschema, 'cardinality')[0] |
|
333 targetschema = rschema.subjects(eschema)[0] |
|
334 return rschema.rproperty(targetschema, eschema, 'cardinality')[1] |
|
335 |
|
336 |