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 defines the status of an object."@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> .

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] <mailto:[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.

Reply via email to