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    

[p4-feedback] How to create

Timothy Redmond tredmond at stanford.edu
Wed Oct 7 11:55:45 PDT 2009


The code you wrote did work as I expected.  It only showed the inferred
hierarchy so you have to run a reasoner.  To see the asserted hierarchy
you need the following code:

  AssertedClassHierarchyProvider2 HP=new AssertedClassHierarchyProvider2(getOWLModelManager().getOWLOntologyManager());
  HP.setOntologies(getOWLModelManager().getActiveOntologies());
  OWLObjectTree<OWLClass> tree = new OWLModelManagerTree<OWLClass>(getOWLEditorKit(), HP);
  this.add(tree);

-Timothy


On Mon, 2009-10-05 at 10:36 -0500, secevalliv at gmail.com wrote:
> Hi all, 
> 
> 
> I'm trying to build a tree in order to show all the classes of the
> active ontology. Looking over the documentation I found that can be
> done using the InferredOWLClassHierarchyProvider and an OWLObjectTree.
> So I wrote the following code: 
> 
> 
> InferredOWLClassHierarchyProvider HP=new
> InferredOWLClassHierarchyProvider(this.getOWLModelManager(),
> getOWLModelManager().getOWLOntologyManager());
>         
>         OWLObjectTree<OWLClass> tree = new
> OWLModelManagerTree<OWLClass>(getOWLEditorKit(), HP);
>         this.add(tree);
> 
> But it didn´t worked as I expected.
> 
> 
> Am I missing something? 
> 
> 
> Thanks in advance,
> José
> _______________________________________________
> p4-feedback mailing list
> p4-feedback at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback




More information about the p4-feedback mailing list