Because you can only have one value for each property, I think the following
will work:
resnet:CellExpression
rdf:type owl:Class ;
rdf:type sh:NodeShape ;
rdfs:label "CellExpression" ;
rdfs:subClassOf owl:Thing ;
sh:property [
sh:path resnet:target ;
sh:NodeKind sh:IRI ;
sh:maxCount 1 ;
sh:minCount 1 ;
] ;
sh:property [
sh:path resnet:regulator ;
sh:NodeKind sh:IRI
sh:maxCount 1 ;
sh:minCount 1 ;
] ;
sh:or (
[
sh:property [
sh:path resnet:regulator;
sh:class resnet:CellType ;
] ;
sh:property [
sh:path resnet:target ;
sh:class resnet:Complex ;
] ;
]
[
sh:property [
sh:path resnet:regulator ;
sh:class resnet:Organ
] ;
sh:property [
sh:path resnet:target ;
sh:class resnet:Virus ;
] ;
]
[
sh:property [
sh:path resnet:regulator ;
sh:class resnet:Organ ;
] ;
sh:property [
sh:path resnet:target ;
sh:class resnet:FunctionalClass ;
]
]
);
.
> On Jun 24, 2021, at 4:27 AM, Maatary Okouya <[email protected]> wrote:
>
> Hi,
>
> I am trying to double check some modeling use of sh:or/sh:xone my team and I
> have done so far. It will greatly help me wrap my head around the meanings of
> disjunction in shacl.
>
>
>
> We need to express the following:
>
> A Cell Expression (reified relation) is between either ( exclusively) a
> CellType and a Complex, (x)or an Organ and Virus, (x)or an Organ and a
> FunctionalClass and so on.
>
> Another way to look at it is your graph can have CellType - cellexpression ->
> Complex | Organ - cellExpression -> Virus | .....
>
>
> The way we have modeled that is with an sh:xone as in what follows:
>
>
> resnet:CellExpression
> rdf:type owl:Class ;
> rdf:type sh:NodeShape ;
> rdfs:label "CellExpression" ;
> rdfs:subClassOf owl:Thing ;
> sh:xone (
> [
> sh:property [
> sh:path resnet:regulator ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:CellType ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ] ;
> sh:property [
> sh:path resnet:target ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:Complex ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ] ;
> ]
> [
> sh:property [
> sh:path resnet:regulator ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:Organ ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ] ;
> sh:property [
> sh:path resnet:target ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:Virus ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ] ;
> ]
> [
> sh:property [
> sh:path resnet:regulator ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:Organ ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ] ;
> sh:property [
> sh:path resnet:target ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:FunctionalClass ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ]
> ]
> );
> .
>
>
> However based on conversation and read I have had here and there (in
> particular with Hogler) on sh:or , i'm thinking maybe the sh:xor is actually
> not necessary here, and simply using
>
> sh:or would be best. Indeed as soon as one of the alternative works, it
> should only be that one if more properties are added, none of the alternative
> should pass.
>
> hence we could express it as such:
>
> resnet:CellExpression
> rdf:type owl:Class ;
> rdf:type sh:NodeShape ;
> rdfs:label "CellExpression" ;
> rdfs:subClassOf owl:Thing ;
> sh:or (
> [
> sh:property [
> sh:path resnet:regulator ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:CellType ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ] ;
> sh:property [
> sh:path resnet:target ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:Complex ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ] ;
> ]
> [
> sh:property [
> sh:path resnet:regulator ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:Organ ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ] ;
> sh:property [
> sh:path resnet:target ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:Virus ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ] ;
> ]
> [
> sh:property [
> sh:path resnet:regulator ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:Organ ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ] ;
> sh:property [
> sh:path resnet:target ;
> sh:NodeKind sh:IRI ;
> sh:class resnet:FunctionalClass ;
> sh:maxCount 1 ;
> sh:minCount 1 ;
> ]
> ]
> );
> .
>
> Apologies for no specific formatting for the code, i could not. find a button
> to format code
>
> Kind regards,
>
> -M-
>
> --
> You received this message because you are subscribed to the Google Groups
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/topbraid-users/438295bc-5787-4e0e-a062-27750069386en%40googlegroups.com
>
> <https://groups.google.com/d/msgid/topbraid-users/438295bc-5787-4e0e-a062-27750069386en%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/AAD95D92-21F7-4F7C-B6FE-5A5C339E36CB%40topquadrant.com.