Thanks Holger! Appreciate the updates your team has added to the EDG 
interface.

Another question about Constructors. You mention the base type. How does 
the AI know what the base type is? When selecting to create a new instance, 
is there a function or variable passed in where it knows what type to use? 
Can this be used when creating new Constructors?
For instance, let's say there is Class called Mammal which has 2 subclasses 
(Dog, Cat). If I select "new instance" when I have "Cat" selected in the 
interface, is there a way to make a Constructor on the Mammal Class that 
will know the type to use based on the "new instance" selected? So in this 
case, it would know the "Cat" is the type for the new instance. If I 
selected "new instance" when "Dog" is selected in the UI, then it would 
infer "Dog". 

On Friday, March 29, 2024 at 8:27:53 AM UTC-6 Holger Knublauch wrote:

> Hi Marie,
>
> this is a good use case, and I agree selecting the type should work 
> better. For now I don't see work-around and you'll need to wait for 8.0 to 
> have more control over that. For example, I guess the sh:node trick from 
> the previous emails could be used then.
>
> But since your scenario makes a lot of sense, I have just added another 
> flag dash:allowTypeSelection for dash:Constructors for 8.0. When set to 
> true and the base type has subclasses this will make the dialog show a 
> class selection tree rooted in the base type, allowing users to pick a 
> specific subclass. This selection will then become the value of the JS 
> variable 'type' in the script.
>
> Regards
> Holger
>
>
> On 28 Mar 2024, at 10:21 PM, Marie Valadez <meval...@gmail.com> wrote:
>
> Ignore the "a sh:PropertyShape" triples. I didn't mean to put that in the 
> examples. I have it just as an sh:Parameter.
>
> On Thursday, March 28, 2024 at 4:19:57 PM UTC-6 Marie Valadez wrote:
>
>> Hello!
>>
>> I am looking at making a constructor that has several parameters for the 
>> user to input. One of which is a drop down list to select the type of a 
>> class. I am trying to get it to only show a specified root class and its 
>> subclasses, similar to what normally appears by default  as a class tree. 
>> However, if I put the sh:class as the root class then it populates 
>> instances. If I use rdfs:Class I get classes to select but not narrowed 
>> down to the root I want. I tried adding a connection using dash:rootClass 
>> ex:Concept but that did not work either. Is there a specific data property 
>> to mimic the default type selector that shows up when constructing a new 
>> concept?
>>
>> Example of what I have been trying but not achieving the desired results:
>>
>> exsh:ConceptConstructor-type
>>   a sh:Parameter ;
>>   a sh:PropertyShape ;
>>   sh:path rdf:type ;
>>   sh:class rdfs:Class ;
>>   sh:description "The type of the new concept" ;
>>   sh:name "type" ;
>>   sh:nodeKind sh:IRI .
>>
>>
>> exsh:ConceptConstructor-type
>>   a sh:Parameter ;
>>   a sh:PropertyShape ;
>>   sh:path rdf:type ;
>>   sh:class rdfs:Class ;
>>   dash:rootClass ex:Concept ; #even tried with dash:editor 
>> dash:SubClassEditor but that throws an error
>>   sh:description "The type of the new concept" ;
>>   sh:name "type" ;
>>   sh:nodeKind sh:IRI .
>>
>> exsh:ConceptConstructor-type
>>   a sh:Parameter ;
>>   a sh:PropertyShape ;
>>   sh:path rdf:type ;
>>   sh:class ex:Concept ;
>>   sh:description "The type of the new concept" ;
>>   sh:name "type" ;
>>   sh:nodeKind sh:IRI .
>>
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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 topbraid-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/ded5382b-dc61-4a12-95d7-580202f95063n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/ded5382b-dc61-4a12-95d7-580202f95063n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/d8a7da3b-4718-463f-9dca-ab6f83428b9cn%40googlegroups.com.

Reply via email to