[Pellet-users] Problem with listSubProperties()
Evren Sirin
evren at clarkparsia.com
Mon Feb 11 01:26:49 UTC 2008
This seems to be a bug in the Jena interface of Pellet. I recorded this
problem in the issue tracker [1]. Thanks for reporting the bug.
Cheers,
Evren
[1] http://cvsdude.com/trac/clark-parsia/pellet-devel/ticket/99
On 2/10/08 9:58 AM, saurabh kejriwal wrote:
> Hi,
>
> I am using Pellet with Jena api. I am using standard Wine Ontology.
>
> Owl fragment:
> ------------
>
> <owl:FunctionalProperty rdf:about="#hasBody">
> <rdf:type rdf:resource="&owl;ObjectProperty"/>
> <rdfs:range rdf:resource="#WineBody"/>
> <rdfs:subPropertyOf rdf:resource="#hasWineDescriptor"/>
> </owl:FunctionalProperty>
>
> <owl:FunctionalProperty rdf:about="#hasColor">
> <rdf:type rdf:resource="&owl;ObjectProperty"/>
> <rdfs:domain rdf:resource="#Wine"/>
> <rdfs:range rdf:resource="#WineColor"/>
> <rdfs:subPropertyOf rdf:resource="#hasWineDescriptor"/>
> </owl:FunctionalProperty>
>
> <owl:FunctionalProperty rdf:about="#hasFlavor">
> <rdf:type rdf:resource="&owl;ObjectProperty"/>
> <rdfs:range rdf:resource="#WineFlavor"/>
> <rdfs:subPropertyOf
> rdf:resource="#hasWineDescriptor"/>
> </owl:FunctionalProperty>
>
> <owl:FunctionalProperty rdf:about="#hasSugar">
> <rdf:type rdf:resource="&owl;ObjectProperty"/>
> <rdfs:range rdf:resource="#WineSugar"/>
> <rdfs:subPropertyOf rdf:resource="#hasWineDescriptor"/>
> </owl:FunctionalProperty>
>
> When I am using the Pellet Reasoner--
>
> m = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC);
>
> and the following code for getting the sub property of hasWineDescriptor....
>
> OntProperty p = m.getOntProperty("http://www.w3.org/2001/sw/WebOnt/guide-src/wine#hasWineDescrip\
>
> tor <http://www.w3.org/2001/sw/WebOnt/guide-src/wine#hasWineDescriptor>");
>
> ExtendedIterator j = p.listSubProperties(true);
>
> while(j.hasNext())
> {
> OntProperty p2 = (OntProperty)j.next();
> System.out.println(p2);
> }
>
> I am getting no result for direct
> subproperties of hasWineDescriptor.
> But there are four direct subproperties of hasWineDescriptor property.
> 1. hasBody
> 2. hasColor
> 3. hasFlavor
> 4. hasSugar
>
> Regards
> Saurabh Kejriwal
>
> ------------------------------------------------------------------------
> Meet people who discuss and share your passions. Join them now.
> <http://in.rd.yahoo.com/tagline_groups_7/*http://in.promos.yahoo.com/groups>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pellet-users mailing list
> Pellet-users at lists.owldl.com
> http://lists.owldl.com/mailman/listinfo/pellet-users
> _______________________________________________
>
> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
More information about the Pellet-users
mailing list