Package uk.gov.nationalarchives.droid.profile

Examples of uk.gov.nationalarchives.droid.profile.ProfileInstance.addResource()


                newResource = new DirectoryProfileResource(selectedFile, recursive);
            } else {
                newResource = new FileProfileResource(selectedFile);
            }

            if (profile.addResource(newResource)) {
                ProfileResourceNode primordialNode = new ProfileResourceNode(newResource.getUri());
                final NodeMetaData metaData = primordialNode.getMetaData();
                metaData.setName(newResource.getUri().getPath());
                metaData.setNodeStatus(NodeStatus.NOT_DONE);
                metaData.setResourceType(
View Full Code Here


        final File sigFile = new File("sig_files/DROID_SignatureFile_V26.xml");
        FileUtils.copyFileToDirectory(sigFile, profileHomeDir);
        testProfile.setSignatureFileName("DROID_SignatureFile_V26.xml");
        String path = "C:/Documents and Settings/rflitcroft/My Documents/matts_disk";
        //String path = "src/test/resources";
        testProfile.addResource(new DirectoryProfileResource(new File(path), true));
       
        ProfileInstanceManager profileInstance = profileContextLocator.openProfileInstanceManager(testProfile);
        //profileInstance.initProfile(sigFile.toURI());
        profileInstance.start().get();
       
View Full Code Here

            Map<SignatureType, SignatureFileInfo> sigs = signatureManager.getDefaultSignatures();
            ProfileInstance profile = profileManager.createProfile(sigs);
            profile.changeState(ProfileState.VIRGIN);

            for (String resource : resources) {
                profile.addResource(locationResolver.getResource(resource, recursive));
            }
           
            Future<?> future = profileManager.start(profile.getUuid());
            future.get();
           
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.