use of org.semanticweb.binaryowl.owlapi.BinaryOWLOntologyDocumentFormat in project webprotege by protegeproject.
the class WebProtegeOntologyManagerSaveBinaryDocumentTestCase method shouldSaveOntologyToBinaryDocumentFile.
/**
* Ensures that an ontology can be saved in the binary ontology format. This doesn't test the format serialization,
* it tests that the {@link WebProtegeOWLManager} is configured
* with the ability to save an ontology in that format.
*/
@Test
public void shouldSaveOntologyToBinaryDocumentFile() throws OWLOntologyCreationException, OWLOntologyStorageException {
OWLOntologyManager manager = WebProtegeOWLManager.createOWLOntologyManager();
OWLOntology ontology = manager.createOntology();
BinaryOWLOntologyDocumentFormat format = new BinaryOWLOntologyDocumentFormat();
manager.saveOntology(ontology, format, IRI.create(ontologyDocumentFile));
}
use of org.semanticweb.binaryowl.owlapi.BinaryOWLOntologyDocumentFormat in project webprotege by protegeproject.
the class ProjectDocumentStore method writeNewProject.
private void writeNewProject(OWLOntologyManager rootOntologyManager, OWLOntology ontology) throws OWLOntologyStorageException {
rootOntologyDocument.getParentFile().mkdirs();
rootOntologyManager.saveOntology(ontology, new BinaryOWLOntologyDocumentFormat(), IRI.create(rootOntologyDocument));
ImportsCacheManager cacheManager = importsCacheManagerProvider.get();
cacheManager.cacheImports(ontology);
}
use of org.semanticweb.binaryowl.owlapi.BinaryOWLOntologyDocumentFormat in project webprotege by protegeproject.
the class ProjectImporter method writeNewProject.
private void writeNewProject(OWLOntologyManager rootOntologyManager, OWLOntology ontology) throws OWLOntologyStorageException {
rootOntologyDocument.getParentFile().mkdirs();
rootOntologyManager.saveOntology(ontology, new BinaryOWLOntologyDocumentFormat(), IRI.create(rootOntologyDocument));
ImportsCacheManager importsCacheManager = new ImportsCacheManager(projectId, new ImportsCacheDirectoryProvider(new ProjectDirectoryProvider(new ProjectDirectoryFactory(dataDirectory), projectId)));
importsCacheManager.cacheImports(ontology);
}
Aggregations