Hi,

I have three classes:

*Consumer Unit*
*Inner Pack*
*Case.*

I need a property constraint on *Case*, using the property ex:contains (an 
Object Property), to say:

Case ex:contains one or more (Consumer Unit OR Inner Pack) instances.

Following the example found at sh:or 
<https://www.w3.org/TR/shacl/#OrConstraintComponent>, I created the 
following:

ex:Case
  a owl:Class ;
  a sh:NodeShape ;
  rdfs:label "Case" ;
  rdfs:subClassOf owl:Thing ;
  sh:property ex:Case-contains ;
.
ex:Case-contains
  a sh:PropertyShape ;
  sh:path ex:contains ;
  sh:group ex:ExamplePropertyGroup ;
  sh:minCount 1 ;
  sh:name "contains" ;
  sh:or (
      [
        sh:class ex:InnerPack ;
      ]
      [
        sh:class ex:ConsumerUnit ;
      ]
    ) ;
.

When creating an instance of Case, I thought I would see only instances of 
InnerPack or ConsumerUnit in the auto-complete.  However, I am seeing 
everything - instances and classes, etc.  If I select something other than 
InnerPack or ConsumerUnit, I will see a SHACL constraint violation 
indicating the selection is not a valid shape so it is reading the 
constraint.

In addition, there is no "+" sign for the creation of new instances - 
should there be?  It would be helpful.  Navigating back to Inner Pack to 
create a new instance is a lot of clicks, especially if Inner Pack needs to 
be in a different asset collection as happens frequently when using the EDG 
ontologies.

And finally, placing the class, Case, on an EDG Diagram and using the 
"Expand Associations" option, Level 1 or Level 2, does not display 
anything.  If I expand the sh:property relationship manually, I will see 
the property shape but the sh:or(sh:class) statements are ignored.

What is the expected behavior?  What do I need to do to limit the instances 
the user sees to the evaluation of the sh:or?  It is also important that 
the sh:or relationship and target classes are visible on an EDG Diagram 
otherwise a user cannot see the ontology graphically.

Attached is a zip export of the example ontology and data graph that 
depicts the above.  I'm using EDG 7.3.

Thank you in advance for your input,

Tim

-- 
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/b6dcb60e-4f3a-4296-99f9-2a0bacd14120n%40googlegroups.com.

<<attachment: sh_or_shape_test.zip>>

Reply via email to