That works! Many thanks, Michel ! Great! 2017-10-28 23:37 GMT+08:00 Bohms, H.M. (Michel) <[email protected]>:
> Should be...make the qudt unit a subclass of rdfs datatype! > > > Verzonden van mijn Android-telefoon via TouchDown (www.symantec.com) > > -----Original Message----- > *From:* [email protected] [[email protected]] > *Received:* zaterdag, 28 okt. 2017, 14:02 > *To:* TopBraid Suite Users [[email protected]] > *Subject:* Re: [topbraid-users] Re: question: how to create a > user-defined datatype? > > Hi Michel, > > Sorry for the late reply. I've been busy with some other tasks. > Thank you very much for providing all the links regarding Qudt! > > After exploring Qudt (http://www.qudt.org/), I found this vocabulary > really useful -*http://qudt.org/1.1/vocab/OVG_units-qudt-(v1.1).ttl > <http://qudt.org/1.1/vocab/OVG_units-qudt-(v1.1).ttl>*, as it contains > all the units I'm interested in (i.e.: currency, kilogram, gram, oz). > > However, I still cannot achieve what I want. > > Learning from your bridge example, I was expecting to do the following: > > *:price* > * rdf:type owl:DatatypeProperty ;* > * rdfs:domain :Product ;* > * rdfs:range unit:SingaporeDollar ;* > * .* > > But after importing *http://qudt.org/1.1/vocab/OVG_units-qudt-(v1.1).ttl > <http://qudt.org/1.1/vocab/OVG_units-qudt-(v1.1).ttl>* into my ontology, > it seems in *unit:SingaporeDollar* is *not a built-in datatype*, but *just > an instance* to the class *qudt:CurrencyUnit*. > > So, currently, I am doing following: > > :price > rdf:type owl:DatatypeProperty ; > rdfs:domain :Product ; > rdfs:range qudt:CurrencyUnit ; > rdfs:range xsd:decimal ; > > :KitKatValuePack12Plus2 > rdf:type :Product ; > :price unit:SingaporeDollar ; > :price 6.00 ; > . > > But, it's really not what I want... > > Just really wondering, why in your examle, *unit:M* seems to be used as a > *build-in > datatype*? > > *simple:height* > * rdf:type owl:DatatypeProperty ;* > * rdfs:range unit:M ;* > *.* > > *Is it my issue* (e.g., not knowing how to make use of the vocabulary - > http://qudt.org/1.1/vocab/OVG_units-qudt-(v1.1).ttl),* or it is the > vocabulary's problem* (i.e. I am using the wrong one)? > > Thank you for your help in advance! > > 在 2017年10月26日星期四 UTC+8下午3:38:35,Bohms, H.M. (Michel)写道: >> >> Works for me on mobile too, but still not via tno (any browser >> chrome/ie/edge/firefox) >> >> Seem to be some security issue (chrome says: connection is not safe) >> >> My it-dept will look into it, maybe our side issue >> >> >> >> Tbc michel >> >> >> >> >> >> >> >> >> >> >> >> Dr. ir. H.M. (Michel) Böhms >> Senior Data Scientist >> >> T +31888663107 <+31%2088%20866%203107> >> M +31630381220 <+31%206%2030381220> >> E [email protected] >> >> Location >> <https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707> >> >> >> >> <http://www.tno.nl/> >> >> This message may contain information that is not intended for you. If you >> are not the addressee or if this message was sent to you by mistake, you >> are requested to inform the sender and delete the message. TNO accepts no >> liability for the content of this e-mail, for the manner in which you use >> it and for damage of any kind resulting from the risks inherent to the >> electronic transmission of messages. >> >> >> >> >> >> >> >> >> >> *From:* Ralph Hodgson [mailto:[email protected]] >> *Sent:* donderdag 26 oktober 2017 00:08 >> *To:* Bohms, H.M. (Michel) <[email protected]>; >> [email protected] >> *Subject:* Re: [topbraid-users] Re: question: how to create a >> user-defined datatype? >> >> >> >> Worked for me here in Utrecht >> >> >> >> On Wed, 25 Oct 2017 at 16:32, Bohms, H.M. (Michel) <[email protected]> >> wrote: >> >> Oeps, I retested and it seems the qudt.org is a dead link now! >> >> >> >> Maybe intential, I copied Ralph in. >> >> >> >> So for now I only have a github link (but you might need permission >> first). >> >> I hope Ralph can help you with that. >> >> >> >> Gr Michel >> >> >> >> >> >> >> >> Ps wrt earlier “double-check”: >> >> >> >> see from primer: >> >> “ >> >> 5.4 Enumeration of Individuals >> >> A very straightforward way to describe a class is just to enumerate all >> its instances. OWL provides this possibility, e.g. we can create a class of >> birthday guests: >> >> *Turtle Syntax* >> >> :MyBirthdayGuests owl:equivalentClass [ >> >> rdf:type owl:Class ; >> >> owl:oneOf ( :Bill :John :Mary ) >> >> ] . >> >> Note that this axiom provides more information than simply asserting >> class membership of Bill, John, and Mary as described in Section 4.1. In >> addition to that, it also stipulates that Bill, John, and Mary are the >> *only* members of MyBirthdayGuests. Therefore, classes defined this way >> are sometimes referred to as *closed classes* or enumerated sets. If we >> now assert Jeff as an instance of MyBirthdayGuests, the consequence is that >> Jeff must be equal to one of the above three persons. >> >> “ >> >> As you can see it says “also”. So it seems that if you do one of, typing >> is not needed anymore. However I can remember an earlier discussion on this >> that you can also do both typing *and* one of, maybe other have further >> comments here. >> >> >> >> >> >> >> >> >> >> >> >> >> >> Dr. ir. H.M. (Michel) Böhms >> Senior Data Scientist >> >> T +31888663107 <+31%2088%20866%203107> >> M +31630381220 <+31%206%2030381220> >> E [email protected] >> >> Location >> <https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707> >> >> >> >> <http://www.tno.nl/> >> >> This message may contain information that is not intended for you. If you >> are not the addressee or if this message was sent to you by mistake, you >> are requested to inform the sender and delete the message. TNO accepts no >> liability for the content of this e-mail, for the manner in which you use >> it and for damage of any kind resulting from the risks inherent to the >> electronic transmission of messages. >> >> >> >> >> >> >> >> >> >> *From:* Bohms, H.M. (Michel) >> *Sent:* woensdag 25 oktober 2017 16:14 >> *To:* '[email protected]' <[email protected]> >> *Subject:* RE: [topbraid-users] Re: question: how to create a >> user-defined datatype? >> >> >> >> Fyi: >> >> >> >> [QUDT] http://www.qudt.org/, some relevant deeper >> references: >> >> · Catalog - http://www.qudt.org/release2/qudt-catalog.html >> >> · QUDT schema - http://qudt.org/doc/2016/DOC_S >> CHEMA-QUDT-v2.0.html >> >> https://github.com/TopQuadrant/qudt-dev/ (currently on invitation >> only!), some relevant deeper references: >> >> · Basic quantities - http://qudt.org/2.0/vocab/quantitykind/base >> (not yet downloadable/dereferenceable) >> >> o File: VOCAB_QUDT-BASE-QUANTITY-KINDS-v2.0.ttl >> >> · Base units - http://qudt.org/2.0/vocab/unit/space-and-time >> (not yet downloadable/dereferenceable) >> >> o File: VOCAB_QUDT-UNITS-SPACE-AND-TIME-v2.0.ttl >> >> >> >> (All files adapted correcting import/prefix bugs) >> >> >> >> >> >> >> >> >> >> >> >> >> >> Dr. ir. H.M. (Michel) Böhms >> Senior Data Scientist >> >> T +31888663107 <+31%2088%20866%203107> >> M +31630381220 <+31%206%2030381220> >> E [email protected] >> >> Location >> <https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707> >> >> >> >> <http://www.tno.nl/> >> >> This message may contain information that is not intended for you. If you >> are not the addressee or if this message was sent to you by mistake, you >> are requested to inform the sender and delete the message. TNO accepts no >> liability for the content of this e-mail, for the manner in which you use >> it and for damage of any kind resulting from the risks inherent to the >> electronic transmission of messages. >> >> >> >> >> >> >> >> >> >> *From:* [email protected] [mailto:[email protected]] *On >> Behalf Of *[email protected] >> *Sent:* woensdag 25 oktober 2017 15:58 >> *To:* TopBraid Suite Users <[email protected]> >> *Subject:* Re: [topbraid-users] Re: question: how to create a >> user-defined datatype? >> >> >> >> Thank you very much Michel! >> >> >> >> Ok, seems I need to search & downloand qudt2.0... >> >> >> >> I will follow your suggestion. [just read a little bit on owl:oneOf. to >> double check, do you mean via rdf:DataRange+owl:oneOf in "which relate to >> such units and then enumerate (via rdf:type + owl:oneOf)"?] >> >> >> >> >> >> >> 在 2017年10月25日星期三 UTC+8下午7:48:50,Bohms, H.M. (Michel)写道: >> >> >> >> Much clearer now! >> >> >> >> So indeed revert to classes and then: >> >> 1. which relate to such units and then enumerate (via rdf:type + >> owl:oneOf), or >> >> 2. or which do not relate to units but enumerate things like >> 12gram, 178gram etc.) which seems a bit implicit to me… >> >> >> >> ie something like (1): >> >> >> >> powerful:Velocity_1 >> >> rdf:type powerful:Velocity ; >> >> qudt:numericValue "128.0"^^xsd:float ; >> >> qudt:unit unit:KM-PER-HR ; >> >> . >> >> But then minus the numericvalue and adding individual ref. values >> >> >> >> Hope that is useful >> >> >> >> >> >> Wrt qudt2.0: indeed not yet dereferenceable so you need the right files >> locally… >> >> >> >> >> >> >> >> Dr. ir. H.M. (Michel) Böhms >> Senior Data Scientist >> >> T +31888663107 <+31%2088%20866%203107> >> M +31630381220 <+31%206%2030381220> >> E [email protected] >> >> Location >> <https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707> >> >> >> >> <http://www.tno.nl/> >> >> This message may contain information that is not intended for you. If you >> are not the addressee or if this message was sent to you by mistake, you >> are requested to inform the sender and delete the message. TNO accepts no >> liability for the content of this e-mail, for the manner in which you use >> it and for damage of any kind resulting from the risks inherent to the >> electronic transmission of messages. >> >> >> >> >> >> >> >> >> >> *From:* [email protected] [mailto:[email protected]] * >> On Behalf Of *[email protected] >> *Sent:* woensdag 25 oktober 2017 13:36 >> *To:* TopBraid Suite Users <[email protected]> >> *Subject:* Re: [topbraid-users] Re: question: how to create a >> user-defined datatype? >> >> >> >> Hi Michel, >> >> >> >> Thank you very much for the quick reply! >> >> >> >> Sorry didn't express my issue clearly. >> >> Yes, I actually want two things: 1. adding unit info 2. being able to >> create user-defined fixed standard values. >> >> >> >> Seems your answer helped with the first issue. I have been never known >> there is this ontology about unit of measure! Seems very useful! >> >> Though, I tried to import "http://qudt.org/2.0/vocab/unit/space-and-time/" >> into TBC, it failed. The error log says: failed to inspect, could not >> complete import. >> >> Do you have any idea why it is so? >> >> >> >> As to the second issue, I still have no clue.... >> >> >> 在 2017年10月25日星期三 UTC+8下午7:16:56,Bohms, H.M. (Michel)写道: >> >> >> >> Maybe consider an approach to define simply >> >> >> >> A weight datatypeproperty with range a datatype unit:gram (from e.g. >> qudt2.0) as datatype >> >> >> >> Ex: >> >> @prefix unit: <http://qudt.org/2.0/vocab/unit/space-and-time/> . >> >> >> >> qudt:Unit >> >> rdfs:subClassOf rdfs:Datatype ; >> >> . >> >> >> >> simple:height >> >> rdf:type owl:DatatypeProperty ; >> >> rdfs:range unit:M ; >> >> . >> >> >> >> simple:Bridge_1 >> >> rdf:type simple:Bridge ; >> >> cmo:hasDirectPart simple:Deck_1 ; >> >> simple:currentlyServingVehicle simple:Vehicle_1 ; >> >> simple:height "50.0"^^unit:M ; >> >> . >> >> >> >> If not good enough turn to classes where you can attach the unit info >> other than via datatype and/or instantiate reference enumerated items >> >> (it’s not fully clear to me what you main issue is: adding unit info or >> being able to deal with fixed standard values, or both…) >> >> >> >> Gr michel >> >> >> >> >> >> >> >> >> >> Dr. ir. H.M. (Michel) Böhms >> Senior Data Scientist >> >> T +31888663107 <+31%2088%20866%203107> >> M +31630381220 <+31%206%2030381220> >> E [email protected] >> >> Location >> <https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707> >> >> >> >> <http://www.tno.nl/> >> >> This message may contain information that is not intended for you. If you >> are not the addressee or if this message was sent to you by mistake, you >> are requested to inform the sender and delete the message. TNO accepts no >> liability for the content of this e-mail, for the manner in which you use >> it and for damage of any kind resulting from the risks inherent to the >> electronic transmission of messages. >> >> >> >> >> >> >> >> >> >> *From:* [email protected] [mailto:[email protected]] * >> On Behalf Of *[email protected] >> *Sent:* woensdag 25 oktober 2017 12:38 >> *To:* TopBraid Suite Users <[email protected]> >> *Subject:* Re: [topbraid-users] Re: question: how to create a >> user-defined datatype? >> >> >> >> Hi all, >> >> >> >> I've read this whole thread, but hasn't found useful info for my issue. >> >> >> >> I want to define a datatype as follows: >> >> 0. It will be the range of datatype property called "hasWeight", defined >> by myself; >> >> 1. I will name this datatype as "WeightOfProduct"; >> >> 2. It has two attributes: weight, unit of measure; >> >> 3. An instance of this datatype would be: 39gm. >> >> >> >> I plan to apply it in the following case: >> >> [Kit Kat Value Pack12Plus2] -(hasWeight) -> 1400gm >> >> >> >> Can anyone instruct me on building it? >> >> >> >> Thanks very much! >> >> 在 2017年7月3日星期一 UTC+8上午8:51:15,Holger Knublauch写道: >> >> Hi Paul, >> >> I am afraid such OWL enumeration datatypes are not well supported right >> now. And we don't plan to add further support for these OWL 2 datatypes in >> general. I believe they have not lived up to expectations and are not >> widely used. Maybe it has to do with the fact that most users would expect >> to have something like "active"^^xsd:string. Moving forward, we plan to >> cover this use case with SHACL (sh:in). >> >> For scenarios such as yours, many people use instances, e.g. define a >> class cti:ObjectStatus with three instances cti:active etc, and then an >> owl:oneOf to enumerate those instances. Would this be an option? >> >> Regards, >> Holger >> >> On 3/07/2017 7:40, Paul Patrick wrote: >> >> This is similar to what I've been trying to do as well and have gotten >> close but clearly am missing a step. >> >> >> >> What I'm trying to do is define a user-defined data type that I can use >> as the datatype for a Range, but it based on a enumeration. I can't define >> it on the predicate directly as I use this same value for a number of >> different predicates. So I'm trying to defined a new user-type that could >> be the range of the predicate. >> >> >> >> I think I've gotten close based on the following code below, but when I >> look at an instance serialized, I see the data type of the selected value >> is string xsd:string. With a suspicion that it was the value followed by >> ^^xsd:string, I went into Source Code view in TopQuadrant and changed the >> "xsd:string" to by datatype "cti:ObjectStatusVocab". >> >> >> >> cti:ObjectStatusVocab >> >> a rdfs:Datatype ; >> >> rdfs:comment "Defines the vocabulary that d...@en-US ; >> >> rdfs:label "Object Status Vocabulary"@en-US ; >> >> rdfs:subClassOf rdfs:Resource ; >> >> owl:onDatatype xsd:string ; >> >> owl:oneOf ( "active"^^xsd:string "deprecated"^^xsd:string >> "revoked"^^xsd:string ) . >> >> >> >> That seemed to work. With this I got the serialization I was looking for: >> >> >> >> <subject_id> <http://example.com/cti#ObjectStatus "active"^^ >> <http://example.com/cti#ObjectStatusVocab> >> <http://example.com/cti#ObjectStatusVocab> . >> >> >> >> So I then tried to do it in the Form view, but it didn't like the >> ["active"^^cti:ObjectStatusVocab","deprecated"^^cti:ObjectStatusVocab, >> "revoked"^^cti:ObjectStatusVocab] so still trying to figure out if I'm >> just doing something wrong or if I've got to use the Source Code view >> because the Form view doesn't let one enter in anything except >> primitive types. >> >> >> >> Can anyone tell me if I'm doing this correct? >> >> >> >> >> >> >> On Thursday, July 24, 2008 at 7:39:38 PM UTC-4, Anne Hunt wrote: >> >> Hello, >> >> In the TopBraid help documentation it states that with OWL 1.1, the user >> has the ability to create their own datatype. Can you give some guidance >> on the steps to create datatypes using the TopBraid Composer UI? Or is >> there another way to do it? I'd like to create something very similar to >> your xsd:string[pattern...] example. >> >> Anne >> >> >> ***From the help docs*** >> User-Defined Datatypes >> Arguably the most important OWL 1.1 feature is the ability to define new >> datatypes, and to use these new datatypes in property ranges and >> restrictions. For example, this can be used to state that adults are >> Persons where the age property must be equal to or greater than 18. The >> current OWL 1.1 datatype support is similar to XML Schema datatypes, >> allowing to define datatypes with facets such as minInclusive, length and >> pattern. Here are some examples to how such datatypes are defined in >> TopBraid Composer: >> >> xsd:int[>=18] - all ints greater than or equal to 18 >> xsd:float[>0.7, <2.3] - floating point numbers between 0.7 and 2.3 >> xsd:float[totalDigits 4, fractionDigits 2] - numbers such as 12.34 >> xsd:string[pattern "a[b]c*"] - strings that match the regular expression, >> e.g. "a", "abc", "accccc" >> xsd:string[length 27] - strings with exact length of 27 characters >> xsd:string[minLength 1, maxLength 8] - strings with at least 1 but at >> most 8 characters >> dataComplementOf(xsd:int[>=18]) - integers less than 18 >> There are essentially three ways to use these new expressions: >> >> Use the data range expressions as rdfs:range of a datatype property >> Use data range expressions as fillers of owl:allValuesFrom or >> owl:someValuesFrom restrictions >> Create a named owl:DataRange and set the associated facets such as >> minInclusive manually >> >> >> >> -- >> 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]. >> For more options, visit https://groups.google.com/d/optout. >> >> >> >> -- >> 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]. >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> 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]. >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> 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]. >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> >> Sent from Gmail Mobile >> > -- > 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]. > For more options, visit https://groups.google.com/d/optout. > > -- > 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/i5pfTbVsd8s/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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]. For more options, visit https://groups.google.com/d/optout.
