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
> M +31630381220
> E [email protected] <javascript:>
>
> 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] <javascript:> [mailto:
> [email protected] <javascript:>] *On Behalf Of *
> [email protected] <javascript:>
> *Sent:* woensdag 25 oktober 2017 12:38
> *To:* TopBraid Suite Users <[email protected] <javascript:>>
> *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 
> <javascript:> ;
>
>         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] <javascript:>.
> 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.

Reply via email to