Package net.sf.pipet.api

Examples of net.sf.pipet.api.Configuration


      base = "/";
    else if (!base.equals("/") && base.endsWith("/"))
      base = base.substring(0, base.length()-1);
   
    ServletContextHandler ctx = new ServletContextHandler(server, base);
    Configuration cfg = ServerConfig.loadPipelineConfiguration(configfile);
    cfg.setResourceLoader(new DefaultResourceLoader(configfile.getParentFile()));
    reporter.info("Setting up pipelines: "+base);
    ctx.addServlet(new ServletHolder(new Servlet(cfg, new PrefixMessenger(base+": ", reporter))), "/*");
    return ctx;
  }
View Full Code Here


      cf = ConfigurationFactory.newInstance();
   
    Ini ini = new Ini();
    ini.load(is);
   
    Configuration cfg = loadPipelineConfiguration(ini, context, cf);
    String pipeline_name = ini.get(SECT_GENERAL, OPT_PIPELINE_NAME);
    String module_url = ini.get(SECT_GENERAL, OPT_MODULE_NAME);
    String status_string = ini.get(SECT_GENERAL, OPT_STATUS);
    boolean status = status_string == null ? DEFAULT_STATUS : Boolean.parseBoolean(status_string);
   
View Full Code Here

  }
 
  public Configuration read()
    throws Exception
  {
    Configuration cfg = newFactory().newConfiguration(new DefaultResourceLoader());
    cfg.addAvailableCachePolicy(Cache.NO_CACHE);
    cfg.addAvailableCachePolicy(Cache.TEMPDIR);
   
    return cfg;
  }
View Full Code Here

    if (choice != JFileChooser.APPROVE_OPTION)
      return;

    File newfile = file_chooser.getSelectedFile();
   
    Configuration newcfg = null;
    try
    {
      newcfg = ConfigurationDefaultResource.newFactory().parseFile(newfile);
    }
    catch (IOException e)
View Full Code Here

      {
        System.out.printf("PipeT tool %s\n", ProjectInfo.version);
        return 0;
      }
     
      Configuration cfg = command.getConfiguration();
      if (cfg == null)
        return -1;
     
      if (command.printPipelineList())
      {
        for (Pipeline p : cfg.getAvailablePipelines())
        {
          List<String> cols = new Vector<String>();
          cols.add(p.getName());
          cols.add(getPipeList(p, true, command.getMessenger()));
          cols.add(getPipeList(p, false, command.getMessenger()));
View Full Code Here

 
  private static Configuration parseConfigurationFile(EditorConfig cfg, File f, Messenger msg)
  {
    try
    {
      Configuration pipesetup = ConfigurationDefaultResource.newFactory().parseFile(f);
      cfg.setWorkingFile(f);
      return pipesetup;
    }
    catch (InvalidConfigurationException e)
    {
View Full Code Here

    EditorConfig cfg = readEditorConfig(reporter);

    if (cfgfile == null)
      cfgfile = cfg.getWorkingFile();

    Configuration pipesetup = null;
    boolean file_modified = false;
   
    if (cfgfile != null && cfg.getWorkingFile() != null && cfgfile.equals(cfg.getWorkingFile()) && DEFAULT_CONFIGFILE.lastModified() > cfgfile.lastModified())
    {
      int recover = JOptionPane.showConfirmDialog(null,
View Full Code Here

    InputStream is_in = ClassLoader.getSystemResourceAsStream(path_in);
    InputStream is_out = ClassLoader.getSystemResourceAsStream(path_out);
    assertNotNull(path_in+": file not found.", is_in);
    assertNotNull(path_out+": file not found.", is_out);
   
    Configuration cfg = ConfigurationFactory.newInstance().parseInputStream(is_in);
    ByteArrayOutputStream ba = new ByteArrayOutputStream();
    new ConfigurationWriter(cfg).writeTo(new OutputStreamWriter(ba));

    byte[] config_real = ba.toByteArray();
    byte[] config_expected = IOUtils.toByteArray(is_out);
View Full Code Here

TOP

Related Classes of net.sf.pipet.api.Configuration

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.