Package uk.gov.nationalarchives.droid.core.interfaces

Examples of uk.gov.nationalarchives.droid.core.interfaces.RequestIdentifier


        File file = new File(ole2File);
        if (!file.exists()) {
            fail("OLE2 test file not found");
        }
        URI uri = file.toURI();
        RequestIdentifier identifier = new RequestIdentifier(uri);
        identifier.setParentId(1L);
        try {
            fileName = file.getCanonicalPath();
            RequestMetaData metaData =
                new RequestMetaData(file.length(), file.lastModified(), fileName);
            FileSystemIdentificationRequest request =
View Full Code Here


        File file = new File(zipFile);
        if (!file.exists()) {
            fail("ZIP test file not found");
        }
        URI uri = file.toURI();
        RequestIdentifier identifier = new RequestIdentifier(uri);
        identifier.setParentId(1L);
        try {
            fileName = file.getCanonicalPath();
            RequestMetaData metaData =
                new RequestMetaData(file.length(), file.lastModified(), fileName);
            FileSystemIdentificationRequest request =
View Full Code Here

                TarArchiveEntry entry = null;
                while ((entry = (TarArchiveEntry) in.getNextTarEntry()) != null) {
                    String name = entry.getName();
                    if (!entry.isDirectory()) {
                        final RequestMetaData metaData = new RequestMetaData(1L, 2L, name);
                        final RequestIdentifier identifier = new RequestIdentifier(uri);
                        final TarEntryIdentificationRequest tarRequest =
                            new TarEntryIdentificationRequest(metaData, identifier, tmpDir);
                        tarRequest.open(in);
                        final IdentificationResultCollection tarResults =
                                binarySignatureIdentifier.matchBinarySignatures(tarRequest);
View Full Code Here

       
        final String newPath = "gzip:" + slash1 + path + request.getFileName() + "!" + slash;
        slash1 = "";
        final URI newUri = URI.create(GzipUtils.getUncompressedFilename(uri.toString()));
       
        final RequestIdentifier identifier = new RequestIdentifier(newUri);
        final RequestMetaData metaData = new RequestMetaData(SIZE, TIME, uri.getPath());
        final GZipIdentificationRequest gzRequest = new GZipIdentificationRequest(
                metaData, identifier, tmpDir);

        GzipCompressorInputStream gzin = null;
View Full Code Here

                ZipArchiveEntry entry = null;
                while ((entry = (ZipArchiveEntry) in.getNextZipEntry()) != null) {
                    final String name = entry.getName();
                    if (!entry.isDirectory()) {
                        final RequestMetaData metaData = new RequestMetaData(1L, 2L, name);
                        final RequestIdentifier identifier = new RequestIdentifier(uri);
                        final ZipEntryIdentificationRequest zipRequest =
                            new ZipEntryIdentificationRequest(metaData, identifier, tmpDir);
                       
                        zipRequest.open(in);
                        final IdentificationResultCollection zipResults =
View Full Code Here

                throw new CommandExecutionException(e);
            }
            URI uri = file.toURI();
            RequestMetaData metaData =
                new RequestMetaData(file.length(), file.lastModified(), fileName);
            RequestIdentifier identifier = new RequestIdentifier(uri);
            identifier.setParentId(1L);
           
            InputStream in = null;
            IdentificationRequest request = new FileSystemIdentificationRequest(metaData, identifier);
            try {
                in = new FileInputStream(file);
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.core.interfaces.RequestIdentifier

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.