Hi,

I have a need to use the same property to point to instances of different
classes via different property shapes.  I am attempting to use Qualified
Value Shapes to support this use case which is similar to the second
example found here
<https://www.w3.org/TR/shacl/#QualifiedValueShapeConstraintComponent>.

The attached zip file contains my example as discussed below.

I declare a class, Thing with QVS, with two property shapes using the
:composedOf property to specify that one shape should point to an instance
of Class 1 and the other to Class 2.

When I create an instance of Thing with QVS, I was expecting to see both
shapes on the form, but I only see the first one.

[image: image.png]

When I put the form in edit mode, it does not offer type ahead or the
ability to create a new instance.  The field is only defined as a text
field.

[image: image.png]

There are two versions of the class definition.  The first one below is my
manual editing to create the QVS's which is what is in the attached zip
file..  The second version was created using the QVS editing panel.  The
results are the same.

Am I confused about how QVS's are to be handled in the form system?

Thanks in advance for your help,

Tim

*Manually created QVSs:*

qvs_test:ThingWithQVS
  a owl:Class ;
  a sh:NodeShape ;
  rdfs:label "Thing With QVS" ;
  rdfs:subClassOf owl:Thing ;
  sh:property qvs_test:ThingWithQVS-composedOf-1 ;
  sh:property qvs_test:ThingWithQVS-composedOf-2 ;
.
qvs_test:ThingWithQVS-composedOf-1
  a sh:PropertyShape ;
  sh:path qvs_test:composedOf ;
  sh:name "Class 1"@en ;
  sh:qualifiedMaxCount 1 ;
  sh:qualifiedMinCount 0 ;
  sh:qualifiedValueShape [
      sh:class qvs_test:Class1 ;
    ] ;
  sh:qualifiedValueShapesDisjoint true ;
.
qvs_test:ThingWithQVS-composedOf-2
  a sh:PropertyShape ;
  sh:path qvs_test:composedOf ;
  sh:name "Class 2"@en ;
  sh:qualifiedMaxCount 1 ;
  sh:qualifiedMinCount 0 ;
  sh:qualifiedValueShape [
      sh:class qvs_test:Class2 ;
    ] ;
  sh:qualifiedValueShapesDisjoint true ;
.

*EDG UI create QVSs*

qvs_test:ThingWithQVS
  a owl:Class ;
  a sh:NodeShape ;
  rdfs:label "Thing With QVS" ;
  rdfs:subClassOf owl:Thing ;
  sh:property [
      a sh:PropertyShape ;
      sh:path qvs_test:composedOf ;
      sh:message "Must have at least 1 and at most 1 values of type Class
1" ;
      sh:name "Class 1" ;
      sh:qualifiedMaxCount 1 ;
      sh:qualifiedMinCount 1 ;
      sh:qualifiedValueShape [
          sh:class qvs_test:Class1 ;
        ] ;
    ] ;
  sh:property [
      a sh:PropertyShape ;
      sh:path qvs_test:composedOf ;
      sh:message "Must have at least 1 and at most 1 values of type Class
2" ;
      sh:name "Class 2" ;
      sh:qualifiedMaxCount 1 ;
      sh:qualifiedMinCount 1 ;
      sh:qualifiedValueShape [
          sh:class qvs_test:Class2 ;
        ] ;
    ] ;
.

-- 
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/CAF0WbnLHHQFDgQ%2BLM4Y2Cwk1cq_axuBHnwiLbU4b61HHWa2muw%40mail.gmail.com.

<<attachment: data_qvs_test.zip>>

Reply via email to