package brn.gui.diagram;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.Resource.Factory;

import brn.gui.datasource.Source;
import brn.gui.fwdgraph.diagram.custom.editors.FwdGraphResouce;
import brn.gui.linktable.diagram.custom.editors.LinkTableResouce;

public class SimulatorResourceFactory implements Factory {

  public Resource createResource(URI uri) {
    throw new UnsupportedOperationException();
  }

  public Resource createResource(Source simulator, int id) {
    // TODO set uri
    FwdGraphResouce res =
      new FwdGraphResouce(URI.createGenericURI("x", "y", "z"), simulator);
    res.setId(id);
    return res;
  }

  public LinkTableResouce createLinkTableResource(Source simulator, int id) {
    // TODO set uri
    URI uri = URI.createGenericURI("x", "y", "z");
    LinkTableResouce linkTableResouce = new LinkTableResouce(uri, simulator);
    linkTableResouce.setLinkTableId(id);
    return linkTableResouce;
  }

}
