Examples of ZipArchiveProjectSourcesExtractor


Examples of edu.stanford.bmir.protege.web.server.owlapi.ZipArchiveProjectSourcesExtractor

    public void shouldExtractZipFile() throws IOException {
        String document = "/ontologies/root-ontology.owl";
        File expectedDocumentFile =  new File(outputFolder, document);
        when(rootOntologyDocumentFileMatcher.isRootOntologyDocument(expectedDocumentFile)).thenReturn(true);
        File zipFile = createZipFile(document);
        ZipArchiveProjectSourcesExtractor extractor = new ZipArchiveProjectSourcesExtractor(tempFileFactory, rootOntologyDocumentFileMatcher);
        RawProjectSources projectSources = extractor.extractProjectSources(zipFile);
        Collection<OWLOntologyDocumentSource> documentSources = projectSources.getDocumentSources();
        assertThat(documentSources, hasSize(1));
        assertThat(documentSources, hasItem(isFileDocumentSourceForFile(expectedDocumentFile)));
    }
View Full Code Here

Examples of edu.stanford.bmir.protege.web.server.owlapi.ZipArchiveProjectSourcesExtractor

    @Test(expected = FileNotFoundException.class)
    public void shouldThrowFileNotFoundExceptionForMissingRootOntology() throws IOException {
        String document = "/ontologies/ont.owl";
        File zipFile = createZipFile(document);
        ZipArchiveProjectSourcesExtractor extractor = new ZipArchiveProjectSourcesExtractor(tempFileFactory, rootOntologyDocumentFileMatcher);
        extractor.extractProjectSources(zipFile);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.