Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] How to use an rdfs:container (no matter if rdf:Alt, rdf:Bag, rdf:Seq or some subtype) in my OWL-DL project?

Tania Tudorache tudorache at stanford.edu
Tue May 6 12:53:56 PDT 2008


Hi Martin,

Martin Winkler wrote:
>
> Thanks for your reply.
>
> I am using Protégé 3.x and can't find the method 
> owlModel.getRDFSMemberProperty(). Is it only available in 4.x? Do you 
> have example code for the programmatical retrieval and creation of bag 
> instances and membership properties?
>

You are right. The method is not exposed in the current release. It will 
be in the next Protege 3.4 beta build.

Until then, you can use instead the call:

owlModel.getRDFProperty("rdfs:member")

This will return the same property as the call I mentioned.

Tania


>
> ------------------------------------------------------------------------
> *Von:* User support for the Protege-OWL editor
> *Gesendet:* 01.05.08 00:22:12
> *An:* User support for the Protege-OWL editor
> *Betreff:* Re: [protege-owl] How to use an rdfs:container (no matter 
> if rdf:Alt, rdf:Bag, rdf:Seq or some subtype) in my OWL-DL project?
>
> Martin,
>
> We had several message about using the rdf containers in protege. I
> suggest that you search the mailing list archive. I've already replied
> to a message about using the rdf containers from the Protege UI [1].
>
> If you are using the rdf containers, your ontology will be in OWL Full.
> There are alternatives to that by using OWL Lists. Univ. of Manchester
> has developed a modeling pattern for OWL Lists that is also available in
> Protege as a wizard (Tools menu -> Patterns -> OWL Lists).
>
> If you still want to use the rdf containers in Protege, you can. There
> is a RDFProperty "rdfs:member" defined in the API. You can get it by
> calling: owlModel.getRDFSMemberProperty(). You can create
> programmatically in your application the container membership properties
> (rdf:_1, rdf:_2, etc.).
>
> To create a rdf:Bag, you create an instance of rdf:Bag, and then you set
> the values of the rdf:_1, etc. to the individuals that are contained in
> the bag.
>
> Hope this helps.
>
> Tania
>
> [1]:
> http://article.gmane.org/gmane.comp.misc.ontology.protege.owl/22562/match=rdf+bag
>
>
> Martin Winkler wrote:
> >
> > I can't figure out how to properly create and use a
> > container-individual in my Protégé-OWL (-DL) project.
> >
> > I can see the classes rdfs:container, rdf:Alt, rdf:Bag, rdf:Seq in the
> > class list and can instantiate them, but there seems to be no
> > possibility to add content to the container-instances. No rdfs:member
> > property slot or rdf:_1, rdf:_2, ..., rdf:_n slot. A second problem: I
> > read that my ontology is no longer DL as soon as I use the property
> > rdfs:member and the rdfs:container class, but the subclasses rdf:Alt,
> > rdf:Bag, rdf:Seq are allowed in DL, then what OWL-DL conform
> > (Object-)Property can I use to add content to them? Within Protégé?
> >
> > But even if I create for example an rdf:Bag instance and store it in
> > my ontology I cannot properly access it from within my java application:
> >
> > with all the other classes I created I could do something like this to
> > acces them:
> >
> > Order myOrder = (Order) getOWLModel().getRDFResource(
> >
> > "Order2376uh328").as(Order.*class*);
> >
> > because I provided an interface "Order" and an implementation
> > "DefaultOrder". But there seems to be no interface and corresponding
> > default implementation for rdf:Bag in the Protege-API. I tried
> > com.hp.hpl.jena.rdf.model.Container but as this is from the jena world
> > it is not accessible like the other instances. Is there a common
> > approach to this?
> >
> >
> >
> > Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
> > kostenlos testen.
> > *http://www.pc-sicherheit.web.de/startseite/?mc=022220*
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > protege-owl mailing list
> > protege-owl at lists.stanford.edu
> > https://mailman.stanford.edu/mailman/listinfo/protege-owl
> >
> > Instructions for unsubscribing: 
> http://protege.stanford.edu/doc/faq.html#01a.03
> >
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: 
> http://protege.stanford.edu/doc/faq.html#01a.03
>
>
>
>
> Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!   
> *http://smartsurfer.web.de/?mc=100071&distributionid=000000000066* 
> <http://smartsurfer.web.de/?mc=100071&distributionid=000000000066>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>   




More information about the protege-owl mailing list