I need to model an enum,
and found this non uptodate tutorial:
https://topbraidcomposer.org/html/Create_an_enumeration.htm
Thus, I wonder if there is an uptodate procedure to create an enum in EDG?
Thanks
Luis
--
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/6621d600-2195-4e9c-9b5d-58ce8172722bn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/4F0BE51C-54CE-4A52-9929-AC5FC29A26BE%40topquadrant.com.
example_schema:ThingWithStatus-hasStatus a sh:PropertyShape ; sh:path example_schema:hasStatus ; sh:class example_schema:Status ; sh:description "only Active or Retired allowed" ; sh:in ( example_schema:Active example_schema:Retired ) ; sh:maxCount 1 ; sh:name "has status" ; .
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94X%3Dt%2BPftE1U7phvYsb_CpV1f0d_YFS53Q2%3DN6K8eoY2vMA%40mail.gmail.com.
On 17 Apr 2024, at 11:29 AM, 'Luis Enrique Ramos García' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:
I added the code at the end of the code of the target class, and got this result:
<image.png>When I click in "Declare enumeration from instances, I get this view:
<image.png>
<image.png>Then, I wonder how to make the system know where my list of enum values are?
Luis
El mié, 17 abr 2024 a las 10:51, Luis Enrique Ramos García (<luisenriqu...@googlemail.com>) escribió:
Hi Holger,Thanks for your answer, but to be frank I find these procedures very complicated.In my opinion the enum is a very common pattern, and I understand when to use it.Anyway, let's try to solve the issue1. I tried to add the code by myself, but it seems there is something wrong with the code:sh:in (
myontology:value1
myontology _:value2
myontology :value3
) ;myontology:property1;myontology:property2;myontology:enumproperty;Please, take in account that I edited the enum property just after the sh:in, but the editor put it at the endof the list of properties.Part of the result was this black datatype property in properties list
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94XnxaEsBD7ybryGTSRRBCHEMmPcac%3DkEJ9bhVkSkrerQDA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/B28AB52D-74C3-42E4-8E53-5E7162F79050%40topquadrant.com.
On 17 Apr 2024, at 1:38 PM, 'Luis Enrique Ramos García' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:I am working with version Version: 7.5.1 (20230316-1531).
I included an script panel, refreshed it, and I have this view:
<image.png>When I run the script I can see my class, the one for which I want to create the enum, is the result of focusNode.But, when I click in "Declare enumerations from instances" I get the same result again:
<image.png>I have a question:how does my script know from which class I do want to get my instances for the enum list?.
Because I think you are using the same class color?, how do I relate the class traffic light there?What I want to say is something like this:Product hasSize oneof Size (short, medium, large)And at this moment my focus is in Product, not in Size.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94XnEZxOr30t9e7v1nRKKHGiNBc36y9_AnGnzekM%2BAStt8g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/944F246C-07CA-4390-9EDE-BCD018E00442%40topquadrant.com.
On 17 Apr 2024, at 2:30 PM, 'Luis Enrique Ramos García' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:Thanks for your quick answer,But, dear, where should I add this code?.Because I tried to add it in the source code panel, and it didn't work, same with the script panel,where I expected it should work, but it did not.So, I owner in which panel should I add this code?.I do not have any idea how to use it.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94X%3DtQrMEKu3wzY6EB-5zZF7d-x6_JM3C3oMdzJ-AA65DFA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/48BCDC9A-590F-4473-8488-71DCDC57FFDD%40topquadrant.com.
On 17 Apr 2024, at 2:38 PM, 'Luis Enrique Ramos García' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:
I need only 3 elements in the enum,But, I tried at the first the source code edition, and told you the result I got:**********************************************************************************************************
1. I tried to add the code by myself, but it seems there is something wrong with the code:sh:in (
myontology:value1
myontology _:value2
myontology :value3
) ;myontology:property1;myontology:property2;myontology:enumproperty;Please, take in account that I edited the enum property just after the sh:in, but the editor put it at the endof the list of properties.Part of the result was this black datatype property in properties list
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94Xmexh4rZCPqza2q4mqkKhyvHcvRtGyb2t3ViuZjt1Tt6w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/12834BB7-ADBF-4371-A8C5-BF6D28F2EEC1%40topquadrant.com.
example_schema:ThingWithStatus-hasStatus a sh:PropertyShape ; sh:path example_schema:hasStatus ; sh:class example_schema:Status ; sh:description "only Active or Retired allowed" ; sh:in ( example_schema:Active example_schema:Retired ) ; sh:maxCount 1 ; sh:name "has status" ; .
On 17 Apr 2024, at 14:00, 'Luis Enrique Ramos García' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:
sure,I created a similar ontology for testing with same results, here is the code:tesontologyramosenum:Color
a owl:Class ;
a sh:NodeShape ;
rdfs:label "Color" ;
rdfs:subClassOf owl:Thing ;
sh:in (
tesontologyramosenum:Green
tesontologyramosenum:Yellow
tesontologyramosenum:Red
) ;
sh:property tesontologyramosenum:Color-label ;
.the screen shot is this:
<image.png>
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94X%3Dz1XHgbJOu4Rh8-rO7z1gxptz4cMSi8Re0KK9H2EAp2Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/11E314D6-AA1B-4B3F-BC8E-1450B5BF5704%40topquadrant.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/11E314D6-AA1B-4B3F-BC8E-1450B5BF5704%40topquadrant.com.
On 17 Apr 2024, at 3:00 PM, 'Luis Enrique Ramos García' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:
sure,I created a similar ontology for testing with same results, here is the code:tesontologyramosenum:Color
a owl:Class ;
a sh:NodeShape ;
rdfs:label "Color" ;
rdfs:subClassOf owl:Thing ;
sh:in (
tesontologyramosenum:Green
tesontologyramosenum:Yellow
tesontologyramosenum:Red
) ;
sh:property tesontologyramosenum:Color-label ;
.the screen shot is this:
<image.png>
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94X%3Dz1XHgbJOu4Rh8-rO7z1gxptz4cMSi8Re0KK9H2EAp2Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/17F906D2-9365-491A-B2C4-0E61B5D42A90%40topquadrant.com.
On 17 Apr 2024, at 3:55 PM, 'Luis Enrique Ramos García' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:it works now in this ontology,now, if I want to add a color in any instance (for testing purpose),it is only by modifying the code?, like this?:
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94XmmmY5c9ifg87U%3DF36ARcS1GeMOFQ%3DZsA25PrKZUiAQKA%40mail.gmail.com.
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/OlXTT8d8kwc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/96FB1BF8-067D-4FF2-84BD-97F0DE0D807C%40topquadrant.com.
On 18 Apr 2024, at 7:52 AM, 'Luis Enrique Ramos García' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:Hi Holger,good morning,Unfortunately it is not the case, and I can not see the options in the editor.The code of the traffic light class and color property are:tesontologyramosenum:TrafficLight
a owl:Class ;
a sh:NodeShape ;
rdfs:label "TrafficLight" ;
rdfs:subClassOf owl:Thing ;
sh:property tesontologyramosenum:TrafficLight-color ;
.
tesontologyramosenum:TrafficLight-color
a sh:PropertyShape ;
sh:path tesontologyramosenum:color ;
sh:name "color" ;
sh:node tesontologyramosenum:Color ;
sh:nodeKind sh:IRI ;
.and when I create an instance of traffic light, this is what I see:
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94Xm1_85V%2Bht5qYx4ijjcQfN2xj1%3D%2B57OUcJQ8xE4RjbHDg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/AFECE5D7-8F15-4EFD-8D71-2A38E744A985%40topquadrant.com.
On 18 Apr 2024, at 3:41 PM, 'Luis Enrique Ramos García' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:Holger,I think I did the recommended change:tesontologyramosenum:TrafficLight
a owl:Class ;
a sh:NodeShape ;
rdfs:label "TrafficLight" ;
rdfs:subClassOf owl:Thing ;
sh:property tesontologyramosenum:TrafficLight-color ;
.
tesontologyramosenum:TrafficLight-color
a sh:PropertyShape ;
sh:path tesontologyramosenum:color ;
sh:class tesontologyramosenum:Color ;
sh:name "color" ;
sh:nodeKind sh:IRI ;But, when I create a trafficlight1 instance, I still have the same view, the color property is present, however it is blank, no colors:
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94X%3D7yLpBfTGyGak-vvgWZwKQ7%3DO0n5%3DjfC%2BbgjpRH%3DAJWg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/12F5793B-034A-432E-A12A-3F6B6A10DBEE%40topquadrant.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94X%3D_ALU8XZ8mrU8F84EFDthVb9d2UsZshaQTs4QiB_sneA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/A5890592-6558-4AF8-94DF-A26163196E4F%40topquadrant.com.
On 22 Apr 2024, at 11:33 AM, 'Luis Enrique Ramos García' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:
sure, for the traffic light, I see this:
<image.png>for the color property I see this:
<image.png>and for Color class I see this.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CABy94XmxuSU871%3DOnXoftj6v%3DUbxk0WCR-ia4%3DdFsq7vQQTRxg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/67108BD2-C2F1-405E-9DBB-54CF6F509954%40topquadrant.com.