Skip to content
Snippets Groups Projects
Commit ece46d6f authored by Anders Nilsson's avatar Anders Nilsson
Browse files

Just synching

parent f4ed3bc6
No related branches found
No related tags found
No related merge requests found
...@@ -3,3 +3,4 @@ parser/semantic.cache ...@@ -3,3 +3,4 @@ parser/semantic.cache
AST AST
*.class *.class
semantic.cache semantic.cache
plugins
...@@ -17,7 +17,7 @@ aspect DumpClasses { ...@@ -17,7 +17,7 @@ aspect DumpClasses {
pStream.print(getId()); pStream.print(getId());
pStream.print(" : "+getSuperClass().getId()); pStream.print(" : "+getSuperClass().getId());
pStream.print(" ::= "); pStream.print(" ::= ");
Properties props = getFunctionalProperties(); Properties props = getProperties();
for (int i=0; i<props.getNumProperty(); i++) { for (int i=0; i<props.getNumProperty(); i++) {
pStream.print("<"); pStream.print("<");
pStream.print(props.getProperty(i).getId()); pStream.print(props.getProperty(i).getId());
......
...@@ -37,12 +37,12 @@ aspect Types { ...@@ -37,12 +37,12 @@ aspect Types {
return new OwlClassDecl(new List(), new List(), "_Unknown_"); return new OwlClassDecl(new List(), new List(), "_Unknown_");
} }
syn lazy Properties OwlClassDecl.getFunctionalProperties() { syn lazy Properties OwlClassDecl.getProperties() {
List l = new List(); List l = new List();
getTopElement().collectFunctionalProperties(l); getTopElement().collectObjectProperties(l);
Properties p = new Properties(); Properties p = new Properties();
for (int i=0; i<l.getNumChild(); i++) { for (int i=0; i<l.getNumChild(); i++) {
OwlFunctionalProperty op = (OwlFunctionalProperty) l.getChild(i); OwlObjectProperty op = (OwlObjectProperty) l.getChild(i);
if (op.domainIncludes(this)) { if (op.domainIncludes(this)) {
p.addProperty(op); p.addProperty(op);
} }
...@@ -52,13 +52,13 @@ aspect Types { ...@@ -52,13 +52,13 @@ aspect Types {
} }
aspect Properties { aspect Properties {
void ASTNode.collectFunctionalProperties(List l) { void ASTNode.collectObjectProperties(List l) {
for (int i=0; i<getNumChild(); i++) { for (int i=0; i<getNumChild(); i++) {
getChild(i).collectFunctionalProperties(l); getChild(i).collectObjectProperties(l);
} }
} }
void OwlFunctionalProperty.collectFunctionalProperties(List l) { void OwlObjectProperty.collectObjectProperties(List l) {
l.add(this); l.add(this);
} }
...@@ -66,7 +66,7 @@ aspect Properties { ...@@ -66,7 +66,7 @@ aspect Properties {
return false; return false;
} }
boolean OwlFunctionalProperty.domainIncludes(OClass clazz) { boolean OwlObjectProperty.domainIncludes(OClass clazz) {
for (int i=0; i<getNumElement(); i++) { for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof RdfsDomain) { if (getElement(i) instanceof RdfsDomain) {
return ((RdfsDomain) getElement(i)).domainIncludes(clazz); return ((RdfsDomain) getElement(i)).domainIncludes(clazz);
...@@ -107,7 +107,7 @@ aspect Properties { ...@@ -107,7 +107,7 @@ aspect Properties {
syn lazy RdfsRange Element.range() = null; syn lazy RdfsRange Element.range() = null;
eq OwlFunctionalProperty.range() { eq OwlObjectProperty.range() {
for (int i=0; i<getNumElement(); i++) { for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof RdfsRange) { if (getElement(i) instanceof RdfsRange) {
return (RdfsRange) getElement(i); return (RdfsRange) getElement(i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment