[Pellet-users] About function getInconsistentClasses
anningsl at 163.com
anningsl at 163.com
Wed Sep 19 02:22:50 UTC 2007
Hi all
I have defined an ontology,and defined an inconsistent class. The code as follows:
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Iterator;
import java.util.Set;
import org.mindswap.pellet.KnowledgeBase;
import org.mindswap.pellet.PelletOptions;
import org.mindswap.pellet.jena.ModelReader;
import org.mindswap.pellet.jena.OWLReasoner;
import org.mindswap.pellet.owlapi.Reasoner;
import org.semanticweb.owl.model.OWLClass;
import com.hp.hpl.jena.rdf.model.Model;
public class ConceptConsistent {
public static void main (String arg[]){
InputStream in = null;
try {
in = new FileInputStream(new File ("g://test.owl"));
} catch (FileNotFoundException e) {
System.out.println(e.getMessage());
e.printStackTrace();
}
ModelReader reader = new ModelReader();
System.out.println("The ontology is-------------");
if (in==null){
System.out.println("The ontology file is not found");
return;
}
Model model = reader.read(in);
OWLReasoner reasoner = new OWLReasoner();
Reasoner reasoner1 = new Reasoner();
reasoner.load(model);
Set objects = reasoner1.getInconsistentClasses();
System.out.println("The inconsistent classes in the ontology are:");
Iterator itr = objects.iterator();
while (itr.hasNext())
{
System.out.println("The class : " + itr.next().toString()+ "is inconsistent" );
}
}
}
But when I debug, the itr is null. what's wrong with the function getInconsistentClasses.
Is there another function can be used to check the inconsistency for classes??
Thank you very much
BRs
Anning
From: pellet-users-request at lists.owldl.com
To: pellet-users at lists.owldl.com
Date: Tue, 18 Sep 2007 20:01:04 +0800 (CST)
Subject: Pellet-users Digest, Vol 11, Issue 14
> Send Pellet-users mailing list submissions to
> pellet-users at lists.owldl.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.owldl.com/mailman/listinfo/pellet-users
> or, via email, send a message with subject or body 'help' to
> pellet-users-request at lists.owldl.com
>
> You can reach the person managing the list at
> pellet-users-owner at lists.owldl.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Pellet-users digest..."
>
>
> Today's Topics:
>
> 1. N-ary relations (Role Francois)
> 2. Re: N-ary relations (Bijan Parsia)
> 3. Re: N-ary relations (Markus Stocker)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 18 Sep 2007 10:05:02 +0200 (CEST)
> From: "Role Francois"
> Subject: [Pellet-users] N-ary relations
> To: pellet-users at lists.owldl.com
> Message-ID:
> <49034.84.5.96.213.1190102702.squirrel at webmail.univ-paris5.fr>
> Content-Type: text/plain;charset=iso-8859-1
>
> Hi Pellet users,
>
> First of all, many thanks to Rob and Bijan for their answers concerning
> how to control debug information.
>
> I have another (unrelated) question. I wonder how n-ary relations (n> 2)
> can be represented in OWL.
> For example suppose the temperature of an object depends both on its
> location and the time of the day as in the foillowing :
>
> temperature(object1,garden,afternoon,20)
> temperature(object1,garden,morning,20)
> temperature(object1,house,afternoon,18)
> ....
>
> Of course we could use binary relations such as :
>
> gardenAfternoonTemperature(object1,20)
> gardenMorningTemperature(objetc1,10)
> ....
>
> But it seems quite awkward...
>
> I realize this is not a Pellet-specific question but if any one has any
> suggestion I would be grateful,
>
> Fran?ois
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 18 Sep 2007 09:17:35 +0100
> From: Bijan Parsia
> Subject: Re: [Pellet-users] N-ary relations
> To: "Role Francois"
> Cc: pellet-users at lists.owldl.com
> Message-ID: <175182B8-3525-4380-8186-8544AB3DBB14 at clarkparsia.com>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
> On Sep 18, 2007, at 9:05 AM, Role Francois wrote:
>
> > Hi Pellet users,
> >
> > First of all, many thanks to Rob and Bijan for their answers
> > concerning
> > how to control debug information.
> >
> > I have another (unrelated) question. I wonder how n-ary relations
> > (n> 2)
> > can be represented in OWL.
>
> Standardly, by reification (i.e., by making the relation an object
> with (binary) relations to each term).
>
> Some DLs have syntactic support for this (i.e., DLR).
>
> There are some special cases.
>
> > For example suppose the temperature of an object depends both on its
> > location and the time of the day as in the foillowing :
>
> This could perhaps be modeled using an n-ary datatype predicate,
> which are part of OWL 1.1. If the set of times of day is small, you
> could use a set of unary datatypes (morningTemp, eveningTemp), or, if
> we added lists to the supported datatypes, unary datatypes of pairs.
>
> I don't know that any of the implementations support n-ary datatype
> predicates yet.
>
> > temperature(object1,garden,afternoon,20)
> > temperature(object1,garden,morning,20)
> > temperature(object1,house,afternoon,18)
> > ....
> >
> > Of course we could use binary relations such as :
> >
> > gardenAfternoonTemperature(object1,20)
> > gardenMorningTemperature(objetc1,10)
> > ....
>
> Or, hasTemp [timeOfDay afternoon; degrees 20].
>
> Which is more standard.
>
> > But it seems quite awkward...
>
> Yep. If the values tended to be ground, one could use nary dl safe
> rules (which are not currently supported by anyone; see the AL Log
> papers for an idea of what they could be like).
>
> > I realize this is not a Pellet-specific question but if any one has
> > any
> > suggestion I would be grateful,
>
> Yep. public-owl-dev is a better list.
>
> Cheers,
> Bijan.
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 18 Sep 2007 09:29:57 +0100
> From: "Markus Stocker"
> Subject: Re: [Pellet-users] N-ary relations
> To: "Role Francois"
> Cc: pellet-users at lists.owldl.com
> Message-ID:
>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Francois,
>
> Just a short note, you might find this [1] useful,
>
> markus
>
> [1] http://www.w3.org/TR/swbp-n-aryRelations/
>
> On 9/18/07, Role Francois wrote:
> > Hi Pellet users,
> >
> > First of all, many thanks to Rob and Bijan for their answers concerning
> > how to control debug information.
> >
> > I have another (unrelated) question. I wonder how n-ary relations (n> 2)
> > can be represented in OWL.
> > For example suppose the temperature of an object depends both on its
> > location and the time of the day as in the foillowing :
> >
> > temperature(object1,garden,afternoon,20)
> > temperature(object1,garden,morning,20)
> > temperature(object1,house,afternoon,18)
> > ....
> >
> > Of course we could use binary relations such as :
> >
> > gardenAfternoonTemperature(object1,20)
> > gardenMorningTemperature(objetc1,10)
> > ....
> >
> > But it seems quite awkward...
> >
> > I realize this is not a Pellet-specific question but if any one has any
> > suggestion I would be grateful,
> >
> > Fran?ois
> >
> >
> > _______________________________________________
> > 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/
> >
>
>
> ------------------------------
>
> _______________________________________________
> 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/
>
> End of Pellet-users Digest, Vol 11, Issue 14
> ********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.owldl.com/pipermail/pellet-users/attachments/20070919/a6bc3fc6/attachment.htm
More information about the Pellet-users
mailing list