Hi Martin,
I made a small example and find that what you tried to do sort of works. Composer actually tells me that the property shape union is invalid, as I thought per SHACL spec section 2. Shapes and Constraints linked above, but it does still tell me the instance min/max was invalid.
Here’s the validation report:
Here’s the example tested with 6.3 Beta:
# prefix: unnamed
a owl:Ontology ;
owl:versionInfo "Created with TopBraid Composer" ;
.
unnamed:PropertyShape_1
a sh:PropertyShape ;
sh:path unnamed:Property_1 ;
sh:class [
a owl:Class ;
owl:unionOf (
unnamed:Thing_1
unnamed:Thing_2
) ;
] ;
sh:maxCount 3 ;
sh:minCount 3 ;
.
unnamed:Property_1
a rdf:Property ;
rdfs:domain unnamed:Thing_3 ;
.
unnamed:Thing_1
a owl:Class ;
a sh:NodeShape ;
rdfs:subClassOf owl:Thing ;
.
unnamed:Thing_1_1
a unnamed:Thing_1 ;
.
unnamed:Thing_2
a owl:Class ;
a sh:NodeShape ;
rdfs:subClassOf owl:Thing ;
.
unnamed:Thing_3
a owl:Class ;
a sh:NodeShape ;
rdfs:subClassOf owl:Thing ;
sh:property unnamed:PropertyShape_1 ;
.
unnamed:Thing_3_1
a unnamed:Thing_3 ;
unnamed:Property_1 unnamed:Thing_1_1 ;
.
WRT a solution - One approach is to make a superclass of the three classes in the union.
Cheers,
David