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

Examples of uk.gov.nationalarchives.droid.core.interfaces.archive.ArchiveFormatResolver


        submissionGateway.setExecutorService(Executors.newFixedThreadPool(2));
       
        SubmissionQueue submissionQueue = mock(SubmissionQueue.class);
        submissionGateway.setSubmissionQueue(submissionQueue);

        ArchiveFormatResolver archiveFormatResolver = mock(ArchiveFormatResolver.class);
        ArchiveHandlerFactory archiveHandlerFactory = mock(ArchiveHandlerFactory.class);
        when(archiveFormatResolver.forPuid("x-fmt/412")).thenReturn("ZIP");

        TrueZipArchiveHandler zipHandler = new TrueZipArchiveHandler();
        zipHandler.setDroidCore(submissionGateway);
        zipHandler.setFactory(new ZipEntryRequestFactory());
        zipHandler.setResultHandler(resultHandler);

        when(archiveHandlerFactory.getHandler("ZIP")).thenReturn(zipHandler);

        ArchiveFormatResolver containerFormatResolver = mock(ArchiveFormatResolver.class);
       
        submissionGateway.setArchiveFormatResolver(archiveFormatResolver);
        submissionGateway.setArchiveHandlerFactory(archiveHandlerFactory);
        submissionGateway.setContainerFormatResolver(containerFormatResolver);
        try {
View Full Code Here


        ooXmlIdentifier.setDroidCore(droidCore);
       
        ContainerIdentifierFactory containerIdentifierFactory = mock(ContainerIdentifierFactory.class);
        ooXmlIdentifier.setContainerIdentifierFactory(containerIdentifierFactory);
       
        ArchiveFormatResolver containerFormatResolver = mock(ArchiveFormatResolver.class);
        ooXmlIdentifier.setContainerFormatResolver(containerFormatResolver);

        ooXmlIdentifier.setSignatureFileParser(new ContainerSignatureSaxParser());
        ooXmlIdentifier.setContainerType("ZIP");
        ooXmlIdentifier.setSignatureFilePath(path);
View Full Code Here

       
        URL containerSignatureUrl = getClass().getClassLoader().getResource("container-signature.xml");
        String path = containerSignatureUrl.getPath();
       
        ContainerIdentifierFactory containerIdentifierFactory = mock(ContainerIdentifierFactory.class);
        ArchiveFormatResolver containerFormatResolver = mock(ArchiveFormatResolver.class);
       
        DroidCore droidCore = mock(DroidCore.class);
        ooXmlIdentifier.setDroidCore(droidCore);
       
        ooXmlIdentifier.setContainerIdentifierFactory(containerIdentifierFactory);
View Full Code Here

       
        URL containerSignatureUrl = getClass().getClassLoader().getResource("container-signature.xml");
        String path = containerSignatureUrl.getPath();
       
        ContainerIdentifierFactory containerIdentifierFactory = mock(ContainerIdentifierFactory.class);
        ArchiveFormatResolver containerFormatResolver = mock(ArchiveFormatResolver.class);
       
        DroidCore droidCore = mock(DroidCore.class);
        ooXmlIdentifier.setDroidCore(droidCore);

        ooXmlIdentifier.setContainerIdentifierFactory(containerIdentifierFactory);
View Full Code Here

       
        URL containerSignatureUrl = getClass().getClassLoader().getResource("container-signature.xml");
        String path = containerSignatureUrl.getPath();
       
        ContainerIdentifierFactory containerIdentifierFactory = mock(ContainerIdentifierFactory.class);
        ArchiveFormatResolver containerFormatResolver = mock(ArchiveFormatResolver.class);
       
        DroidCore droidCore = mock(DroidCore.class);
        ole2Identifier.setDroidCore(droidCore);

        ole2Identifier.setContainerIdentifierFactory(containerIdentifierFactory);
View Full Code Here

       
        URL containerSignatureUrl = getClass().getClassLoader().getResource("container-signature.xml");
        String path = containerSignatureUrl.getPath();
       
        ContainerIdentifierFactory containerIdentifierFactory = mock(ContainerIdentifierFactory.class);
        ArchiveFormatResolver containerFormatResolver = mock(ArchiveFormatResolver.class);
       
        DroidCore droidCore = mock(DroidCore.class);
        ole2Identifier.setDroidCore(droidCore);

        ole2Identifier.setContainerIdentifierFactory(containerIdentifierFactory);
View Full Code Here

       
        URL containerSignatureUrl = getClass().getClassLoader().getResource("container-signature.xml");
        String path = containerSignatureUrl.getPath();
       
        ContainerIdentifierFactory containerIdentifierFactory = mock(ContainerIdentifierFactory.class);
        ArchiveFormatResolver containerFormatResolver = mock(ArchiveFormatResolver.class);
       
        ole2Identifier.setContainerIdentifierFactory(containerIdentifierFactory);
        ole2Identifier.setContainerFormatResolver(containerFormatResolver);
        DroidCore droidCore = mock(DroidCore.class);
        ole2Identifier.setDroidCore(droidCore);
View Full Code Here

       
        URL containerSignatureUrl = getClass().getClassLoader().getResource(CONTAINER_SIGNATUE_FILE);
        String path = containerSignatureUrl.getPath();
       
        ContainerIdentifierFactory containerIdentifierFactory = mock(ContainerIdentifierFactory.class);
        ArchiveFormatResolver containerFormatResolver = mock(ArchiveFormatResolver.class);
       
        DroidCore droidCore = mock(DroidCore.class);
        odfIdentifier.setDroidCore(droidCore);

        odfIdentifier.setContainerIdentifierFactory(containerIdentifierFactory);
View Full Code Here

       
        URL containerSignatureUrl = getClass().getClassLoader().getResource(CONTAINER_SIGNATUE_FILE);
        String path = containerSignatureUrl.getPath();
       
        ContainerIdentifierFactory containerIdentifierFactory = mock(ContainerIdentifierFactory.class);
        ArchiveFormatResolver containerFormatResolver = mock(ArchiveFormatResolver.class);
       
        DroidCore droidCore = mock(DroidCore.class);
        odfIdentifier.setDroidCore(droidCore);

        odfIdentifier.setContainerIdentifierFactory(containerIdentifierFactory);
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.core.interfaces.archive.ArchiveFormatResolver

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.