mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-14 02:34:28 +00:00
sneakers-the-rat
4faaa8efe8
or at least all the semantics are present. it's not pretty by any stretch of the imagination
34 lines
688 B
Python
34 lines
688 B
Python
"""
|
|
Quantity maps on to two things: required and cardinality.
|
|
|
|
Though it is technically possible to use an integer as
|
|
a quantity, that is never done in the core schema,
|
|
which is our only target for now.
|
|
|
|
We will handle cardinality of array dimensions elsewhere
|
|
"""
|
|
|
|
QUANTITY_MAP = {
|
|
'*': {
|
|
'required': False,
|
|
'multivalued': True
|
|
},
|
|
'+': {
|
|
'required': True,
|
|
'multivalued': True
|
|
},
|
|
'?': {
|
|
'required': False,
|
|
'multivalued': False
|
|
},
|
|
1: {
|
|
'required': True,
|
|
'multivalued': False
|
|
},
|
|
# include the NoneType for indexing
|
|
None: {
|
|
'required': None,
|
|
'multivalued': None
|
|
}
|
|
}
|
|
|