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    

[protege-owl] Frustrations with Using the Documentation on Repository Management

Bruce Barkstrom brbarkstrom at
Thu Dec 23 09:44:42 PST 2010

I have been working with Protege 3.4.4 and had found the pins ontology
development to be
useful for organizing my thoughts about an outline in a book I'm writing.
Since I'm working
with the Earth Science Information Partner (ESIP) Federation where
developing several
ontologies related to Earth science data would be useful and since many of
the IT enthusiasts
work on the Open Provenance Model and the SWEET ontology, it seemed sensible
to move to
the OWL format, rather than what appears to be the original one.

I'm retired - and unaffiliated with no grant money or commercial income.  I
also do most of
my development work on a machine completely cut off from Internet access (I
don't want to
have to pay for virus scans and can't afford to hire a SA).  So - I was
pleased to see the
documentation on how to create repositories of namespace files that are
supposed to allow
a user to work offline simply by transferring the downloaded files to the
appropriate place
on the machine.

It's been a pretty frustrating experience - as the attached text file may
suggest.  I think one
of the problems is that my mental model of what's going on in the ontology
import-file download
and local repository structure is probably not well-aligned with the one the
Protege development
group has.  It occurred to me that this is the case as I got some partial
success in downloading

The attached file is my record of trying to develop a procedure for this
purpose.  It has work
covering several multi-hour sessions with Protege, using a machine I've got
connected to
the WWW - with the expectation that I'd move the downloaded files to my main
machine using a memory stick.  So far, I don't think I've succeeded in
getting enough files
downloaded to accomplish this.

Suggestions on how to proceed would be helpful.  Hopefully, the attachment
will also give
you some clues as to how to improve the "Managing Imports" documentation.

Bruce R. Barkstrom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
Importing OWL Files Into a Local Repository With Protege 3.4.4

1.  Creating and Specifying Repositories

After bringing up Protege, display the Ontology Repository Manager
by selecting the "Ontology repositories ..." button from the OWL toolbar
on the upper boundary of the Protege window.

Select whether the repository should be a project repository or a global one.

Click the "Add repository" button ('+'), which is in the top right-hand
corner of the selected repository type tab.  This will invoke the "Add
Repository Wizard".

Follow the steps displayed by the wizard that are needed to created the
repository.  [NOTE that the list of repositories will be saved WHEN you
save the project.]

a.  To test this out, I opened up Protege and put in a URI file://ontology_test

b.  Then I tried creating a local repository folder by opening up the repository
Manager, clicking on the `+' button on the upper right, where the button is
a white + against the light gray background.

c.  The popup menu whose title is "Create Ontology Repository" came up with
4 possible selections:
   Local folder
   Local file
   HTTP Repository
   Database Repository
The options for `relative folder' and `relative file' were grayed out and
therefore not available.

I selected the Local folder option.

d.  The "Create Ontology Repository" popup menu disappeared and was replaced
by a "Create Ontology Repository" popup menu - this time with a form requesting
a Folder name (Force Read-Only button was checked, but not the Include sub-folders
button).  There's a little black square with an arrow above it that apparently
means "browse."  I clicked that.

It was indeed an interface a bit like the standard Windows interface with the
navigation and the ability to create new folders.  I chose the Ontologies
directory and then created a folder called "OWLRepository".

e.  I elected to save the project in 
C:\Documents and Settings\Bruce Barkstrom\My Documents\Other_Docs\Ontologies\ontology-test
and found that I now had three files there:

OK - so far, so good - at least apparently.  The naming may be a bit clumsy,
but there hasn't been any sign that I've done anything explicitly erroneous.

2.  Importing an Ontology from the WWW.

a.  In order to import an ontology from the WWW, we turn to the project 
interface with the ONTOLOGY BROWSER in the left panel of the main window.  
On the line with the light gray/brown background and the label "Ontologies",
there are five icons - three of which are illuminated.  The one on the left
has a right-pointing arrow and a `+'.  The popup annotation says "Import ontology ...".
The icon just to the right of that has a popup that says "Create empty imported ontology ...".
The third icon from the left says "Remove import".  The fourth one says
"Set active ontology".  The fifth one on the right says "Download ontologies
to a folder ..." - although this is currently grayed out.

b.  So - having selected the "Import ontology ..." icon, a popup appears wanting
an address.  In this case, we input a URI identified as

c.  After inputing this, the interface brings up a popup that says it's checking
on the information at the URI to make sure it's proper.

d.  When the ontology seems to have imported the files, it provides another popup
that is entitiled "Added Prefixes", which include
The only obvious thing to do is to close the popup, at which point there are
a bunch more namespace prefixes that have appeared in that part of the lower
right panel of the INDIVIDUAL EDITOR.

Again, so far, so good.  Making progress, I guess.

3.  Downloading ontologies to a folder.

OK - now comes the acid test - can we get the ontologies to download to a folder
that gets placed in the repository we've created?

a.  Go up to the "purpled out" icon on the ONTOLOGY BROWSER panel - the one
that looks like the usual "folder" icon.  Also, select (by highlighting) the
ontology we want to bring in.  Try this with the arrow pointing right in the
panel below.  

b.  The selected directory contains a new file labelled opmo - but no extensions.
If this is opened with Wordpad, it looks like an XML page from the openprovenance
mode - but it isn't an OWL file.

The popup after it seemed to download things said something about closing the
project and reopening it.  [Hmmm!!!! - don't like the way this thing has been
acting.]  But OK?

c.  Restarting Protege.  This does at least seem to recover the previous items.
The ontology-test.owl.repository now contains the five lines:

[Dublin Core DL Redirect]

d. -- May need to catch my breath on this download stuff - since I've been at
it for an hour.

One thing to note: I had brought up Protege - and had actually gotten it to
download the dc OWL ontology.  Maybe that's progress.  The unfortunate part
of the process is that I don't have a way to download everything at one fell
swoop.  Rather, it looks like I have to go to the "download and ontology"
icon and then go over an save the file (or maybe create it) by clicking on
the "folder" icon.

Again - it seems to work, but it's a bit laborious.

A New Start

Having rested overnight, we'll try this again.

This time, I'll start up a new project and import an empty ontology.
Then, I'll go off and try to import the openprovenance model, moving the
imported ontology namespace files over to a local repository.

1.  Start up Protege with an empty ontology.  
I'll note that I have to provide an Ontology URI, so I used
Then selected OWL DL, followed by Properties View.

2.  After a bit of "trundling" the Namspace Prefixes that have been loaded
   owl     from
   protege from
   rdf     from
   rdfs    from
   swrl    from
   swrlb   from
   xsd     from
   xsp     from
An august enough list of external entities.  The only OWL class is THING.

3.  OK - now, I'm going to create a new project repository.  Bring up
the Ontology Repository Manager, identify that we want a Local Folder,
indicate it should be in a directory called Test_Ontology, and carry on.
The ontology repository is at the top of the search list and has the
Force Read-Only checkbox checked.

4.  With that, we're ready to import the openprovenance ontology from
the WWW.  So, go to the ONTOLOGY BROWSER and select the first icon with
the right-pointing arrow and the `+' (dangerous point - I think I understand
what the icon is trying to convey).  Again, I'll try
After a short period, the popup interface titled "Import Ontology" responds
that I just need to press the finish button to import
which is going to be imported from
That's so encouraging!  I pressed the finish button.

As before, this brings up the "Added Prefixes" popup menu with the same
list of added namespace prefixes:
   owl2xml        from
   p1             from
   xhv            from
   openprovenance from
   prv            from
   foaf           from
   opmo           from
   void           from
   wot            from
   dc             from
The URI's start to make a bit more sense this morning.
After recording the list, I hit the "Close" button at the bottom of the
"Added Prefixes" popup.

As an additional note, the OWL Classes are a bit fuller.  Under owl:Thing,
the subclasses are
   foaf:Agent =
   foaf:Person [which has a different icon]
      opmo:EventEdge [looks like a "document" icon on the left]
      opmo:Node = foaf:Agent ["document" icon]
   owl:AllDisjointClasses [different icon]
   prv:DataCreatoin [different icon]
   prv:DataItem [different icon]

5.  With that preface, I went back to the Metadata panel and observe that
in the ONTOLOGY BROWSER, there are two entries in the Ontologies Panel:
Ontology(file://Test_Ontology.OWL) [with a pink square turned 45 degrees so the point is down]
   Ontology( [which has a light pink background and another square turned 45 degrees]

Now, I click on the second line (noting that the two left icons on the 
"Ontologies" line of the ONTOLOGY BROWSER are grayed out, leaving what
is apparently the "delete ontology" icon, the "Set active ontology"
pencil icon, and the "purpled" "Download ontologies to a folder ..."
icon.  It looks like only the right three of these can be activated
(although I don't propose to check that idea right now - enough complication
is enough).  When I do click on that second line, the slightly darker
highlighted area in the ONTOLOGY BROWSER panel is surrounded by an orange
box - I guess to indicate that's what I was interested in downloading or
working with.

When I click on the "Download" icon, the popup menu asks me to "Choose download folder",
so I select Test_Ontology and press "Select".  Not too long afterward, another
popup menu appears with a title "Information", saying
   Downloaded to C:\...\Test_Ontology\opmo
which I guess documents what I wanted to do.  [Learning to see carefully 
requires me to look at what's on each of the popup menus - at least the
first time through this maze of things to do.  On initial contact, I am
too nervious to be able to take in the information - it's a "let's get this
over as fast as possible" kind of confusion.]

The next popup is titled "Add project repository?" - a useful enough title.
However, it doesn't give me much notice about what to do if I already
created one.  The question on the popup is "Would you like to add a project
repository to redirect imports to these local copies?" and there are two
buttons marked "Yes" (on the left) and "No" (on the right).  Based on
previous experience (which is more than the prince in the "Lady or the Tiger"
had), I'll guess "No", since I'd then have the added complication of having
to exit Protege and start over.  Besides, I'd already created one.  So - I'll
select "No" and hope nothing untoward happens.

When I look at the Repository Manager under the "Project repositories"
tab, I've got four entries:
   Local folder (which has the "Force Read-Only" box checked)
   Dublin Core DL Version
      (Redirect to
   Forced HTTP retrieval
      ( [actual ontology at this location:])

The only file in the Test_Ontology directory is opmo, which contains the Web
page from the Open Provenance Model web site that is the OPM OWL Specification
when I examine it with WordPad.

So - I've managed to download a Web page, but there isn't anything else.
My suspicion now is that to get the project file and such saved, I'll have
to push the "Save" menu icon in the toolbar or select the "Save" option from
the "File" item in the toolbar.

Let's see if this suspicion is correct.

If I click on the "Save" icon, I get the same popup window I remember from
selecting the "Save Project As" item from the "File" item.  OK, that popup
window has two form items:
   "OWL file name or URL"
plus a Language form item currently grayed out with the string "RDF/XML-ABBREV"
already in place.  I'll put in "Test_Ontology" in the Project form and expect
the OWL file name to become "Test_Ontology.owl".  The second form entry behaves
as expected.

Now, let's try clicking the "OK" button at the bottom of the popup which has
a title "OWL / RDF Files".

No change in the contents of the Test_Ontology directory, though.

So - let's try exiting Protege.

No change in the directory contents either.

OK - so it's time to restart Protege to see if we can recover what we've done!

6.  Here goes!

Restart Protege and select "Recent ..." [happened to go too fast through the
interface and didn't record the exact words].  It found the right project
(which I guess means that Protege has recorded the .pprj file someplace other
than the directory I expected it to use.

So - where are they?  I went looking and behold, they were in the directory
   Program Files\Protege_3.4.4
where there were the files

The last of these files is a text file that contains the history of the last
interaction between me and Protege.  I'll guess this file is updated with
each of these interactions.

The Test_Ontology.owl file is an XML rdf file that lists the namespaces
being used and then includes some additional owl, rdfs, and j items, plus
the fact that the Protege created the file.

Trying to open the Test_Ontology.pprj file starts creating a new instance
of Protege.

Opening the Test_Ontology.repository file with WordPad brings up four lines
that identify various files or URI's.

The interesting thing is that yesterday, I'd managed to get the project
"ontology-test" saved to the ontology-test directory and to download the opmo.owl
file and the protege-dc.owl file as well.  What's different and what do I need
to do to get that accomplished?  Also, I can't find the SWEET owl (or, maybe
RDF) files I thought I'd downloaded a couple of days ago.

Time for a break!  I've been at this for about an hour.
Post morning break

OK - giving my mind a chance to mull things over, it looks like I may need
to deal with two things:
1.  I probably needed to say yes to "Create project repository" - rather than
2.  Since one of the downloaded items seems to refer to OWL2, maybe I'll need
to download Protege version 4, instead of 3.4.4.  I wanted to avoid whatever
nasty complications lurk in OWL2 - but I suppose they're unavoidable.

For the time being, I'll avoid the second of these items.  Rather, I'll go back
to the project I'd just created and try downloading the files - but this time
I'll try to create the local repository - recognizing that as long as I'm 
working with the current ontology project, I might as well struggle along
with whatever it thinks I'm doing.

So - onward!

1.  Reopen Protege and select the Test_Ontology, knowing that it will embed
any files it creates over on the "Program Files" directory.  After the slightly
frustrating wait to get the files reloaded from the WWW, I've got the same

2.  Now, in the ONTOLOGY BROWSER, select the second line of the Ontologies
panel (where opm resides on the Web), and click on the "file" icon that will
"Download ontologies to folder ...".

3.  After downloading and responding "Yes", I get an "Information" popup that
tells me "You should save and reload your project for the imports redirection
to take effect."  Oh bother! -- but maybe I'll have to do that.

Click "OK".

Then save project and exit.

4.  Restarted Protege and selected the most recent test project (Test_Ontology).
[Had time to do a game of free cell.]

5.  Took a look at the Test_Ontology directory - no change.  Looked also at
the Program Files\Protege_3.4.4 directory and found the same, except for the
time the files were last updated.  The Repository Manager has a new local
folder that's apparently the same as what I had before - although this one is
now at the top of the list without the "Force Read-Only" checkbox checked.

6.  Let's try importing an ontology from the definitions given in the "Namespace
Prefixes" panel under the "Individual Panel" of the Metadata tab.  So, with that,
I can click on the icon to import an ontology and when the "Import Ontology"
popup appears, I type "" into the form.

After a bit, with a sliding blue bar keeping my attention rivited to the popup,
I'm told that I can "Press the finish button to import the following ontologies:
      Imported from
which I do.

When I do that, I get a new line in the ONTOLOGY BROWSER panel, where this third
line has
This entry also shows up as the bottom line in the Repository Manager as a URL

Hmmm! Maybe to get the full set of ontology OWL files, I'll need to do the 
"Import" icon, get them from the Web, and then read them using the "files"
icon.  Seems like a sensible enough hypothesis.  At least that way, I might
get more entries to download.

7.  Now - select the protege-dc.owl ontology in the ONTOLOGY BROWSER panel
and then click on the "file" icon.

When I clicked all the way through to the directory - I was told it couldn't
find it and there was a Java error.  But when I clicked on the full path
name of the directory, it gave me a popup with the title "Information" that
had the message "Downloaded
to "C:\...\Test_Ontology\protege-dc.owl".  And, low, it does indeed appear in
the directory with a file name "protege-dc.owl".

Now, when asked if I want to have a local repository, I reply "Yes" in the
appropriate popup.  Then, I get another "Information" popup that says "You
should save and reload your project for the imports redirection to take
effect."  OK - if that's what I have to do, I guess I can follow those
directions.  [Grump]

8.  After restarting and having another game of free cell, I recover the same
information - although now the order of the Ontology items in the ONTOLOGY
BROWSER is a bit different.  I get
while the Repository Manager has three local folders - all refering to the same
directory: "Test_Owl".  The first one at least now has the encouraging note
the the local folder (not marked "Force Read-Only") has a blue line

Looks like the Repository Manager at least knows about the file.  Guess I'll 
check the box marked "Force Read-Only".  Also, it does look like the file in
the directory is a proper owl text file.

9.  Let's see about importing the next namespace entry in the Namespace Prefixes
list.  Again, that's choosing the "Import ..." icon with the URK, followed by
choosing the "file" icon to "Download ..." and then restarting.  [I suspect
there's a shortcut with a recursive read - but that isn't really mentioned
in the documentation in a way that's easy to find - although the
file seems to suggest that there is probably a way to set this up.]

OK - let's try the j.0 entry.  So, after clicking on the "Import ..." icon,
type in
to the "Import Ontology" popup form entry, we click the "Next>" button,
watch the sliding blue line and finally have the
"Press the finish button to import the following ontologies:"
which I do.

This adds a line to the Ontologies panel of the ONTOLOGY BROWSER:
and also brings up a popup entitled "Added Prefixes" with the "Added namespace prefixes"
identified as 
   vs    from
So now I can click the "Close" button on the "Added Prefixes" popup.

[While I think I'm beginning to understand the procedure - this is about as
pleasant as learning a video game with a VERY steep learning curve.  The
authors of the instructions (which are fairly good) still haven't explained
their mental model of what I'm getting (where I had once assumed that "importing"
an ontology [or namespace] was equivalent to downloading the file in which it
is probably available on the WWW, whereas the authors of the software mean
that "importing" refers to getting the Web-based copy into their currently
running software - and having that copy disappear once the user exits from
Protege).  Interesting distinction if that's correct.]

OK - now, I'll click "Close".

Of course, my suspicion is now that the file has been imported into Protege,
but will still need to be downloaded into the repository directory.

10.  OK - let's see if this works.

Highlight the
line in the ONTOLOGY BROWSER.  Then click on the "file" icon.  Selcect
"Test_Ontology" in the popup "Choose download folder" and click "Download".
After a bit of "gray screen", I get the "Information" popup with the note
   "Downloaded to C:\...\Test_Ontology\0.1"
Then I can click "OK".

Now, when it asked do I want to create a local repository, I respond "No".

The Test_Ontology directory has indeed downloaded a file called "0.1" that
turns out to be the html page that explains what "foaf" is (meaning "friend
of a friend" - perhaps referring to a slightly "humorous" [and nerdy] identity
for some graph traversal specification).

In the Repository Manager interface, there is no new Local Folder (with two
copies of marked
as Force Read-Only), but there is a new URL entry for the 0.1 web page.
[wish this had been downloaded into 0.1.html or 0.1.xml instead of just

Note - the left two icons in the ONTOLOGY BROWSER are grayed out.  I guess
that to import another item in the Namespace Prefixes list, I'll need to 
save the project and reenter.  Just saving the project doesn't make these
icons available.

So - exit [another half-hour, really enjoyable learning experience that is
taking time from other work I feel I ought to be doing]

11.  After exiting and bringing up Protege again, the new order of items
in the ONTOLOGY BROWSER panel has four entries 
and the Repository Manager has three versions of the Local folder first,
followed by the Dublin Core DL Version and eight URL references and one
Forced HTTP retrieval.

The "Import" icons on the left are now ready to be clicked.  So
click on the "Import" icon and put in
Again, we get the "Import Ontology" popup notifying that
   Press the finish button to import the following ontologies:
          Imported from
So press Finish.

As the next step, I need to click the "Download" icon - but forgot to highlight
the appropriate Ontology line in the ONTOLOGY panel - and got a Java error.
When I did select the newest ontology import item, and then selected the
appropriate directory to download the file to, I did get the "Information"
popup that said I had downloaded the file to the directory.  When I checked,
it did indeed have a vile named "ns#"  Don't know if this is going to be

Also, it looked to me as though I could import a bunch of ontology files
before needing to download them.

Probably time for a break - another hour or so on this.

However, I push on - out of curiosity as to what sort of disaster I've given
to myself.

Restart.  Note that the new project has the imported ontology resting at
the last line - no particular sense to that.

Difficulty importing
as well as
and likewise with
imports OK, telling me that I've added another namespace "grddl"
(girddle? - a file from the mature woman's version of "Victoria's Secret"
that's way in the back of the store?)
Oh well.

OK - so I tried to download the file - and forgot to say which Ontology
I wanted.  After that was corrected, the Test_Ontology directory has a
file named owl - probably a web page.  Do I need to tell the download
interface I want the extension .owl to get the file I need?  If so, it's
one of those undocumented "features" of the software.

More information about the protege-owl mailing list