Re: Confusing DAML+OIL metamodel question

On Wed, 2002-08-21 at 03:14, Ora Lassila wrote:
> <daml:Class rdf:ID="MyFunkyMetaClass">
>    <daml:oneOf rdf:parseType="daml:collection">
>      <MyMetaClass rdf:ID="A"/>
>    <daml:oneOf>
> <daml:Class>
> 
> and then make AA be a subclass of A, weird things happen: Because of the 
> above definition AA is not a member of MyFunkyMetaClass, yet this 
> somehow goes against what I have always thought of the subclass 
> relation...

I don't see anything going against my conception of subclass relation...
Subclass relations tells me about *instances* of AA being also instances
of A, certainly not about *class* AA being member of the same
meta-classes as *class* A...

(try to figure out the meta-class containing all the classes having no
subclass...)

What you are trying to do can be achieved, I think, with

<daml:Class rdf:ID="MyNotSoFunkyMetaClass">
  <daml:sameClassAs>
    <daml:Restriction>
      <daml:onProperty rdf:resource="&rdfs;#subClassOf"/>
      <daml:hasValue rdf:resource="#A"/>
    </daml:Restriction>
  </daml:sameClassAs>
</daml:Class>

to be confirmed by some DAML+OIL guru, which I'm not...

  pA

> 
> Folks,
> 
> let me apologize in advance if this has recently been discussed (I am 
> not fully caught up on the mailing list traffic):
> 
> I'd like to define a property (preferably in DAML+OIL) whose values are 
> restricted to be a certain set of classes. One way of doing this would 
> be to define a metaclass and assign this as the rdfs:range of the 
> property. So far so good, but anyone can instantiate new classes from 
> the metaclass, so I would now like to restrict the membership of the 
> metaclass:
> 
> <daml:Class rdf:ID="MyMetaClass">
>    <daml:oneOf rdf:parseType="daml:collection">
>      <MyMetaClass rdf:ID="A"/>
>      <MyMetaClass rdf:ID="B"/>
>      ...
>    <daml:oneOf>
> <daml:Class>
> 
> This works. Now for my question: What if I wanted to restrict the 
> property values to my class A and any of its subclasses? Again, I could 
> define a metaclass, make A be an instance of this metaclass, but how to 
> restrict the membership of the metaclass? If I say
> 
> <daml:Class rdf:ID="MyFunkyMetaClass">
>    <daml:oneOf rdf:parseType="daml:collection">
>      <MyMetaClass rdf:ID="A"/>
>    <daml:oneOf>
> <daml:Class>
> 
> and then make AA be a subclass of A, weird things happen: Because of the 
> above definition AA is not a member of MyFunkyMetaClass, yet this 
> somehow goes against what I have always thought of the subclass 
> relation...
> 
> Or am I just confused? Any ideas?
> 
> 	- Ora
> 
> --
> Ora Lassila  mailto:daml@lassila.org  http://www.lassila.org/
> Research Fellow, Nokia Research Center
> 

Received on Wednesday, 21 August 2002 03:19:28 UTC