Skip to content
Snippets Groups Projects
Select Git revision
  • b4dd8845763e87aa87d263e0bb4cd6ffb06c2577
  • master default protected
  • tanklabsim
  • julia1
4 results

REQUIRE

Blame
  • DumpClasses.jrag 1.04 KiB
    /* -*-Java-*- */
    
    /* 
     * Copyright (C) 2006  Anders Nilsson <anders.nilsson@cs.lth.se>
     *
     * This file is part of OntologyCompiler.
     */
    
    import java.io.PrintStream;
    
    aspect DumpClasses {
        void ASTNode.dumpClasses(PrintStream pStream) {	
    	for (int i=0; i<getNumChild(); i++) {
    	    getChild(i).dumpClasses(pStream);
    	}
        }
    
        public void Start.dumpClasses(PrintStream pStream) {
    	super.dumpClasses(pStream);
        }
    
        void OwlClassDecl.dumpClasses(PrintStream pStream) {
    	pStream.print(getId());
    	pStream.print(" : "+getSuperClass().getId());	
    	pStream.print(" ::=");
    	Restrictions restrs = getRestrictions();
    	for (int i=0; i<restrs.getNumOwlRestriction(); i++) {
    	  pStream.print(" "+"restr");
    	}
    	
    // 	Properties props = getProperties();
    // 	for (int i=0; i<props.getNumProperty(); i++) {
    // 	    pStream.print("<");
    // 	    pStream.print(" "+props.getProperty(i).getId());
    // 	    pStream.print(":");
    // 	    pStream.print(props.getProperty(i).range().type());
    // 	    pStream.print(">");
    // 	    pStream.print(" ");
    // 	}
    	pStream.println(";");
        }
    }