Package net.sf.pipet.api

Examples of net.sf.pipet.api.ModuleDefinition


      throw new InvalidConfigurationException("Unnamed module.");

    if (url == null && modref == null)
      modref = modid; // compatibility

    ModuleDefinition parent;
    if (modref != null)
    {
      parent = id2mod.get(modref);
      if (parent == null)
        throw new InvalidConfigurationException(String.format("Module %s: Module interface specification is missing.", modid));
    }
    else
      parent = cfg.getRootModule();
   
    ModuleInterface iface = null;
    if (url!=null)
      iface = new ModuleInterfaceFrontend(cfg, url);
   
    Map<String,UntypedValue> atts = extractAttributes(modnode);
   
    if (pipeline_mods == null)
    {
      ModuleDefinition moddef = ModuleDefinition.create(parent, url, iface, extractCachePolicy(modnode), atts);
      if (moddef.getInterface() == null)
        throw new InvalidConfigurationException(String.format("Module %s: Incomplete module definition.", modid));
      mod2id.put(moddef, modid);
      if (!id2mod.containsKey(modid))
      {
        cfg.addModule(moddef);
        for (String path : extractExportPaths(modnode))
          cfg.getExports().put(path, moddef);

        id2mod.put(modid, moddef);
      }
     
      return moddef;
    }
    else
    {
      PipelineModule moddef = new PipelineModule(parent, extractCachePolicy(modnode), atts);
      if (moddef.getInterface() == null)
        throw new InvalidConfigurationException(String.format("Module %s: Incomplete module definition.", modid));
      pipeline_mods.put(modid, moddef);

      return moddef;
    }
View Full Code Here


  }
 
  private void parsePipelineModuleNode(Element modnode, Pipeline p, Map<String,PipelineModule> pipeline_mods)
    throws InvalidConfigurationException
  {
    ModuleDefinition mod = parseModuleNode(modnode, pipeline_mods);

    if (mod.getInterface() == null)
      throw new InvalidConfigurationException("Incomplete module definition.");
    else
      p.addModule(mod);
  }
View Full Code Here

     
      this.mod = mod;
      this.reporter = reporter;

      oss = new HashMap<String,OutputStreamSplitter>();
      ModuleDefinition pipemod = mod.getPipelineModule();

      for (String pipe : pipemod.getOutputPipeTypes().keySet())
        oss.put(pipe, new OutputStreamSplitter(true));
    }
View Full Code Here

TOP

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

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.