Package net.sf.pipet.api

Examples of net.sf.pipet.api.ModuleAttributes


    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);
   
    ModuleAttributes atts = loadAttributes(ini.get(SECT_ATTRIBUTES), context);
    Map<String,byte[]> input = loadSection(ini.get(SECT_INPUT), context);
    Map<String,byte[]> output = loadSection(ini.get(SECT_OUTPUT), context);

    if ((module_url==null) == (pipeline_name==null))
      throw new Exception(String.format("One of '%s' and '%s' must be specified (but not both).", OPT_PIPELINE_NAME, OPT_MODULE_NAME));
View Full Code Here


    return url.openStream();
  }
 
  private static ModuleAttributes loadAttributes(Section sect, URL context)
  {
    ModuleAttributes atts = new ModuleAttributes();
    if (sect != null)
    {
      for (Map.Entry<String,String> e : sect.entrySet())
        atts.setValue(e.getKey(), new UntypedValue(e.getValue()));
    }
   
    return atts;
  }
View Full Code Here

  }
 
  public ModuleInstance createInstance(ModuleData data, Messenger reporter)
    throws Exception
  {
    ModuleAttributes atts = data.getAttributes();
    return getPipeline(atts).createModuleJob(data, getInterfaceType(atts), reporter);
  }
View Full Code Here

    return job.run();
  }

  private static ModuleAttributes createAttributes(Map<String,String> values)
  {
    ModuleAttributes atts = new ModuleAttributes();

    if (values != null)
    {
      for (Entry<String,String> kv : values.entrySet())
      {
        if (kv.getValue() == null)
          atts.setValue(kv.getKey(), new UntypedValue());
        else
          atts.setValue(kv.getKey(), new UntypedValue(kv.getValue()));
      }
    }
   
    return atts;
  }
View Full Code Here

    return mod;
  }

  public ModuleAttributes createAttributes()
  {
    ModuleAttributes atts = new ModuleAttributes();
    for (Entry<String,String> kv : parseKeyValuePairs(cmd, OPT_ATTRIBUTE[0]).entrySet())
    {
      if (kv.getValue() == null)
        atts.setValue(kv.getKey(), new UntypedValue());
      else
        atts.setValue(kv.getKey(), new UntypedValue(kv.getValue()));
    }
   
    return atts;
  }
View Full Code Here

    Map<ModuleAttributes,ModuleWrapper> mod2wrap = new HashMap<ModuleAttributes,ModuleWrapper>();
    for (ModuleDefinition mod : mods)
    {
      ModuleWrapper wrapper = new ModuleWrapper(mod, new PrefixMessenger(mod.getTitle()+": ", reporter));
      wrappers.add(wrapper);
      ModuleAttributes atts = mod;
      while (atts != null)
      {
        mod2wrap.put(atts, wrapper);
        atts = atts.getParent();
      }
    }

    // link data export output streams
    if (data_access != null)
View Full Code Here

TOP

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

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.