Package uk.gov.nationalarchives.droid.container

Examples of uk.gov.nationalarchives.droid.container.ContainerSignatureSaxParser


            + "      </Files>"
            + "    </ContainerSignature>"
            + "  </ContainerSignatures>"
            + "</ContainerSignatureMapping>";
       
        ContainerSignatureSaxParser parser = new ContainerSignatureSaxParser();
        ContainerSignatureDefinitions sigDefs = parser.parse(new ByteArrayInputStream(xml.getBytes()));
       
        final List<ContainerSignature> containerSignatures = sigDefs.getContainerSignatures();
        assertEquals(1, containerSignatures.size());
       
        final Element internalSigXml = containerSignatures.get(0).getFiles().get("META-INF/manifest.xml")
View Full Code Here


        ole2Identifier.setDroidCore(droidCore);

        ole2Identifier.setContainerIdentifierFactory(containerIdentifierFactory);
        ole2Identifier.setContainerFormatResolver(containerFormatResolver);
       
        ole2Identifier.setSignatureFileParser(new ContainerSignatureSaxParser());
        ole2Identifier.setContainerType("OLE2");
        ole2Identifier.setSignatureFilePath(path);
        IdentificationRequestFactory requestFactory = mock(IdentificationRequestFactory.class);
       
        IdentificationRequest request = mock(IdentificationRequest.class);
View Full Code Here

        ole2Identifier.setDroidCore(droidCore);

        ole2Identifier.setContainerIdentifierFactory(containerIdentifierFactory);
        ole2Identifier.setContainerFormatResolver(containerFormatResolver);
       
        ole2Identifier.setSignatureFileParser(new ContainerSignatureSaxParser());
        ole2Identifier.setContainerType("OLE2");
        ole2Identifier.setSignatureFilePath(path);
        ole2Identifier.init();
       
        verify(containerIdentifierFactory).addContainerIdentifier("OLE2", ole2Identifier);
View Full Code Here

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

        ooXmlIdentifier.setSignatureFileParser(new ContainerSignatureSaxParser());
        ooXmlIdentifier.setContainerType("ZIP");
        ooXmlIdentifier.setSignatureFilePath(path);
        ooXmlIdentifier.init();
       
        List<ContainerSignature> containerSignatures = ooXmlIdentifier.getContainerSignatures();
View Full Code Here

        ole2Identifier.setContainerIdentifierFactory(containerIdentifierFactory);
        ole2Identifier.setContainerFormatResolver(containerFormatResolver);
        DroidCore droidCore = mock(DroidCore.class);
        ole2Identifier.setDroidCore(droidCore);
       
        ole2Identifier.setSignatureFileParser(new ContainerSignatureSaxParser());
        ole2Identifier.setSignatureFilePath(path);
        ole2Identifier.init();
       
        verify(droidCore).removeSignatureForPuid("fmt/41");
        verify(droidCore).removeSignatureForPuid("fmt/43");
View Full Code Here

        ooXmlIdentifier.setDroidCore(droidCore);
       
        ooXmlIdentifier.setContainerIdentifierFactory(containerIdentifierFactory);
        ooXmlIdentifier.setContainerFormatResolver(containerFormatResolver);
       
        ooXmlIdentifier.setSignatureFileParser(new ContainerSignatureSaxParser());
        ooXmlIdentifier.setContainerType("ZIP");
        ooXmlIdentifier.setSignatureFilePath(path);

        ooXmlIdentifier.init();
       
View Full Code Here

        ooXmlIdentifier.setDroidCore(droidCore);

        ooXmlIdentifier.setContainerIdentifierFactory(containerIdentifierFactory);
        ooXmlIdentifier.setContainerFormatResolver(containerFormatResolver);
       
        ooXmlIdentifier.setSignatureFileParser(new ContainerSignatureSaxParser());
        ooXmlIdentifier.setContainerType("ZIP");
        ooXmlIdentifier.setSignatureFilePath(path);
        ooXmlIdentifier.init();
       
        verify(containerIdentifierFactory, times(2)).addContainerIdentifier("ZIP", ooXmlIdentifier);
View Full Code Here

        odfIdentifier.setDroidCore(droidCore);

        odfIdentifier.setContainerIdentifierFactory(containerIdentifierFactory);
        odfIdentifier.setContainerFormatResolver(containerFormatResolver);
       
        odfIdentifier.setSignatureFileParser(new ContainerSignatureSaxParser());
        odfIdentifier.setContainerType("ZIP");
        odfIdentifier.setSignatureFilePath(path);

        odfIdentifier.init();
       
View Full Code Here

        odfIdentifier.setDroidCore(droidCore);

        odfIdentifier.setContainerIdentifierFactory(containerIdentifierFactory);
        odfIdentifier.setContainerFormatResolver(containerFormatResolver);
       
        odfIdentifier.setSignatureFileParser(new ContainerSignatureSaxParser());
        odfIdentifier.setContainerType("ZIP");
        odfIdentifier.setSignatureFilePath(path);

        odfIdentifier.init();
       
View Full Code Here

        } catch (SignatureParseException e) {
            throw new CommandExecutionException("Can't parse signature file");
        }
        try {
            InputStream in = new FileInputStream(containerSignatures);
            ContainerSignatureSaxParser parser = new ContainerSignatureSaxParser();
            containerSignatureDefinitions = parser.parse(in);
        } catch (SignatureParseException e) {
            throw new CommandExecutionException ("Can't parse container signature file");
        } catch (Exception e) {
            throw new CommandExecutionException(e);
        }
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.container.ContainerSignatureSaxParser

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.