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

Commit 2337a8e9 authored by Anders Nilsson's avatar Anders Nilsson

Synching

parent ece46d6f
......@@ -19,12 +19,12 @@ aspect DumpClasses {
pStream.print(" ::= ");
Properties props = getProperties();
for (int i=0; i<props.getNumProperty(); i++) {
pStream.print("<");
// pStream.print("<");
pStream.print(props.getProperty(i).getId());
pStream.print(":");
pStream.print(props.getProperty(i).range().type());
pStream.print(">");
pStream.print(" ");
// pStream.print(":");
// pStream.print(props.getProperty(i).range().type());
// pStream.print(">");
// pStream.print(" ");
}
pStream.println(";");
}
......
......@@ -39,26 +39,28 @@ aspect Types {
syn lazy Properties OwlClassDecl.getProperties() {
List l = new List();
getTopElement().collectObjectProperties(l);
Properties p = new Properties();
for (int i=0; i<l.getNumChild(); i++) {
OwlObjectProperty op = (OwlObjectProperty) l.getChild(i);
if (op.domainIncludes(this)) {
p.addProperty(op);
}
}
return p;
// getTopElement().collectProperties(l);
collectProperties(l);
return new Properties(l);
// Properties p = new Properties();
// for (int i=0; i<l.getNumChild(); i++) {
// OwlProperty op = (OwlProperty) l.getChild(i);
// if (op.domainIncludes(this)) {
// p.addProperty(op);
// }
// }
// return p;
}
}
aspect Properties {
void ASTNode.collectObjectProperties(List l) {
void ASTNode.collectProperties(List l) {
for (int i=0; i<getNumChild(); i++) {
getChild(i).collectObjectProperties(l);
getChild(i).collectProperties(l);
}
}
void OwlObjectProperty.collectObjectProperties(List l) {
void OwlProperty.collectProperties(List l) {
l.add(this);
}
......
......@@ -25,14 +25,14 @@ OwlDataRange : ComplexElement;
OwlDatatypeProperty : ComplexElement;
OwlDisjointWith : ComplexElement;
OwlEquivalentClass : ComplexElement;
OwlFunctionalProperty : ComplexElement;
OwlFunctionalProperty : OwlProperty;
OwlImports : ComplexElement;
OwlIntersectionOf : ComplexElement;
OwlInverseOf : ComplexElement;
OwlMinCardinality : ComplexElement;
OwlObjectProperty : ComplexElement;
OwlObjectProperty : OwlProperty;
OwlOneOf : ComplexElement;
OwlOnProperty : ComplexElement;
OwlOnProperty : OwlProperty;
OwlSomeValuesFrom : ComplexElement;
OwlRestriction : ComplexElement;
OwlUnionOf : ComplexElement;
......@@ -69,3 +69,5 @@ OwlClassDecl : OClass ::= <Id:String> ;
OwlClassUse : OClass ::= <Id:String> ;
Properties ::= Property:Element*;
OwlProperty : ComplexElement;
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