@@ -43,6 +43,10 @@ class BaseSection(base.Sectionable):
43
43
:param oid: object id, UUID string as specified in RFC 4122. If no id is provided,
44
44
an id will be generated and assigned. An id has to be unique
45
45
within an odML Document.
46
+ :param sec_cardinality: Section cardinality defines how many Sub-Sections are allowed for this
47
+ Section. By default unlimited Sections can be set.
48
+ A required number of Sections can be set by assigning a tuple of the
49
+ format "(min, max)"
46
50
:param prop_cardinality: Property cardinality defines how many Properties are allowed for this
47
51
Section. By default unlimited Properties can be set.
48
52
A required number of Properties can be set by assigning a tuple of the
@@ -60,7 +64,7 @@ class BaseSection(base.Sectionable):
60
64
def __init__ (self , name = None , type = "n.s." , parent = None ,
61
65
definition = None , reference = None ,
62
66
repository = None , link = None , include = None , oid = None ,
63
- prop_cardinality = None ):
67
+ sec_cardinality = None , prop_cardinality = None ):
64
68
65
69
# Sets _sections Smartlist and _repository to None, so run first.
66
70
super (BaseSection , self ).__init__ ()
@@ -86,6 +90,7 @@ def __init__(self, name=None, type="n.s.", parent=None,
86
90
self ._repository = repository
87
91
self ._link = link
88
92
self ._include = include
93
+ self ._sec_cardinality = None
89
94
self ._prop_cardinality = None
90
95
91
96
# this may fire a change event, so have the section setup then
0 commit comments