Thank you very much Scott, It works like a charm! I really like the convenience of SPARQL in converting subclasses of subclasses. With my ontology with more than 9 levels of subclasses, I may use it in the future. Best, Andrew
On Tue, Aug 9, 2011 at 12:35 PM, Scott Henninger <[email protected] > wrote: > Andrew; It's really a matter of changing the type triple from > owl:class to the class you want it to be a member of. I'd suggest > doing this in SPARQL. Place the following query, substituting the > class name you are using for :SomeClass below: > > DELETE > { ?cls a ?type . > ?cls rdfs:subClassOf :SomeClass > } > INSERT > { ?cls a :SomeClass . > } > WHERE > { ?cls rdfs:subClassOf :SomeClass . > ?cls a ?type . > } > > If you want to go further down the tree, converting subclasses of > subclasses, use the transitive property path, e.g.: > WHERE > { ?cls rdfs:subClassOf+ :SomeClass . > ?cls a ?type . > } > > -- Scott > > On Aug 9, 12:06 pm, Andrew Russo <[email protected]> wrote: > > I have a question. Is there any way to convert all the sub-classes of > > a class to instances belong to that class? I have a class with more > > than 600 sub-classes and I don't want to create them from scratch > > again. There is no sub-sub-classes inside each 600 sub-classes. > > > > Thank you very much! > > Andrew > > -- > 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
