*/
public static POntology createOntology(URI path, File dir) throws IOntologyException {
try{
// new way to create ontology to fix xml:base issue
Collection errors = new ArrayList();
NewOwlProjectCreator creator = new NewOwlProjectCreator();
creator.setOntologyName(""+path);
creator.create(errors);
if(!errors.isEmpty())
throw new IOntologyError(""+errors);
OWLModel model = creator.getOwlModel();
//OWLModel model = ProtegeOWL.createJenaOWLModel();
// setup default namespace
model.getNamespaceManager().setDefaultNamespace(path+"#");
OWLUtil.renameOntology(model,model.getDefaultOWLOntology(),""+path);