Hello Carl,
no, the user input widget only looks for the declared sh:class. Doing
more sophisticated on-the-fly checking against something as complex as
SPARQL queries would likely be too slow, and people would see the error
when they try to press the Save Changes button because the form will
display an error/warning in that case. In your specific case, the
situation would become even harder to check on the fly, because - as you
say - the values depend on each other and we would need to temporarily
infer all currently entered values etc.
We do have support for one specific scenario though, in cases such as
"when property1 (country) is 'USA' then property2 (state) must be one of
'Alaska', 'Alabama', ... in case that patterns is what you need. I can
provide details if that sounds interesting.
Holger
On 2021-08-12 7:10 am, [email protected] wrote:
Suppose I have a data graph with an underlying ontology that defines a
class/NodeShape and two propertyShapes as follows:
ex:ClassA
a owl:Class ;
a sh:NodeShape ;
sh:property ex:ClassA-property1 ;
sh:property ex:ClassA-property2 ;
.
ex:ClassA-property1
a sh:PropertyShape ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:path ex:property1 ;
sh:class ex:ConceptType1 ;
.
ex:ClassA-property2
a sh:PropertyShape ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:path ex:property2 ;
sh:class ex:ConceptType2 ;
.
Now suppose I want to impose a further constraint on the instances of
ex:ClassA in my data graph: The value of ex:ClassA-property2 is
constrained in a specific way (expressible by a SPARQL constraint)
based on the user-selected value for ex:ClassA-property1. I have
written a SPARQL-based SHACL constraint to enforce this.
But is there a way to use that constraint to actually/limit the values
presented to the user /for ex:ClassA-property2, so that they cannot
choose a "wrong" value in the first place? (I understand that this
would likely require the value of ex:ClassA-property1 to be selected
and saved first.)
Sorry if any of this is unclear -- happy to provide more details if
needed.
--
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/d85ea09f-4659-4a2e-b066-6d81799d94f4n%40googlegroups.com
<https://groups.google.com/d/msgid/topbraid-users/d85ea09f-4659-4a2e-b066-6d81799d94f4n%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/ee3dca12-0c83-5c96-1462-8cf26a486ccc%40topquadrant.com.