User-defined datatypes

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

User-defined datatypes

Glen Dobson-2
About user-defined datatypes in Protege 3.2 beta (as discussed at
http://protege.stanford.edu/plugins/owl/xsp.html)... Is there some way
of specifying them as the filler for e.g allValuesFrom restrictions?

The URL above seems to suggest that I should be able to do this. I can
create "on-the-fly" types in range statements - but I don't see how to
do so for property restrictions.

As a workaround I tried to create a named datatype and use this (in fact
this might often be a better solution anyway as I might like to reuse
my datatype definitions). I find that I can create a user-defined type
(e.g. decimal0to100) - and that in the "Create Restriction" dialog I
can right-click it and select it as the filler to a restriction - but
this results in:

Error- Class or Property name expected at "xsd:decimal0to100"

The assignation of the XSD namespace to the type I have created shows
up in the error message - but not in the OWL that is output. I also
find I can't assign a named, user-defined Datatype as the range of a
Property either.

On a related issue are there plans to support the OWL 1.1 style of
datatyping any time soon? The main reason I have returned to Protege's
custom datatype support is because of its apparent similarity to the
OWL 1.1. solution. In fact I may have answered my own question there as
perhaps there is nothing more that can be done (other than tweaking)
before a more complete OWL 1.1 draft is available?

Regards,

Glen.

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: User-defined datatypes

Mark Feblowitz
On a related topic, is there any way to use XML Schema Union Types as
user-defined data types?

Thanks,

Mark


At 10:27 AM 5/5/2006, Glen Dobson wrote:

>About user-defined datatypes in Protege 3.2 beta (as discussed at
>http://protege.stanford.edu/plugins/owl/xsp.html)... Is there some way
>of specifying them as the filler for e.g allValuesFrom restrictions?
>
>The URL above seems to suggest that I should be able to do this. I can
>create "on-the-fly" types in range statements - but I don't see how to
>do so for property restrictions.
>
>As a workaround I tried to create a named datatype and use this (in fact
>this might often be a better solution anyway as I might like to reuse
>my datatype definitions). I find that I can create a user-defined type
>(e.g. decimal0to100) - and that in the "Create Restriction" dialog I
>can right-click it and select it as the filler to a restriction - but
>this results in:
>
>Error- Class or Property name expected at "xsd:decimal0to100"
>
>The assignation of the XSD namespace to the type I have created shows
>up in the error message - but not in the OWL that is output. I also
>find I can't assign a named, user-defined Datatype as the range of a
>Property either.
>
>On a related issue are there plans to support the OWL 1.1 style of
>datatyping any time soon? The main reason I have returned to Protege's
>custom datatype support is because of its apparent similarity to the
>OWL 1.1. solution. In fact I may have answered my own question there as
>perhaps there is nothing more that can be done (other than tweaking)
>before a more complete OWL 1.1 draft is available?
>
>Regards,
>
>Glen.
>
>-------------------------------------------------------------------------
>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: User-defined datatypes

Glen Dobson-2
I have to admit that union types would be very useful as well. Looking
at the xsp ontology there is no support in Protege at the moment... just
max/min for numeric types and regular expression for strings.

It appears that OWL 1.1 may not address this either as the current
syntax draft only talks about what the XSD spec calls "Constraining
Facets" - Union being a "variety" rather than a "facet". I think this
highlights the danger of losing some of the expressivity of XSD by not
just reusing it as it is.

In partial answer to my own question I _almost_ found a workaround for
using named, user-defined datatypes. If you go to OWL|Preferences|
Visibility and make sure rdfs:Datatype is checked you can then create a
new Datatype Individual and specify new datatype properties for it e.g.
xsp:minInclusive, etc. However, for some reason I cannot change the type
of this property - so back to writing it manually I guess. I also found
that despite not being able to create restrictions using these Datatypes
in the "Create restriction" dialog I could create them in the "Create
new expression" dialog

Glen.


On Fri, 2006-05-05 at 10:36 -0400, Mark Feblowitz wrote:

> On a related topic, is there any way to use XML Schema Union Types as
> user-defined data types?
>
> Thanks,
>
> Mark
>
>
> At 10:27 AM 5/5/2006, Glen Dobson wrote:
> >About user-defined datatypes in Protege 3.2 beta (as discussed at
> >http://protege.stanford.edu/plugins/owl/xsp.html)... Is there some way
> >of specifying them as the filler for e.g allValuesFrom restrictions?
> >
> >The URL above seems to suggest that I should be able to do this. I can
> >create "on-the-fly" types in range statements - but I don't see how to
> >do so for property restrictions.
> >
> >As a workaround I tried to create a named datatype and use this (in fact
> >this might often be a better solution anyway as I might like to reuse
> >my datatype definitions). I find that I can create a user-defined type
> >(e.g. decimal0to100) - and that in the "Create Restriction" dialog I
> >can right-click it and select it as the filler to a restriction - but
> >this results in:
> >
> >Error- Class or Property name expected at "xsd:decimal0to100"
> >
> >The assignation of the XSD namespace to the type I have created shows
> >up in the error message - but not in the OWL that is output. I also
> >find I can't assign a named, user-defined Datatype as the range of a
> >Property either.
> >
> >On a related issue are there plans to support the OWL 1.1 style of
> >datatyping any time soon? The main reason I have returned to Protege's
> >custom datatype support is because of its apparent similarity to the
> >OWL 1.1. solution. In fact I may have answered my own question there as
> >perhaps there is nothing more that can be done (other than tweaking)
> >before a more complete OWL 1.1 draft is available?
> >
> >Regards,
> >
> >Glen.
> >
> >-------------------------------------------------------------------------
> >To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: User-defined datatypes

Nick Drummond
Mark, In partial answer to your questions:

OWL->preferences, import Protege metadata ontology + Support user  
defined XML schema datatypes

There is a bug in the restrictions dialog that prevents you from  
entering these, however you can enter them directly into the inline  
expression editor in the conditions widget:

eg
hasNumberOfEyes only int[1, 2]

Also, in OWL->preferences->datatypes you can make several common base  
types available for selection.

Glen, I think you know more about this than I do.

Hope this helps

Nick

On 5 May 2006, at 16:17, Glen Dobson wrote:

> I have to admit that union types would be very useful as well. Looking
> at the xsp ontology there is no support in Protege at the moment...  
> just
> max/min for numeric types and regular expression for strings.
>
> It appears that OWL 1.1 may not address this either as the current
> syntax draft only talks about what the XSD spec calls "Constraining
> Facets" - Union being a "variety" rather than a "facet". I think this
> highlights the danger of losing some of the expressivity of XSD by not
> just reusing it as it is.
>
> In partial answer to my own question I _almost_ found a workaround for
> using named, user-defined datatypes. If you go to OWL|Preferences|
> Visibility and make sure rdfs:Datatype is checked you can then  
> create a
> new Datatype Individual and specify new datatype properties for it  
> e.g.
> xsp:minInclusive, etc. However, for some reason I cannot change the  
> type
> of this property - so back to writing it manually I guess. I also  
> found
> that despite not being able to create restrictions using these  
> Datatypes
> in the "Create restriction" dialog I could create them in the "Create
> new expression" dialog
>
> Glen.
>
>
> On Fri, 2006-05-05 at 10:36 -0400, Mark Feblowitz wrote:
>> On a related topic, is there any way to use XML Schema Union Types as
>> user-defined data types?
>>
>> Thanks,
>>
>> Mark
>>
>>
>> At 10:27 AM 5/5/2006, Glen Dobson wrote:
>>> About user-defined datatypes in Protege 3.2 beta (as discussed at
>>> http://protege.stanford.edu/plugins/owl/xsp.html)... Is there  
>>> some way
>>> of specifying them as the filler for e.g allValuesFrom restrictions?
>>>
>>> The URL above seems to suggest that I should be able to do this.  
>>> I can
>>> create "on-the-fly" types in range statements - but I don't see  
>>> how to
>>> do so for property restrictions.
>>>
>>> As a workaround I tried to create a named datatype and use this  
>>> (in fact
>>> this might often be a better solution anyway as I might like to  
>>> reuse
>>> my datatype definitions). I find that I can create a user-defined  
>>> type
>>> (e.g. decimal0to100) - and that in the "Create Restriction" dialog I
>>> can right-click it and select it as the filler to a restriction -  
>>> but
>>> this results in:
>>>
>>> Error- Class or Property name expected at "xsd:decimal0to100"
>>>
>>> The assignation of the XSD namespace to the type I have created  
>>> shows
>>> up in the error message - but not in the OWL that is output. I also
>>> find I can't assign a named, user-defined Datatype as the range of a
>>> Property either.
>>>
>>> On a related issue are there plans to support the OWL 1.1 style of
>>> datatyping any time soon? The main reason I have returned to  
>>> Protege's
>>> custom datatype support is because of its apparent similarity to the
>>> OWL 1.1. solution. In fact I may have answered my own question  
>>> there as
>>> perhaps there is nothing more that can be done (other than tweaking)
>>> before a more complete OWL 1.1 draft is available?
>>>
>>> Regards,
>>>
>>> Glen.
>>>
>>> --------------------------------------------------------------------
>>> -----
>>> To unsubscribe go to http://protege.stanford.edu/community/ 
>>> subscribe.html
>>
>> ---------------------------------------------------------------------
>> ----
>> To unsubscribe go to http://protege.stanford.edu/community/ 
>> subscribe.html
>>
>
> ----------------------------------------------------------------------
> ---
> To unsubscribe go to http://protege.stanford.edu/community/ 
> subscribe.html
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html