Package edu.stanford.bmir.protege.web.server.util

Examples of edu.stanford.bmir.protege.web.server.util.ZipFileExtractor


    }


    private RawProjectSources extractZipFile(File zipFile) throws IOException {
        File tempDirectory = tempFileFactory.createTempDirectory();
        ZipFileExtractor extractor = new ZipFileExtractor();
        extractor.extractFileToDirectory(zipFile, tempDirectory);
        Optional<File> rootOntologyDocument = getRootOntologyDocumentFile(tempDirectory);
        if(!rootOntologyDocument.isPresent()) {
            throw new FileNotFoundException(rootOntologyDocumentFileMatcher.getErrorMessage());
        }
        return new ExtractedZipArchiveProjectSources(rootOntologyDocument.get(), tempDirectory);
View Full Code Here


        zipOutputStream.write(bytes);
        ZipEntry entryC = new ZipEntry("/EmptyDirectory/");
        zipOutputStream.putNextEntry(entryC);
        zipOutputStream.close();

        ZipFileExtractor extractor = new ZipFileExtractor();
        File outputDirectory = folder.newFolder("out");
        extractor.extractFileToDirectory(zipFile, outputDirectory);
        File extractedFileA = new File(outputDirectory, "FileA");
        assertTrue(extractedFileA.exists());
        assertEquals(extractedFileA.length(), 100);
        File extractedFileB = new File(outputDirectory, "/Directory/FileB");
        assertTrue(extractedFileB.exists());
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.server.util.ZipFileExtractor

Copyright © 2018 www.massapicom. 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.