Commit 8375b52d authored by Anders Nilsson's avatar Anders Nilsson
Browse files

Working on making ONtologyCompiler fit for inclusion in skillserver

parent 3eeed532
......@@ -14,3 +14,4 @@ testontologies/*.xmi
testontologies/*.pprj
siaras/ontology.owl
siaras/javadoc
siaras/OntologyCompiler.jar
......@@ -6,11 +6,24 @@
*/
import AST.Start;
import AST.SiarasParser;
import AST.ParseException;
import java.io.*;
public class GenOntology extends Parser {
public static void main(String args[]) {
Start ast = parse(args);
Start ast = null;
try {
Reader r = new FileReader(args[0]);
SiarasParser parser = new SiarasParser(r);
ast = parser.Start();
} catch (ParseException e) {
System.out.println(e.getMessage());
}
catch (FileNotFoundException e) {
System.err.println("file " + args[0] + " not found");
}
String fileName = null;
try {
......
......@@ -49,7 +49,7 @@ aspect OntologyGeneration {
// }
public void ClassUse.genOntology(String ind, PrintStream pStream) {
pStream.print(ind+"< (CU) "+name());
pStream.print(ind+"<"+name());
for (int i=0; i<getNumAttribute(); i++) {
pStream.print(" ");
getAttribute(i).genOntology(pStream);
......
......@@ -21,6 +21,7 @@ aspect Qualification {
name().equals("hasSubskill") ||
name().equals("hasEditable") ||
name().equals("isPropertyOf") ||
name().equals("isSubskillOf") ||
name().equals("isSkillOf")) &&
getNumElement()==1 &&
getElement(0) instanceof ClassUse)
......
......@@ -98,9 +98,9 @@
</target>
<target name="jar" depends="build">
<jar destfile="PrettyPrint.jar" basedir="." includes="**/*.class" excludes="test/**">
<jar destfile="OntologyCompiler.jar" basedir="." includes="**/*.class" excludes="test/**">
<manifest>
<attribute name="Main-Class" value="JavaPrettyPrinter"/>
<attribute name="Main-Class" value="GenOntology"/>
</manifest>
</jar>
</target>
......
This diff is collapsed.
Supports Markdown
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