Examples of Droid


Examples of org.apache.droids.api.Droid

    }
    ApplicationContext context = new ClassPathXmlApplicationContext(
        "classpath:/org/apache/droids/dynamic/droids-core-context.xml");
   
    DroidsConfig config = (DroidsConfig) context.getBean("org.apache.droids.dynamic.DroidsConfig");
    Droid droid = config.getDroid(name);
   
    if (droid == null) {
      log.error("Droid " + name + " is not defined");
      log.error(getUsage());
      return;
    }
   
    log.info("A p a c h e    D r o i d s - an intelligent robot framework");
    if (droid instanceof CrawlingDroid) {
      List<String> locations = new ArrayList<String>();
      if (location == null) {
        log.error("Droid " + name + " is a crawler, however you have not defined a starting location.");
        log.error(getUsage());
        return;
      }
      locations.add(location);
      ((CrawlingDroid) droid).setInitialLocations(locations);
    }
    droid.init();
    droid.start();
    droid.getTaskMaster().awaitTermination(0, TimeUnit.MILLISECONDS);
  }
View Full Code Here

Examples of org.apache.droids.api.Droid

   * Start a given Droid. First we will look up the droid
   * identified by the given name and then start it.
   * @param name the name of the droid we want to use
   */
  public void start(String name) throws DroidsException {
    Droid droid = getDroid(name);
   
    droid.init();
    droid.start();
  }
View Full Code Here

Examples of org.apache.droids.api.Droid

    }
    ApplicationContext context = new ClassPathXmlApplicationContext(
        "classpath:/org/apache/droids/dynamic/droids-core-context.xml");
   
    DroidsConfig config = (DroidsConfig) context.getBean("org.apache.droids.dynamic.DroidsConfig");
    Droid droid = config.getDroid(name);
   
    if (droid == null) {
      LOG.error("Droid " + name + " is not defined");
      LOG.error(getUsage());
      return;
    }
   
    LOG.info("A p a c h e    D r o i d s - an intelligent robot framework");
    if (droid instanceof CrawlingDroid) {
      List<String> locations = new ArrayList<String>();
      if (location == null) {
        LOG.error("Droid " + name + " is a crawler, however you have not defined a starting location.");
        LOG.error(getUsage());
        return;
      }
      locations.add(location);
      ((CrawlingDroid) droid).setInitialLocations(locations);
    }
    droid.init();
    droid.start();
    droid.getTaskMaster().awaitTermination(0, TimeUnit.MILLISECONDS);
  }
View Full Code Here

Examples of uk.gov.nationalarchives.droid.Droid

    
     * @throws Exception
     */
    private DROIDIntegration() throws Exception{
        if (droid == null) {
           droid = new Droid();
        }
        if ((droid.getSignatureFileVersion() == null) || ("".equals(droid.getSignatureFileVersion()))) {
           URL sigFile = this.getClass().getClassLoader().getResource("data/droid/DROID_SignatureFile.xml");
               droid.readSignatureFile(sigFile);
        }
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.