Examples of PathSharingContext


Examples of org.archive.spring.PathSharingContext

        File tmpDir = new File(getTmpDir(), "validatorTest");
        File configDir = new File(tmpDir, srcDir.getName());
        org.archive.util.FileUtils.ensureWriteableDirectory(configDir);
        FileUtils.copyDirectory(srcDir, configDir);

        PathSharingContext ac = null;
        try {
            File config = new File(configDir,"profile-crawler-beans.cxml");
            ac = new PathSharingContext("file:"+config.getAbsolutePath());
        } catch (BeansException be){
            be.printStackTrace(System.err);
        } finally {
            assertNotNull("profile not buildable",ac);
            ac.validate();
            assertEquals("did not get the expected one error",1,ac.getAllErrors().size());
            ac.destroy();
        }
    }
View Full Code Here

Examples of org.archive.spring.PathSharingContext

     */
    public synchronized void instantiateContainer() {
        checkXML();
        if(ac==null) {
            try {
                ac = new PathSharingContext(new String[] {primaryConfig.toURI().toString()}, false, null);
                ac.addApplicationListener(this);
                ac.refresh();
                getCrawlController(); // trigger NoSuchBeanDefinitionException if no CC
                getJobLogger().log(Level.INFO,"Job instantiated");
            } catch (BeansException be) {
View Full Code Here

Examples of org.archive.spring.PathSharingContext

public class ScriptingConsoleTest extends TestCase {
    // barebone CrawlJob object.
    public static class TestCrawlJob extends CrawlJob {
        public TestCrawlJob() {
            super(null);
            this.ac = new PathSharingContext(new String[0]);
        }
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.