diff --git a/Types.jrag b/Types.jrag index e8c6181b0aea750306956cacbb743f3b9ff309df..0ea881092ce9d7c4eb4f1bfb06ce44750980bbe3 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() {