Examples of extractProjectSources()


Examples of edu.stanford.bmir.protege.web.server.owlapi.SingleDocumentProjectSourcesExtractor.extractProjectSources()

    @Test
    public void shouldExtractProvidedDocument() {
        // Given
        SingleDocumentProjectSourcesExtractor extractor = new SingleDocumentProjectSourcesExtractor();
        // When
        RawProjectSources projectSources = extractor.extractProjectSources(input);
        // Then
        Collection<OWLOntologyDocumentSource> documentSources = projectSources.getDocumentSources();
        assertThat(documentSources, hasSize(1));
    }
View Full Code Here

Examples of edu.stanford.bmir.protege.web.server.owlapi.UploadedProjectSourcesExtractor.extractProjectSources()

                zipInputStreamChecker,
                zipArchiveProjectSourcesExtractor,
                singleDocumentProjectSourcesExtractor
        );
        // When
        extractor.extractProjectSources(inputFile);
        // Then
        verify(zipArchiveProjectSourcesExtractor, times(1)).extractProjectSources(inputFile);
    }

    @Test
View Full Code Here

Examples of edu.stanford.bmir.protege.web.server.owlapi.UploadedProjectSourcesExtractor.extractProjectSources()

                zipInputStreamChecker,
                zipArchiveProjectSourcesExtractor,
                singleDocumentProjectSourcesExtractor
        );
        // When
        extractor.extractProjectSources(inputFile);
        // Then
        verify(singleDocumentProjectSourcesExtractor, times(1)).extractProjectSources(inputFile);
    }

View Full Code Here

Examples of edu.stanford.bmir.protege.web.server.owlapi.ZipArchiveProjectSourcesExtractor.extractProjectSources()

        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.extractProjectSources()

    @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);
    }


    public File createZipFile(String document) throws IOException {
        File zipFile = temporaryFolder.newFile();
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.