Thanks for the help. I was indeed confused about the meaning of 
*sh:disjoint*. 

I have written a basic *sh:xone *constraint like this:

  sh:xone (
      [
        sh:property [
            sh:path concept_schema:preferred_specialty ;
          ] ;
      ]
      [
        sh:property [
            sh:path concept_schema:preferred_specialty_inferred ;
          ] ;
      ]
    ) ;
.

where *concept_schema:preferred_specialty* has only explicit values and 
*concept_schema:preferred_specialty_inferred* has only inferred values.

But now, in my concept data, whether 0, 1, or 2 of these properties has a 
value, I am still getting a constraint violation saying:
Value has 2 shapes out of 2 in the sh:xone enumeration

What could I be doing wrong?



On Friday, September 11, 2020 at 6:10:17 PM UTC-7 Holger Knublauch wrote:

>
> On 12/09/2020 09:21, Irene Polikoff wrote:
>
>
>
> On Sep 11, 2020, at 6:02 PM, cbur...@healthwise.org <
> cbur...@healthwise.org> wrote:
>
> These questions are more about SHACL than about EDG per se, but I think 
> you experts will be able to help me.
>
> 1. *sh:disjoint*: I have used sh:disjoint to declare that the sh:path of 
> a property shape is disjoint with another another property, like this: 
>
> ex:Concept-property
>    a sh:PropertyShape ;
>    sh:path ex:property ;
>    sh:disjoint ex:property2 .
>
> Testing this out in EDG 6.4.1 yields no constraint violations when I 
> assign values to a certain instance of ex:Concept for both ex:property and 
> ex:property2. Have I set this up incorrectly, or do I need to do something 
> else to make EDG raise warnings in this situation?
>
>
> Disjoint means that a given resource cannot have the same value for ex; 
> property as for ex:property2.  E.g., a pref label for resource X can’t be 
> the same as alLabel for resource X. Is this what you meant?
>
> In case you're stuck, a minimal complete example would allow us to 
> reproduce it.
>
>
> Or do you mean something else i.e., it either have a value for ex:property 
> or a value for ex:property2 e.g., either foaf:givenName or foaf:firstName, 
> but not both. If so, then use xone: 
> https://www.w3.org/TR/shacl/#XoneConstraintComponent
>
>
> 2. *Inferring data: *Suppose ex:property and ex:property2 are disjoint 
> for a given shape, as specified above. If an instance of ex:Concept has 
> *exactly 
> one value *for either ex:property or ex:property2, I would like to infer 
> that this is the value of ex:property3. How could this be modeled? 
>
>
> The exact expression depends on your answer to the first question.
>
>  
> 2. *A different property pair constraint:* This case is nearly the 
> opposite of the above. Suppose I wish to specify that any value of 
> ex:property4 (which has sh:maxCount 1) *must be* one of the values of 
> ex:property5 (which has no sh:maxCount). How would I express that? (I don't 
> see a way to do it using sh:equals.)
>
>
> SPARQL-based constraint
>
> Yes or dash:subSetOf already implements this SPARQL constraint:
>
> http://datashapes.org/constraints.html#SubSetOfConstraintComponent
>
> Holger
>

-- 
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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/5d0403df-9dec-4828-9d84-edc81c78eb6cn%40googlegroups.com.

Reply via email to