Open andreea-pasare opened 8 months ago
Hi @andreea-pasare , could you please elaborate on the description of this issue?
After looking at the issue again, maybe you are referring to the elements marked as 'Enumeration' in UML.
I would export them as follows:
Say we have a epo:Item
that uses a4g:hasCountryOfOrigin
to connect with one atold:country
that in the UML is declared as an enum. If that is the case, the property in SHACL could be:
a4g_shape:Item-hasCountryOfOrigin-country a shacl:PropertyShape ;
shacl:path a4g:hasCountryOfOrigin ;
shacl:name "has country of origin"@en ;
shacl:maxCount 1 ;
shacl:node [
rdf:type shacl:NodeShape ;
shacl:property [
shacl:path skos:inScheme ;
shacl:hasValue atold:country ;
] ;
] ;
shacl:nodeKind shacl:IRI .
Note that the expected value is 'something' that has skos:inScheme
atold:country
There are other ways, such as specifying the elements. But this one seems straightforward
Maybe if such enum specify the values, say the ex:color
, that has (in the UML) the declared values ex:Pink
end ex:Purple
, they might be exported using sh:in
ex:InExampleShape
a sh:NodeShape ;
sh:targetNode ex:RainbowPony ;
sh:property [
sh:path ex:color ;
sh:in ( ex:Pink ex:Purple ) ;
] .
Decide what to do with SHACL shapes restricted to a controlled vocabulary "class":