From: Rob V. <rv...@do...> - 2012-12-13 19:11:37
|
Hi Alex This appears to be the same question you asked at http://answers.semanticweb.com/questions/19984/dotnetrdf-list-all-ontology-c lasses To reproduce my answer try the following: //This gets the class for things which are declared to be a class OntologyClass classOfClasses = g.CreateOntologyClass(g.CreateUriNode("owl:Class")); //This iterates over the things that are a class foreach (OntologyResource class in classOfClasses.Instances) { //Do what you want with the class } Based on that question I realized that there are some pieces of the Ontology API missing so I filed an issue (CORE-293) for this - http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=293 If you have further ideas on this please reply to this email or add comments on the issue tracker. I have already made some changes on this in our source control see https://bitbucket.org/dotnetrdf/dotnetrdf/commits/1142f2971eefb8fffb71431530 15e960e22b8d00 for some new code that tries to address the lacking features. Hope this helps, Rob From: Aleksandar Zivaljevic <al...@da...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Thursday, December 13, 2012 2:01 AM To: <dot...@li...> Subject: [dotNetRDF-Support] List all objects of OntologyClass type > Hi, > > I am trying to enumerate all classes (OntologyClass type) in OntologyGraph; > the code would go like: > > Dim g As New OntologyGraph > FileLoader.Load(g, strURI) > For Each cl As OntologyClass in g.OntologyClases (OntologyClases is not the > real enum) > 'do some work on classes > Next > > Is this possible with DotNetRDF? > > Regards, > Alex > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely > access PCs and mobile devices and provide instant support Improve your > efficiency, and focus on delivering more value-add services Discover what IT > Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d__________________________________________ > _____ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |