11

I want to import some classes in Protege from different ontologies to my ontology. For example, I need the classes foaf:Person, org:Site, vcard:Organization, and many more.

I don't want to create them by myself (and modifying their IRI). When I did import the whole ontology (Schema.org, vCard, FOAF, …), I had many elements that I don't need.

Is there any way to do it?

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
Mohamed Sahbi
  • 1,065
  • 10
  • 24
  • Welcome to SO! See [this comment](https://stackoverflow.com/questions/44175054/how-can-i-use-an-imported-ontology-in-protege#comment75366264_44175054). Is it sufficient for your needs? – Stanislav Kralin May 26 '17 at 17:20
  • 1
    @StanislavKralin thank you. It is not sufficient. I know how to import an ontology and to create a class with specific URI (like [http://xmlns.com/foaf/0.1/Person](http://xmlns.com/foaf/0.1/Person) ). I need to import just specific classes from an ontology. I don't need to add 100 classes to my ontology that I won't use. – Mohamed Sahbi May 26 '17 at 18:56
  • Have you looked at this thread: http://protege-project.136.n4.nabble.com/Import-specific-classes-of-another-ontology-td4662343.html ? – Stanislav Kralin May 28 '17 at 13:48
  • @StanislavKralin I tried to use it, but it didn't work. – Mohamed Sahbi May 30 '17 at 10:50

1 Answers1

14

— Have you looked at this thread: protege-project.136.n4.nabble.com/…

— I tried to use it, but it didn't work.

There are subtle moments, especially on step 5.

  1. Open your target ontology.

target ontology

  1. Open the source ontology in the same window.

source ontology

  1. Select Refactor > Copy/move/delete axioms:

menu path

  1. Select axiom selection method.

import options

  1. Select signature (i. e. a set set of classes, properties etc.) to import. Do not forget to press >> !

select signature

  1. Now you can preview axioms to be imported.

axioms preview

  1. Select what you want to do:

operation selectio

8-9. Select your target ontology:

existing vs new

target ontology

  1. Voila!

result

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
  • 2
    Thank you, I discovered that my mistake was in step 2. I did open the ontologies in different windows, so I couldn't copy the classes. – Mohamed Sahbi Jun 01 '17 at 13:16