Package net.sf.pipet.api

Examples of net.sf.pipet.api.Plug


  public Plug getSource()
  {
    if (srcmod == null || srcselector.getSelectedItem() == null)
      return null;
    else
      return new Plug(srcmod, (String)srcselector.getSelectedItem());
  }
View Full Code Here


  public Plug getDest()
  {
    if (destmod == null || destselector.getSelectedItem() == null)
      return null;
    else
      return new Plug(destmod, (String)destselector.getSelectedItem());
  }
View Full Code Here

   
    Collection<Plug> invalid_source_plugs = new Vector<Plug>();
   
    for (Map.Entry<Plug,Collection<Plug>> e : connectors.entrySet())
    {
      Plug source = e.getKey();
      if (!source.isValidSource(this))
      {
        if (log != null)
          log.warn(String.format("Removing connector from unresolved output port: %s/%s", source.getModule().getDescription(), source.getPort()));
        invalid_source_plugs.add(source);
      }
      else
      {
        for (Iterator<Plug> it = e.getValue().iterator() ; it.hasNext() ; )
        {
          Plug target = it.next();
          if (!target.isValidTarget(this))
          {
            if (log != null)
              log.warn(String.format("Removing connector from unresolved input port: %s/%s", target.getModule().getDescription(), target.getPort()));
            it.remove();
            is_changed = true;
          }
        }
      }
View Full Code Here

   
    for (Map.Entry<String,Collection<Plug>> e : getInputPipes().entrySet())
    {
      for (Iterator<Plug> it = e.getValue().iterator() ; it.hasNext() ; )
      {
        Plug plug = it.next();
        if (!plug.isValidTarget(this))
        {
          if (log != null)
            log.warn(String.format("Removing unresolved import port: %s/%s", plug.getModule().getDescription(), plug.getPort()));
          removePipe(input_pipes, e.getKey(), plug);
          is_changed = true;
        }
      }
    }
View Full Code Here

   
    for (Map.Entry<String,Collection<Plug>> e : getOutputPipes().entrySet())
    {
      for (Iterator<Plug> it = e.getValue().iterator() ; it.hasNext() ; )
      {
        Plug plug = it.next();
        if (!plug.isValidSource(this))
        {
          if (log != null)
            log.warn(String.format("Removing unresolved export port: %s/%s", plug.getModule().getDescription(), plug.getPort()));
          removePipe(output_pipes, e.getKey(), plug);
          is_changed = true;
        }
      }
    }
View Full Code Here

    for (PipelineModule consumer : mods)
    {
      for (String port : consumer.getInputPipeTypes().keySet())
      {
        for (PipelineModule producer : producers.get(port))
          addConnector(connectors, new Plug(producer, port), new Plug(consumer, port));
      }
    }

    return Collections.unmodifiableMap(connectors);
  }
View Full Code Here

   
    Map<String,Collection<Plug>> pipes = new HashMap<String,Collection<Plug>>();
    for (PipelineModule mod : mods)
    {
      for (String port : mod.getInputPipeTypes().keySet())
        addPipe(pipes, port, Collections.singleton(new Plug(mod, port)));
    }
   
    return Collections.unmodifiableMap(pipes);
  }
View Full Code Here

   
    Map<String,Collection<Plug>> pipes = new HashMap<String,Collection<Plug>>();
    for (PipelineModule mod : mods)
    {
      for (String port : mod.getOutputPipeTypes().keySet())
        addPipe(pipes, port, Collections.singleton(new Plug(mod, port)));
    }
   
    return Collections.unmodifiableMap(pipes);
  }
View Full Code Here

    return new AbortablePipeline(job);
  }
 
  private Plug translate(Map<PipelineModule,PipelineModule> modmap, Plug in)
  {
    return new Plug(modmap.get(in.getModule()), in.getPort());
  }
View Full Code Here

      {
        JOptionPane.showMessageDialog(parent, "The destination module has no input ports.", "Cannot link modules", JOptionPane.ERROR_MESSAGE);
        return null;
      }
   
      Plug source = null;
      Plug dest = null;
      if (origin.getOutputPipeTypes().size() == 1 && target.getInputPipeTypes().size() == 1)
      {
        source = new Plug(origin, origin.getOutputPipeTypes().keySet().iterator().next());
        dest = new Plug(target, target.getInputPipeTypes().keySet().iterator().next());
      }
      else
      {
        CreateEdgeDialog dlg = new CreateEdgeDialog(origin, target);
        int result = JOptionPane.showConfirmDialog(parent, dlg, "Create a pipe", JOptionPane.OK_CANCEL_OPTION);
View Full Code Here

TOP

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

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.