File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -229,7 +229,8 @@ def parse_dcat_ap_shacl_shapes(builder):
229229 # sh:maxCount is only used in DCAT-AP for 0..1 cardinality so far and left out for 0..n or 1..n
230230 required = True if 'sh:minCount' in slot_shape and int (slot_shape ['sh:minCount' ]) >= 1 else False
231231 multivalued = False if 'sh:maxCount' in slot_shape and int (slot_shape ['sh:maxCount' ]) == 1 else True
232- # Allow list inlining of objects in LinkML for multivalued slots
232+ # Allow inlining of objects in LinkML
233+ inlined = None
233234 inlined_as_list = True if multivalued is True else None
234235 # Use default slot range 'string' as substitute for 'rdfs:Literal' and 'xsd:date' for
235236 # https://semiceu.github.io/DCAT-AP/releases/3.0.0/#TemporalLiteral, except for
@@ -286,6 +287,9 @@ def parse_dcat_ap_shacl_shapes(builder):
286287 if 'sh:maxCount' in slot_shape :
287288 class_slots [slot_name ].multivalued = multivalued
288289 class_slots [slot_name ].inlined_as_list = inlined_as_list
290+ # Allow inlining of objects for single valued slots with classes as ranges
291+ if 'sh:class' in slot_shape :
292+ class_slots [slot_name ].inlined = True
289293
290294 # Add the class slot
291295 else :
@@ -297,6 +301,7 @@ def parse_dcat_ap_shacl_shapes(builder):
297301 range = slot_range ,
298302 any_of = any_of ,
299303 multivalued = multivalued ,
304+ inlined = inlined ,
300305 inlined_as_list = inlined_as_list )
301306
302307
You can’t perform that action at this time.
0 commit comments