Using Protégé

When viewing or editing FoodOn with the Stanford Protégé desktop OWL ontology editor, a few methods for extracting branches of vocabulary are available.

Copy class hierarchy

When viewing the hierarchy of entities on either Class or Entity tabs, right click while hovering over a hierarchic item to see a “Copy sub-hierarchy as tab-indented text” option which will copy ontology ids and labels into your document cut & paste buffer, for easy inclusion in other files or reports.

Export Axioms by reference

The “Refactor > Copy/move/delete axioms > Axioms by reference” menu option enables manual selection of items to copy into a new or existing ontology. However, each item has to be selected manually in their interface, which is painful when there are thousands of items descended from a root item that one wants to import.

Snap SPARQL Query

Alternately, one can add the “Window > Views > Query views > Snap SPARQL Query” editor to an existing or new tab. Protege will trigger a circle cursor which you use to indicate where in the screen layout to insert a query window (its a bit awkward!). Then you can launch speedy SPARQL queries. (Note that other SPARQL editors seem to perform poorly or freeze up altogether because of the size of FoodOn).