Hi Tim, Just a comment or two …
Pet peeve: rdfs:subClassOf is part of SHACL so not going outside it. subClassOf is actually subSetOf and so is just using set theory rather than Boolean logic. Rationale: There is not actually any inheritance in rdfs:subClassOf, I know we all pretend there is but what actually happens is the instance is made a member of all superclasses so it gets the properties directly. These are not “fake” classes, they are just giving a URI to something that is anonymous otherwise. I find that easier to show and explain for the union/or case, and that was true with OWL models too. I never understood why the idea that calculating restrictions or now sh:or on-the-fly is somehow better than asserting it (which, for example makes it easily SPARQL-able which is not true otherwise). That said, there are certainly improvements that can be made in EDG OR support. I’ve made 3 tickets in our system for the sh:or items you reported: autocomplete, + and EDG diagram. Hope that helps. I guess for you the tactical question is whether you can live with things wrt sh:or as-is for a while OR to get the other features today maybe make tactical use of rdfs:subClassOf now with a plan to move off it when the sh:or requirements you mention are met. Cheers, David > On 1 Aug 2022, at 17:45, Tim Smith <[email protected]> wrote: > > Hi David, > > Yes, that is how I used to do it before SHACL was available. However, the > downside is class bloat that is not easily hidden in the UI. I will have > lots of classes that have no semantic meaning other than to provide a > grouping mechanism against which I can write constraints, essentially > embedding Boolean logic using inheritance. I would need to hide them in > class trees, EDG diagrams, etc. > > The impetus for this work is to create a complete SHACL model of our master > data to demonstrate the superiority of using EDG for this task over our > traditional modeling tools like Erwin. So far EDG is more expressive, able > to capture a semantically robust representation of the domain resulting in a > far superior conceptual model. But EDG is weak on visualization, especially > EDG Diagram (although it is much better than NeighborGram). If I have to > introduce "fake" classes to support constraints, then I will lose for sure. > I'm already spending lots of energy building graph visualizations using Tom > Sawyer Software's Perspectives platform to compensate for EDG Diagram's > weaknesses. Tom Sawyer goes live against the EDG SPARQL endpoint and links > back to the resource URLs in EDG. (Now if the endpoint only supported named > graphs!!!) > > Tim > > On Monday, August 1, 2022 at 11:47:38 AM UTC-4 David Price wrote: > It’s far simpler to make an abstract superclass of the two classes of > interest. Everything mentioned works out-of-the-box and avoid Source Code > SHACL editing, etc. > > Cheers, > David > > >> On 1 Aug 2022, at 16:21, Tim Smith <[email protected] >> <applewebdata://D3A5E3F2-FA65-4688-A4D9-B9682586C0C2>> wrote: >> > >> 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] >> <applewebdata://D3A5E3F2-FA65-4688-A4D9-B9682586C0C2>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/topbraid-users/b6dcb60e-4f3a-4296-99f9-2a0bacd14120n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/topbraid-users/b6dcb60e-4f3a-4296-99f9-2a0bacd14120n%40googlegroups.com?utm_medium=email&utm_source=footer>. >> <sh_or_shape_test.zip> > > UK +44 (0) 7788 561308 <tel:+44%207788%20561308> > US +1 (336) 283-0808 <tel:(336)%20283-0808> > > > -- > 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/1d7fbe6a-24f5-437f-9605-fa6b87c58fcbn%40googlegroups.com > > <https://groups.google.com/d/msgid/topbraid-users/1d7fbe6a-24f5-437f-9605-fa6b87c58fcbn%40googlegroups.com?utm_medium=email&utm_source=footer>. UK +44 (0) 7788 561308 US +1 (336) 283-0808 -- 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/8C30FAA7-8672-4400-9BC6-377189DB9F5B%40topquadrant.com.
