Leonard,

In your example, you have two choices to create and use a "datatype restriction":

1-) Create an anonymous "datatype restriction". However, in TopBraid Composer, you need to put this as the class filler (range end) of a "quantifier restriction", i.e. "allValuesFrom" (only) or "someValuesFrom" (some) restriction, so it can be useful. In Manchaster syntax, it would look like:

age only xsd:integer[>= 18]

In TopBraid Composer, you could create a class "Adult", create a datatype property "age", and then select "Adult". In the "Adult" class form, you can "add empty row" by clicking on the drop-down arrow on "rdf:subClassOf" property, and enter "age only xsd:integer[>= 18]". If you need it, you could also do this restriction on "owl:equivalentClass" property.

In Turtle syntax (easier to read if classes and properties get involved), the full example would look like:

:age
      a       owl:DatatypeProperty .
:Adult
      a       owl:Class ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:allValuesFrom
                        [ a       rdfs:Datatype ;
                          owl:onDatatype xsd:integer ;
                          owl:withRestrictions
                                  ([ xsd:minInclusive 18
                                    ])
                        ] ;
                owl:onProperty :age
              ] .

The above example looks similar to what is described in:
http://composing-the-semantic-web.blogspot.com/2009/10/owl-2-support-in-topbraid-composer.html


2-) Create a URI resource for "datatype restriction". You can explicitly specify it in a resource, so it can be reused. These are the steps to follow:

- Click on the drop-down arrow in Classes view, and find Preferences... In "Show system classes", click on the checkbox for "xsd:integer".

- In the Classes view, create a subclass of "xsd:integer", and name it as "AdultAge".

- In the Properties view, find Preferences... In "Show system properties", click on the checkbox for "owl:equivalentClass".

- In the class form for "AdultAge", drag and drop "owl:equivalentClass" into the form. An empty row will appear. If not, add an empty row.

- In the empty row, enter: "xsd:integer[>= 18]".

In Turtle syntax, the full example would look like:

:AdultAge
      a       rdfs:Datatype ;
      rdfs:subClassOf xsd:integer ;
      owl:equivalentClass
              [ a       rdfs:Datatype ;
                owl:onDatatype xsd:integer ;
                owl:withRestrictions
                        ([ xsd:minInclusive 18
                          ])
              ] .

The above becomes a "user-defined datatype" as specified in:
http://www.w3.org/TR/owl2-primer/#Advanced_Use_of_Datatypes

Please note that the actual "datatype restriction" is referred by an "owl:equivalentClass" in this case. The "datatype restriction" itself remains an anonymous resource, but the equivalent URI datatype resource can be reused. For example, the allValuesFrom restriction in the first example now could be written like this:

age only AdultAge


If your email inbox accepts screenshots, I can also send them.

Gokhan


On 3/18/2011 5:04 PM, Leonard Jacuzzo wrote:
Thanks Gokhan,
But that does not indicate the maxinclusive, mininclusive information that I want to capture. I tried to write it in Manchester but failed. Plus that uses 'count' when I want to do something like Adult is equivalent to the restriction the datatype property age, which has an integer for its range and a minimal inclusive integer '18' as in the example from the w3c that I pasted in the original message.
Irene,
I will check out that blog. Thanks,
LFJ

On Fri, Mar 18, 2011 at 4:49 PM, Gokhan Soydan <[email protected] <mailto:[email protected]>> wrote:

    Hello Leonard,

    You could use "user-defined datatypes" in OWL 2 and express them
    in Manchaster Syntax in TopBraid Composer. So, if you build a
    restriction using those, it will look something like:

    :count only xsd:double[> 8.4, <10.0]

    where the literals specified in this restriction could be between
    8.4 and 10.

    More information about how OWL 2 user-defined datatype properties
    can be created in TopBraid Composer can be found here:

    
http://composing-the-semantic-web.blogspot.com/2009/10/owl-2-support-in-topbraid-composer.html

    More information on OWL 2 user-defined datatypes can be found
    here. For easier reading, please click on "Show Turtle Syntax" or
    "Show Manchaster Syntax" close to the top of the page:
    http://www.w3.org/TR/owl2-primer/#Advanced_Use_of_Datatypes

    Gokhan



    On 3/18/2011 11:50 AM, Leonard Jacuzzo wrote:
    Thanks Irene,
    Any thoughts on the first part of my question?
    Best,
    Leonard

    On Fri, Mar 18, 2011 at 2:47 PM, Irene Polikoff
    <[email protected] <mailto:[email protected]>> wrote:

        Leonard,

        To do qualified cardinality restriction, type "HasPart min 8
        X" where 'X' is a class. Or max or exactly depending on the
        cardinality type.

        Regards,

        Irene

        *From:*[email protected]
        <mailto:[email protected]>
        [mailto:[email protected]
        <mailto:[email protected]>] *On Behalf Of
        *Leonard Jacuzzo
        *Sent:* Friday, March 18, 2011 2:09 PM
        *To:* [email protected]
        <mailto:[email protected]>
        *Subject:* [topbraid-users] DatatypeRestriction in TBC.

        Hello,

        I would like to be able to use OWL2 datatype restrictions,
        but cannot figure out how to do this with TBC. For example, I
        would like to have a value like '8.4' count as a minimum
        exclusive value while defining a class as equivalent to the
        class having this minimal inclusive value for the datatype
        property in question.  I have pasted the W3C explanation of
        this below. It is from Owl2 New Features and Rationale.

        I would also like to be sure that I understand how one can do
        qualified cardinalites as restrictions on a property. It
        seems to allow me to type that in, but there is no icon for
        it in the dropdown via rightclick while formulating the
        restrictions.

        is it simply enough to type "HasPart 8 X" where 'X' is a class?

        Any help will be greatly appreciate.

        Best wishes,

        Leonard

        DatatypeRestriction also makes it possible to specify
        restrictions on datatypes by means of constraining /facets/
        <http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Datatype_Maps>
        that constrain the range of values allowed for a given
        datataype, by length (for strings) e.g., minLength,
        maxLength, and minimum/maximum value, e.g., minInclusive,
        maxInclusive. Extended datatypes are allowed in many
        description logics and are supported by several reasoners.
        Normative Syntax
        
<http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Datatype_Restrictions>
        Direct Semantics
        
<http://www.w3.org/TR/2009/REC-owl2-direct-semantics-20091027/#Data_Ranges>
        RDF-Based Semantics
        
<http://www.w3.org/TR/2009/REC-owl2-rdf-based-semantics-20091027/#Semantic_Conditions_for_Datatype_Restrictions>


        DatatypeRestriction( DT F_1 lt_1 ... F_n lt_n ) where DT is a
        unary datatype and ⟨ F_i lt_i ⟩, 1 ≤ i ≤ n are pairs of
        constraining facet and literal.

            * HCLS

        Functional-Style Syntax:

        DatatypeRestriction(xsd:integer minInclusive 18) (/UC#9/)

                

        new datatype with a lower bound of 18 on the XML Schema
        datatype xsd:integer

        RDF:

        _:x /rdf:type/ /rdfs:Datatype/ .
        _:x /owl:onDatatype/ /xsd:integer/ .
        _:x /owl:withRestrictions/ ( _:y ) .
        _:y /xsd:minInclusive/ "5"^^/xsd:integer/ . (/UC#9/)

                

        new datatype with a lower bound of 18 on the XML Schema
        datatype xsd:integer

        This datatype is needed for example to define patients under
        18 (children) who depend on a hospital's pediatric services
        while those over 18 (adults) depend on adult services.

-- You received this message because you are subscribed to the
        Google
        Group "TopBraid Suite Users", the topics of which include
        TopBraid Composer,
        TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
        To post to this group, send email to
        [email protected]
        <mailto:[email protected]>
        To unsubscribe from this group, send email to
        [email protected]
        <mailto:topbraid-users%[email protected]>
        For more options, visit this group at
        http://groups.google.com/group/topbraid-users?hl=en

-- You received this message because you are subscribed to the
        Google
        Group "TopBraid Suite Users", the topics of which include
        TopBraid Composer,
        TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
        To post to this group, send email to
        [email protected]
        <mailto:[email protected]>
        To unsubscribe from this group, send email to
        [email protected]
        <mailto:topbraid-users%[email protected]>
        For more options, visit this group at
        http://groups.google.com/group/topbraid-users?hl=en


-- You received this message because you are subscribed to the Google
    Group "TopBraid Suite Users", the topics of which include
    TopBraid Composer,
    TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
    To post to this group, send email to
    [email protected]
    <mailto:[email protected]>
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:[email protected]>
    For more options, visit this group at
    http://groups.google.com/group/topbraid-users?hl=en

-- You received this message because you are subscribed to the Google
    Group "TopBraid Suite Users", the topics of which include TopBraid
    Composer,
    TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
    To post to this group, send email to
    [email protected]
    <mailto:[email protected]>
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:topbraid-users%[email protected]>
    For more options, visit this group at
    http://groups.google.com/group/topbraid-users?hl=en


--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to