package de.tudresden.inf.lat.born.tool.cycleremover;

import java.util.Objects;

/**
 * This is an executable class to remove cycles from an ontology.
 * 
 * @author Julian Mendez
 *
 */
public class CycleRemover {

	public static final String HELP = "Parameters: \n" + //
			"  <ontology file> <output file>: removes the cycles in a given ontology \n";

	public CycleRemover() {
	}

	public static void main(String[] args) {
		Objects.requireNonNull(args);
		if (args.length == 2) {

		} else {
			System.out.println(HELP);

		}
	}

}

@@ -63,321 +63,1568 @@
 ava.
-util.Objects;%0A%0A/**%0A * This is an executable class to remove cycles from an ontology.%0A * %0A * @author Julian Mendez%0A *%0A */%0Apublic class CycleRemover %7B%0A%0A%09public static final String HELP = %22Parameters: %5Cn%22 + //%0A%09%09%09%22  %3Contology file%3E %3Coutput file%3E: removes the cycles in a given ontology %5Cn%22;%0A%0A%09public CycleRemover() %7B
+io.FileInputStream;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.util.Objects;%0A%0Aimport org.semanticweb.owlapi.functional.renderer.OWLFunctionalSyntaxRenderer;%0Aimport org.semanticweb.owlapi.io.OWLRenderer;%0Aimport org.semanticweb.owlapi.model.OWLException;%0Aimport org.semanticweb.owlapi.model.OWLOntology;%0A%0Aimport de.tudresden.inf.lat.born.owlapi.processor.ProcessorConfigurationImpl;%0A%0A/**%0A * This is an executable class to remove cycles from an ontology.%0A * %0A * @author Julian Mendez%0A *%0A */%0Apublic class CycleRemover %7B%0A%0A%09public static final String HELP = %22Parameters: %5Cn%22 + //%0A%09%09%09%22  %3Contology file%3E %3Coutput file%3E: removes the cycles in a given ontology %5Cn%22;%0A%0A%09public CycleRemover() %7B%0A%09%7D%0A%0A%09OWLOntology removeCycles(OWLOntology ontology) %7B%0A%09%09Objects.requireNonNull(ontology);%0A%09%09// TODO%0A%09%09return ontology;%0A%09%7D%0A%0A%09void removeCycle(String ontologyFileName, String outputFileName) throws IOException, OWLException %7B%0A%09%09Objects.requireNonNull(ontologyFileName);%0A%09%09Objects.requireNonNull(outputFileName);%0A%09%09OWLOntology owlOntology = ProcessorConfigurationImpl.readOntology(new FileInputStream(ontologyFileName));%0A%09%09storeOntology(removeCycles(owlOntology), outputFileName);%0A%09%7D%0A%0A%09void storeOntology(OWLOntology owlOntology, String fileName) throws OWLException, IOException %7B%0A%09%09Objects.requireNonNull(owlOntology);%0A%09%09Objects.requireNonNull(fileName);%0A%09%09OWLRenderer renderer = new OWLFunctionalSyntaxRenderer();%0A%09%09FileOutputStream output = new FileOutputStream(fileName);%0A%09%09renderer.render(owlOntology, output);%0A%09%09output.flush();%0A%09%09output.close();
 %0A%09%7D%0A
@@ -1663,16 +1663,49 @@
 %5B%5D args)
+ throws IOException, OWLException
  %7B%0A%09%09Obj
@@ -1756,16 +1756,196 @@
  == 2) %7B
+%0A%09%09%09String ontologyFileName = args%5B0%5D;%0A%09%09%09String outputFileName = args%5B1%5D;%0A%09%09%09CycleRemover instance = new CycleRemover();%0A%09%09%09instance.removeCycle(ontologyFileName, outputFileName);
 %0A%0A%09%09%7D el
@@ -1983,14 +1983,15 @@
 );%0A%0A%09%09%7D%0A
+%0A
 %09%7D%0A%0A%7D%0A

Extend class