[MOBY-l] Datatype queries on central registry with jmoby API

Michael DiBernardo mikedebo at gmail.com
Wed Jun 13 14:57:32 UTC 2007


On 13-Jun-07, at 6:54 AM, Paul Gordon wrote:

> Hi Mike,
>
> Actually, the opposite is true.  Suppose you are a service  
> provider, and you accept class X. If you receive class Y, you want  
> to see if it it inherits from class X.  To do this, you recursive  
> ascend the parents of Y until the
> you reach X, or the ontology root ("Object").  This is considerably  
> less expensive , i.e. O(log n) than a depth or breadth-first search of
> the subclass trees, i.e. O(n).

Yes I realized this a couple of hours after I sent the previous  
email... another example of me jumping to conclusions before  
thoroughly thinking it through. Thanks for the verification.

> Checking subtypes would be useful for explicit cast operations though.
>> It seems to me that fetching the subclasses of a type would be a  
>> far  more common operation than examining parents, because if  
>> you're  writing any kind of software to orchestrate calls to MOBY  
>> services  and you require an input to be of type T, you'd also  
>> want to admit  any subclasses of type T as well. The parent  
>> classes, on the other  hand, are irrelevant in this context. So  
>> basically I assume that this  is possible and I'm just too stupid  
>> to figure it out.
>>
>
>
>> Pointers would be appreciated!
>>
> With regards to your other questions, I'll have to take a closer  
> look at the code and get back to you.

Thank you!

-Mike




More information about the moby-l mailing list