Loading DumpClasses.jrag +5 −5 Original line number Diff line number Diff line Loading @@ -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(";"); } Loading Types.jrag +14 −12 Original line number Diff line number Diff line Loading @@ -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); } Loading owl.ast +5 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -69,3 +69,5 @@ OwlClassDecl : OClass ::= <Id:String> ; OwlClassUse : OClass ::= <Id:String> ; Properties ::= Property:Element*; OwlProperty : ComplexElement; Loading
DumpClasses.jrag +5 −5 Original line number Diff line number Diff line Loading @@ -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(";"); } Loading
Types.jrag +14 −12 Original line number Diff line number Diff line Loading @@ -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); } Loading
owl.ast +5 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -69,3 +69,5 @@ OwlClassDecl : OClass ::= <Id:String> ; OwlClassUse : OClass ::= <Id:String> ; Properties ::= Property:Element*; OwlProperty : ComplexElement;