/**
   * Transforms the object-oriented model into the OWL ontology. Serialization of this ontology is
   * stored in a temporary file.
   */
  public void transformModel() {
    JenaBeanExtension jbe;
    OutputStream out;

    try {
      List<Object> dataList = loadData();
      jbe = creatingJenaBean(dataList);
      lock.writeLock().lock();
      out = new FileOutputStream(ontologyFile);
      jbe.writeOntologyDocument(out, Syntax.RDF_XML);
      out.close();
    } catch (FileNotFoundException e) {
      log.error("Could not find the temporary rdf/xml file to store the ontology!", e);
    } catch (IOException e) {
      log.error("Could not close the temporary rdf/xml file!", e);
    } catch (Exception e) {
      log.error("Could not create the ontology!", e);
    } finally {
      lock.writeLock().unlock();
    }
  }