[Pellet-users] restriction query problem

Ibach, Brandon L brandon.l.ibach at lmco.com
Fri Oct 26 18:37:22 UTC 2007


Lisa,
    You've run into what some consider a limitation in Pellet, but one
which is actually an intentional part of the design.  See the FAQ entry
for details.
 
http://pellet.owldl.com/faq/different-results/

-Brandon :)


 


________________________________

	From: pellet-users-bounces at lists.owldl.com
[mailto:pellet-users-bounces at lists.owldl.com] On Behalf Of Lisa G. H.
	Sent: Friday, October 26, 2007 3:58 AM
	To: pellet-users at lists.owldl.com
	Subject: [Pellet-users] restriction query problem
	
	
	Hi
	
	I have a small ontology (please find it attached at end of this
	post). I have a question about formulating the proper query and
	extremely appreciate your help.
	
	Class "ClassType2B1" has someValues restriction on property
	includes: "includes some ClassType1A1"
	
	Class "ClassType2B11" has someValues restriction on property
	includes "includes some ClassType1A2".
	
	ClassType2B11 is the subclass of ClassType2B1.
	
	
	Now , If I run the query below :
	PREFIX kb:<http://www.partTests.test#
<http://www.parttests.test/#> >
	
	SELECT DISTINCT ?class ?x
	WHERE {
	?class rdfs:subClassOf ?restriction.
	?class rdfs:subClassOf kb:ClassType2.
	?restriction owl:onProperty kb:includes.
	?restriction owl:someValuesFrom ?x.}
	
	I get :
	?class ?x
	ClassType2B1 ClassType1A1
	ClassType2B11 ClassType1A2
	
	I don't get the following , but I need to return it as well:
	ClassType2B11 ClassType1A1
	
	
	
	
	
	Could you please explain how to get the the desired result ? I
am
	using Jena 2.5.4 and Pellet 1.5.
	
	
	Thank you
	Lisa
	
	
	
	
	Note -----------------------------
	
	If I run the same query, but look for an instance of
ClassType2B11,
	I get the both restrictions - query:
	
	SELECT Distinct ?j ?class ?x
	WHERE { ?j rdf:type ?class.
	?class rdfs:subClassOf ?restriction.
	?class rdfs:subClassOf kb:ClassType2.
	?restriction owl:onProperty kb:includes.
	?restriction owl:someValuesFrom ?x.}
	
	
	
	
	
	
	
	
	=================== ONTOLOGY ===================
	
	<?xml version="1.0"?>
	<rdf:RDF
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#
<http://www.w3.org/1999/02/22-rdf-syntax-ns#> "
	xmlns:owl="http://www.w3.org/2002/07/owl#
<http://www.w3.org/2002/07/owl#> "
	xmlns:xsd="http://www.w3.org/2001/XMLSchema#
<http://www.w3.org/2001/XMLSchema#> "
	xmlns="http://www.partTests.test# <http://www.parttests.test/#>
"
	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#
<http://www.w3.org/2000/01/rdf-schema#> "
	xml:base="http://www.partTests.test <http://www.parttests.test/>
">
	<owl:Ontology rdf:about="">
	<rdfs:comment
	rdf:datatype="http://www.w3.org/2001/XMLSchema#string
<http://www.w3.org/2001/XMLSchema#string> "
	>This is a test ontology in OWL DL.</rdfs:comment>
	</owl:Ontology>
	<owl:Class rdf:ID="ClassType1"/>
	<owl:Class rdf:ID="ClassType2B11">
	<rdfs:subClassOf>
	<owl:Class rdf:ID="ClassType2B1"/>
	</rdfs:subClassOf>
	<rdfs:subClassOf>
	<owl:Restriction>
	<owl:someValuesFrom>
	<owl:Class rdf:ID="ClassType1A2"/>
	</owl:someValuesFrom>
	<owl:onProperty>
	<owl:ObjectProperty rdf:ID="includes"/>
	</owl:onProperty>
	</owl:Restriction>
	</rdfs:subClassOf>
	</owl:Class>
	<owl:Class rdf:ID="ClassType1A3">
	<rdfs:subClassOf rdf:resource="#ClassType1"/>
	</owl:Class>
	<owl:Class rdf:about="#ClassType1A2">
	<rdfs:subClassOf rdf:resource="#ClassType1"/>
	</owl:Class>
	<owl:Class rdf:ID="ClassType2"/>
	<owl:Class rdf:about="#ClassType2B1">
	<rdfs:subClassOf rdf:resource="#ClassType2"/>
	<rdfs:subClassOf>
	<owl:Restriction>
	<owl:onProperty rdf:resource="#includes"/>
	<owl:someValuesFrom>
	<owl:Class rdf:ID="ClassType1A1"/>
	</owl:someValuesFrom>
	</owl:Restriction>
	</rdfs:subClassOf>
	</owl:Class>
	<owl:Class rdf:about="#ClassType1A1">
	<rdfs:subClassOf rdf:resource="#ClassType1"/>
	</owl:Class>
	<owl:Class rdf:ID="ClassType2B2">
	<rdfs:subClassOf rdf:resource="#ClassType2"/>
	</owl:Class>
	<ClassType2B11 rdf:ID="ClassType2B11_0"/>
	</rdf:RDF>
	
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.owldl.com/pipermail/pellet-users/attachments/20071026/3d7822f1/attachment.htm 


More information about the Pellet-users mailing list