Gitlab service upgraded. Please report any problems to dl_gitadmin@cs.lth.se

Commit ece46d6f authored by Anders Nilsson's avatar Anders Nilsson

Just synching

parent f4ed3bc6
......@@ -3,3 +3,4 @@ parser/semantic.cache
AST
*.class
semantic.cache
plugins
......@@ -17,7 +17,7 @@ aspect DumpClasses {
pStream.print(getId());
pStream.print(" : "+getSuperClass().getId());
pStream.print(" ::= ");
Properties props = getFunctionalProperties();
Properties props = getProperties();
for (int i=0; i<props.getNumProperty(); i++) {
pStream.print("<");
pStream.print(props.getProperty(i).getId());
......@@ -28,4 +28,4 @@ aspect DumpClasses {
}
pStream.println(";");
}
}
\ No newline at end of file
}
......@@ -37,12 +37,12 @@ aspect Types {
return new OwlClassDecl(new List(), new List(), "_Unknown_");
}
syn lazy Properties OwlClassDecl.getFunctionalProperties() {
syn lazy Properties OwlClassDecl.getProperties() {
List l = new List();
getTopElement().collectFunctionalProperties(l);
getTopElement().collectObjectProperties(l);
Properties p = new Properties();
for (int i=0; i<l.getNumChild(); i++) {
OwlFunctionalProperty op = (OwlFunctionalProperty) l.getChild(i);
OwlObjectProperty op = (OwlObjectProperty) l.getChild(i);
if (op.domainIncludes(this)) {
p.addProperty(op);
}
......@@ -52,13 +52,13 @@ aspect Types {
}
aspect Properties {
void ASTNode.collectFunctionalProperties(List l) {
void ASTNode.collectObjectProperties(List l) {
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);
}
......@@ -66,7 +66,7 @@ aspect Properties {
return false;
}
boolean OwlFunctionalProperty.domainIncludes(OClass clazz) {
boolean OwlObjectProperty.domainIncludes(OClass clazz) {
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof RdfsDomain) {
return ((RdfsDomain) getElement(i)).domainIncludes(clazz);
......@@ -107,7 +107,7 @@ aspect Properties {
syn lazy RdfsRange Element.range() = null;
eq OwlFunctionalProperty.range() {
eq OwlObjectProperty.range() {
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof RdfsRange) {
return (RdfsRange) getElement(i);
......@@ -115,4 +115,4 @@ aspect Properties {
}
return null;
}
}
\ No newline at end of file
}
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