Package org.fcrepo.client.utility.validate.process

Examples of org.fcrepo.client.utility.validate.process.PidfileIterator


    }

    public static void purgeFromList(FedoraAPIMMTOM skeleton,
                               File pFile,
                               String logMessage) {
        PidfileIterator p_iter = new PidfileIterator(pFile);
        int objs_purged = 0;

        while ( p_iter.hasNext() ) {
            String pid = p_iter.next();
            try {
                skeleton.purgeObject(pid, logMessage, false);
                System.out.println("'" + pid +"' purged");
                objs_purged++;
            } catch (Exception e) {
View Full Code Here


    private static final String THIRD_PID = "thirdPid";

    @Test(expected = NullPointerException.class)
    public void rejectNullArgument() {
        new PidfileIterator(null);
    }
View Full Code Here

        new PidfileIterator(null);
    }

    @Test(expected = IllegalStateException.class)
    public void ioExceptionBecomesIllegalStateException() {
        new PidfileIterator(new File("/bogus/file"));
    }
View Full Code Here

                    File.createTempFile("TestValidatorProcessParameter",
                                        "dummyFile");
            dummyFile.deleteOnExit();
            loadPidFile(dummyFile, lines);

            PidfileIterator iterator = new PidfileIterator(dummyFile);

            assertTrue("has first line", iterator.hasNext());
            assertEquals("first line", FIRST_PID, iterator.next());
            assertTrue("has second line", iterator.hasNext());
            assertEquals("second line", SECOND_PID, iterator.next());
            assertTrue("has third line", iterator.hasNext());
            assertEquals("third line", THIRD_PID, iterator.next());
            assertFalse("no fourth line", iterator.hasNext());
        } finally {
            if (dummyFile != null || dummyFile.exists()) {
                dummyFile.delete();
            }
        }
View Full Code Here

TOP

Related Classes of org.fcrepo.client.utility.validate.process.PidfileIterator

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.