I am attaching an example shapes graph for a scenario like the
country/state pairs. Applicable values are expressed by a SHACL node
shape that has a dash:HasValueTarget as its sh:target and uses a sh:in
enumeration for the permissible values. As an example choosing
'Temperature' as the quantity kind of the focus node needs to constrain
the values of unit for that same node to Celsius, Fahrenheit or Kelvin.
This does not seem to be exactly the scenario you have, which seems to
be "all concepts under a given concept scheme"? As I said this is
difficult to generalize and may require a custom widget or custom extension.
Holger
On 2021-08-12 7:48 am, Carl Burnett wrote:
Thanks for the quick reply, Holger.
Do you mean that you support only the scenario related to geography,
or also other similar scenarios? In our case, we want to look at the
specific rdf:type of the concept that has been selected as the value
of one property and use it to constrain the values of another concept
scheme that are in play for the second property.
*From:* [email protected]
<[email protected]> *On Behalf Of *Holger Knublauch
*Sent:* Wednesday, August 11, 2021 2:43 PM
*To:* [email protected]
*Subject:* Re: [topbraid-users] Pre-limiting values available to the user
*** External email: use caution ***
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]
<mailto:[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://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ftopbraid-users%2Fd85ea09f-4659-4a2e-b066-6d81799d94f4n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7Ccburnett%40healthwise.org%7Cccc91564e234474a2b0508d95d10fb7c%7Ccee5d4e942e548c28a033406fd5b9242%7C0%7C0%7C637643149802709086%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=z9oMYYgGdzauY%2BWISY%2FLFajAgSwR%2FKCb89l1pIkwTkg%3D&reserved=0>.
--
You received this message because you are subscribed to a topic in the
Google Groups "TopBraid Suite Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/topbraid-users/6hyN44MnaV8/unsubscribe
<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Ftopic%2Ftopbraid-users%2F6hyN44MnaV8%2Funsubscribe&data=04%7C01%7Ccburnett%40healthwise.org%7Cccc91564e234474a2b0508d95d10fb7c%7Ccee5d4e942e548c28a033406fd5b9242%7C0%7C0%7C637643149802719071%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=flr%2F2arGq7odxXcVTjPYDLivO156HPJtLlpObWzIz4E%3D&reserved=0>.
To unsubscribe from this group and all its topics, 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/ee3dca12-0c83-5c96-1462-8cf26a486ccc%40topquadrant.com
<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ftopbraid-users%2Fee3dca12-0c83-5c96-1462-8cf26a486ccc%2540topquadrant.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7Ccburnett%40healthwise.org%7Cccc91564e234474a2b0508d95d10fb7c%7Ccee5d4e942e548c28a033406fd5b9242%7C0%7C0%7C637643149802729068%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=RWSPtTSK%2Bx01W0hWcW8KwUE8GgyhxAfAxFRL5EyY7WU%3D&reserved=0>.
--
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/MWHPR19MB1598A8BD87AA53630FB946C2B7F89%40MWHPR19MB1598.namprd19.prod.outlook.com
<https://groups.google.com/d/msgid/topbraid-users/MWHPR19MB1598A8BD87AA53630FB946C2B7F89%40MWHPR19MB1598.namprd19.prod.outlook.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/662890d3-6ce4-3ea9-c8c4-c4de1639a007%40topquadrant.com.
# baseURI: http://datashapes.org/dash/tests/targets/states
# imports: http://datashapes.org/dash
# prefix: states
@prefix dash: <http://datashapes.org/dash#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix states: <http://datashapes.org/dash/tests/targets/states#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://datashapes.org/dash/tests/targets/states>
a owl:Ontology ;
rdfs:comment "A simple ontology of countries and states, exercising
dash:HasValueTarget." ;
owl:imports <http://datashapes.org/dash> ;
.
states:AUAddressShape
a sh:NodeShape ;
rdfs:label "AU Address shape" ;
sh:property [
a sh:PropertyShape ;
sh:path states:state ;
sh:in (
"NSW"
"QLD"
"VIC"
) ;
] ;
sh:target [
a dash:HasValueTarget ;
dash:object "AU" ;
dash:predicate states:country ;
] ;
.
states:Address
a owl:Class ;
a sh:NodeShape ;
rdfs:label "Address" ;
rdfs:subClassOf owl:Thing ;
sh:property [
a sh:PropertyShape ;
sh:path states:country ;
sh:datatype xsd:string ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:name "country" ;
] ;
sh:property [
a sh:PropertyShape ;
sh:path states:state ;
sh:datatype xsd:string ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:name "state" ;
] ;
.
states:USAddressShape
a sh:NodeShape ;
rdfs:label "US Address shape" ;
sh:property [
a sh:PropertyShape ;
sh:path states:state ;
sh:in (
"AZ"
"CA"
"FL"
) ;
] ;
sh:target [
a dash:HasValueTarget ;
dash:object "USA" ;
dash:predicate states:country ;
] ;
.