Commit de4a7529 authored by Anders Nilsson's avatar Anders Nilsson
Browse files

Update

parent 07e3cdab
...@@ -95,7 +95,7 @@ aspect AbsGrammarGeneration { ...@@ -95,7 +95,7 @@ aspect AbsGrammarGeneration {
pStream.print(name()); pStream.print(name());
pStream.print(" : "+getSuperClass().name()); pStream.print(" : "+getSuperClass().name());
pStream.print(" ::="); pStream.print(" ::=");
getProperties().genAbsGrammar(pStream); // getProperties().genAbsGrammar(pStream);
pStream.println(";"); pStream.println(";");
} }
......
...@@ -25,7 +25,7 @@ aspect Names { ...@@ -25,7 +25,7 @@ aspect Names {
eq OwlProperty.name() = getId(); eq OwlProperty.name() = getId();
eq OwlRestriction.name() = getRestrictionClassId(); eq OwlRestriction.name() = getRestrictionClassId();
eq Declaration.name() = getElement(0).name(); eq Declaration.name() = getElement(0).name();
eq Clazz.name() = iri().name(); eq Clazz.name() = iri().trim();
eq NamedIndividual.name() = iri().trim(); eq NamedIndividual.name() = iri().trim();
......
...@@ -60,6 +60,7 @@ aspect MiscUtilities { ...@@ -60,6 +60,7 @@ aspect MiscUtilities {
} }
} }
return false; return false;
} }
boolean ComplexElement.hasRdfAbout() { boolean ComplexElement.hasRdfAbout() {
......
...@@ -22,6 +22,27 @@ ...@@ -22,6 +22,27 @@
import java.util.ArrayList; import java.util.ArrayList;
aspect Types { aspect Types {
syn lazy Declaration Declaration.getSuperClass() = null;
eq ClassDeclaration.getSuperClass() {
return goStart().getSuperClass(name());
}
syn Declaration ASTNode.getSuperClass(String name) = null;
eq Start.getSuperClass(String name) =
getSpecification().getSuperClass(name);
eq Specification.getSuperClass(String name) =
getOntoDeclaration().getSuperClass(name);
eq ComplexElement.getSuperClass(String name) {
for (Element e : getElementList()) {
Declaration d = e.getSuperClass(name);
if (d != null) {
return d;
}
}
return null;
}
syn lazy OClass OClass.getSuperClass(); syn lazy OClass OClass.getSuperClass();
eq OwlClassDecl.getSuperClass() { eq OwlClassDecl.getSuperClass() {
for (int i=0; i<getNumElement(); i++) { for (int i=0; i<getNumElement(); i++) {
......
/* -*-Java-*- */
/*
* Copyright (C) 2011 Anders Nilsson <anders.nilsson@control.lth.se>
*
* This file is part of OntologyCompiler.
*
* OntologyCompiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OntologyCompiler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with OntologyCompiler. If not, see <http://www.gnu.org/licenses/>.
*/
aspect Fixes {
int ASTNode.numChildren;
int ASTNode.numChildren() {return jjtGetNumChildren();}
int List.getNumNoTransformChild() {return getNumChildNoTransform();}
int Opt.getNumChildNoTransfrom() {return getNumChildNoTransform();}
}
\ No newline at end of file
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment