Protege class missing

Post Reply
Sean613
Posts: 2
Joined: 06 Nov 2009, 17:50

Hi,

After attempting to generate an XML export of a class using the XML Tab in Protege, the class is now missing from the Class Browser area. We queried the database and were able to see the instances of that class, even though they are not visible anywhere in Protege. I took the following steps to perform the export.

1. Opened XML Tab
2. Dragged a class from the Class Browser area into the 'instances' field.
3. Clicked the '<< export' button.

At that point the class was no longer visible. As for the XML export, we have only been able to find an empty file in my local /Protege/Protege_3.4 directory named the same as the class name, generated at the time of my export.

Any idea how to make this visible in Protege again, or other clues?

Many Thanks,
Sean
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi Sean,

I've just had a go at replicating what you describe. The "instances" field is actually a field to specify the output XML file for the selected Class, although I found that dragging a class over there put the name of the class in that field. However, my class stayed put in the class browser.

The class browser allows you to refactor the class hierarchy by dragging the classes around - although I would advise caution with this. It's possible that you've accidentally dragged the class into another location in the hierarchy. If you do do this, it's worth doing a quick "undo" to put things back. It may be too late for that now, in which case, search for your class by name in any of the Class browsers, e.g. on the Instances tab or in the XMLTab and you should be able to find it. I'm sure Protege will not allow you to remove a class that has instances, so it's very unlikely that the class has been deleted unless there's a bug with the XMLTab.
When you find your class, you can put it back in the correct place in the hierarchy.

I haven't really had much use of the XMLTab - I couldn't get it to do what I needed in earlier versions (3.1 / 3.3.1) of Protege. If you are trying to create an XML export of the contents of your Essential Repository (the instances), this is exactly what the Essential Architecture Reporting tab does and sends it to the Essential Viewer reporting environment - and I would strongly advise using that in preference to the XMLTab, even if you only want a sub-set of the repository.

You can pick up the exported XML file from the 'essential_viewer' root directory in your Tomcat environment (filename: reportXML.xml) and process the XML as required. Or - what we normally do - create an XSL extract report that pulls out the required instances from the complete repository snapshot, e.g. to get into Excel or whatever.

Note, that the Essential Architecture Reporting tab ONLY takes the instances not the classes. However, the format used is the same as that of the 'Experimental XML file' project format of Protege. This XML format DOES include both Classes and Instances in the XML file. If you need the classes as well, convert your project to the XML format and then explore the resulting XML file.

Hope all this helps - let me know how you get on

Jonathan
Essential Project Team
Sean613
Posts: 2
Joined: 06 Nov 2009, 17:50

Thanks Jonathan for your responses here and on the Protege mailing list. It's interesting that you don't observe the same behavior when dragging a class into the instances field. I have repeated this multiple times by creating test classes, and each time the classes have dissapeared as soon as I drop them into the XML tab as described. I've gone through the other classes we have to make sure it wasn't lost somewhere else in the hierarchy to no avail. Unfortunately this was all done on a dev server so a restore isn't possible.

In the process of trying to get familiar with Protege, I did actually export the project to an OWL file before the class was lost. Is there a way I can try to reload the data using this file?

Thanks again.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi Sean,

That is strange that I can't get the XMLTab to behave in the same way - I kept wondering if I was missing something.

One thing worth checking is the version of Protege that you're using. It's worth moving to Protege 3.4.1 if you can as this has a few bug fixes. However, I've just tested with Protege 3.4 and still cannot get the classes to disappear when I drag them over to the 'instances' field of the XMLTab.

In terms of restoring your project from the OWL "backup", that should be fine. I think the best way to do this is to open the OWL file in Protege and then use File->Convert Project to Format and then select "Protege files (.pont and .pins)". This should bring everything back to Protege Frames and then you can save that resulting project and move forward from there.

Am I right in assuming that the project is an Essential Architecture Manager project? If so, and there are any issues with the restore from the backup such as you have now lost instances that you created after exporting to OWL, then we can use some of the integration capabilities of EAM to get those back. We can cover that if and when it's required.

Hope this helps and that you can get your classes back.
Also, if you think of any other particular things about your configuration that might be related to the error you're experiencing (e.g. using a database backend, running multi-user mode) let me know. For expediency I have to say that I haven't tried all these options with the XMLTab.

Jonathan
Essential Project Team
Post Reply