From 50e4a10a0db220d38a71d1a83d319845296449d2 Mon Sep 17 00:00:00 2001
From: Anders Nilsson <anders.nilsson@cs.lth.se>
Date: Wed, 25 Jun 2008 18:10:19 +0200
Subject: [PATCH] Searching for bugs

---
 Types.jrag | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Types.jrag b/Types.jrag
index e8c6181..0ea8810 100644
--- a/Types.jrag
+++ b/Types.jrag
@@ -42,10 +42,15 @@ aspect Types {
 		if (id.endsWith("Thing")) {
 			return new OwlClassDecl(new List(), new List(), "Thing");
 		}
-		// No decl found, so let's return null. Not sure if that's
-		// that the right thing to do though.
+		// No decl found, so let's alert user. If the reason for a
+		// missing decl is that it is a top level class which Protege
+		// for some unknown reason no longer explicitly declares on
+		// top level, the right thing to do would be to create a class
+		// declaration here. And that we do.
         System.out.println("* Couldn't find decl for: "+getId());
-		return new OwlClassDecl(new List(), new List(), "_Unknown_");
+		OwlClassDecl nClass = new OwlClassDecl(new List(), new List(), id);
+		top.addElement(nClass);
+		return nClass;
     }
 
     syn lazy Properties OwlClassDecl.getProperties() {
-- 
GitLab