Loading DumpClasses.jrag +4 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,9 @@ aspect DumpClasses { void OwlClassDecl.dumpClasses(PrintStream pStream) { pStream.print(getId()); pStream.println(" : "+getSuperClass().getId()); pStream.print(" : "+getSuperClass().getId()); pStream.print(" ::= "); pStream.println(";"); } } No newline at end of file Types.jrag +34 −0 Original line number Diff line number Diff line Loading @@ -36,4 +36,38 @@ aspect Types { // that the right thing to do though. return null; } syn lazy Properties OwlClassDecl.getFunctionalProperties() { List l = new List(); getTopElement().collectFunctionalProperties(l); Properties p = new Properties(); for (int i=0; i<l.getNumChild(); i++) { OwlFunctionalProperty op = (OwlFunctionalProperty) l.getChild(i); if (op.domainIncludes(this)) { p.addElement(op); } } return p; } } aspect Properties { void ASTNode.collectFunctionalProperties(List l) { for (int i=0; i<getNumChild(); i++) { getChild(i).collectFunctionalProperties(l); } } void OwlFunctionalProperty.collectFunctionalProperties(List l) { l.add(this); } boolean OwlFunctionalProperty.domainIncludes(Class clazz) { for (int i=0; i<getNumElement(); i++) { if (getElement(i) instanceof RdfsDomain) { // ((RdfsDomain) getElement(i)). } } return false; } } No newline at end of file owl.ast +2 −0 Original line number Diff line number Diff line Loading @@ -55,3 +55,5 @@ Value ::= <STRING_LITERAL>; abstract Class : ComplexElement; OwlClassDecl : Class ::= <Id:String> ; OwlClassUse : Class ::= <Id:String> ; Properties ::= Element*; No newline at end of file Loading
DumpClasses.jrag +4 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,9 @@ aspect DumpClasses { void OwlClassDecl.dumpClasses(PrintStream pStream) { pStream.print(getId()); pStream.println(" : "+getSuperClass().getId()); pStream.print(" : "+getSuperClass().getId()); pStream.print(" ::= "); pStream.println(";"); } } No newline at end of file
Types.jrag +34 −0 Original line number Diff line number Diff line Loading @@ -36,4 +36,38 @@ aspect Types { // that the right thing to do though. return null; } syn lazy Properties OwlClassDecl.getFunctionalProperties() { List l = new List(); getTopElement().collectFunctionalProperties(l); Properties p = new Properties(); for (int i=0; i<l.getNumChild(); i++) { OwlFunctionalProperty op = (OwlFunctionalProperty) l.getChild(i); if (op.domainIncludes(this)) { p.addElement(op); } } return p; } } aspect Properties { void ASTNode.collectFunctionalProperties(List l) { for (int i=0; i<getNumChild(); i++) { getChild(i).collectFunctionalProperties(l); } } void OwlFunctionalProperty.collectFunctionalProperties(List l) { l.add(this); } boolean OwlFunctionalProperty.domainIncludes(Class clazz) { for (int i=0; i<getNumElement(); i++) { if (getElement(i) instanceof RdfsDomain) { // ((RdfsDomain) getElement(i)). } } return false; } } No newline at end of file
owl.ast +2 −0 Original line number Diff line number Diff line Loading @@ -55,3 +55,5 @@ Value ::= <STRING_LITERAL>; abstract Class : ComplexElement; OwlClassDecl : Class ::= <Id:String> ; OwlClassUse : Class ::= <Id:String> ; Properties ::= Element*; No newline at end of file