congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
GraphRelationshipFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
GraphRelationshipFactory
in
ingenias.generator.browser

Best Java code snippets using ingenias.generator.browser.GraphRelationshipFactory (Showing top 9 results out of 315)

origin: net.sf.ingenias/editor

public static GraphRelationshipFactory createDefaultGraphFactory(Browser browser) throws NotInitialised{
  return new GraphRelationshipFactory(browser.getState());
}
origin: net.sf.ingenias/editor

public static Vector<Hashtable<String,String>> getPossibleRoleAssignment(String relationshipType, String[] connectedEntities, Graph graph, Browser browser) throws NotFound{
  Vector<GraphCell> entities=new Vector<GraphCell>();
  for (String entityID:connectedEntities) {
    DefaultGraphCell entity = findEntity(entityID,graph);
    if (entity==null)
      throw new ingenias.exception.NotFound("Entity "+entityID+" that you tried to connect did not exist in the graph "+graph.getName());
    entities.add(entity);    
  }
  GraphCell[] selected=new GraphCell[entities.size()];
  selected=entities.toArray(selected);
  NAryEdge nEdge=(NAryEdge) RelationshipFactory.getNRelationshipInstance(relationshipType, selected,browser);
  Vector<Hashtable<String, String>> result = convertToVectorHashtable(connectedEntities, selected, nEdge);
  return result;
}
origin: net.sf.ingenias/editor

public static  Vector< String> getPossibleRelationships( List<String> connectedEntities, Graph graph) throws NotFound{
  return getPossibleRelationships(connectedEntities.toArray(new String[connectedEntities.size()]),graph);
}
origin: net.sf.ingenias/editor

Vector<DefaultGraphCell> selectedV=new Vector<DefaultGraphCell>();
for (String cellid:cells){
  selectedV.add(this.findEntity(cellid, diagram));
    ConnectionSet cs = nEdge.connections(selectedAssignation,
        auxiliaryEdges,
        getPorts(newSelected, diagram.getGraph()));
    Hashtable edgesAttributes = this.edgesAttributes(auxiliaryEdges,
        selectedAssignation);
    Point centerP=calculateCenter(selected);
    Rectangle2D edgeb=GraphConstants.getBounds(nEdge.getAttributes());
    GraphConstants.setBounds(m,new Rectangle(centerP,new Dimension(0,0)));
    this.insertRelationshipInManager(nEdge, auxiliaryEdges,
        newSelected,
        currentAssignation);
origin: net.sf.ingenias/editor

private DefaultGraphCell findEntity(String id){
  Vector<ModelJGraph> graphs = this.ids.gm.getUOModels();
  int k=0;
  boolean found=false;
  DefaultGraphCell result=null;
  while (result==null && k<graphs.size()){
    result=findEntity(id,new GraphImp(graphs.elementAt(k), ids));
    k++;
  }
  return result;
}
origin: net.sf.ingenias/editor

public static  Vector<Hashtable<String, String>> getPossibleRoleAssignment(String relationshipType, List<String> connectedEntities, Graph graph, Browser browser) throws NotFound{
  return getPossibleRoleAssignment(relationshipType,connectedEntities.toArray(new String[connectedEntities.size()]),graph,browser);
}
origin: net.sf.ingenias/editor

public static  Vector< String> getPossibleRelationships( String[] connectedEntities, Graph graph) throws NotFound{
  Vector<GraphCell> entities=new Vector<GraphCell>();
  for (String entityID:connectedEntities) {
    DefaultGraphCell entity = findEntity(entityID,graph);
    if (entity==null)
      throw new ingenias.exception.NotFound("Entity "+entityID+" that you tried to connect did not exist in the graph "+graph.getName());
    entities.add(findEntity(entityID,graph));	
  }
  GraphCell[] selected=new GraphCell[entities.size()];
  selected=entities.toArray(selected);
  Object[] relObjArray = graph.getGraph().getPossibleRelationships(selected);
  Vector<String> result = new Vector<String>();
  for (Object rel:relObjArray){
    result.add(rel.toString());
  }        
  return result;
}
origin: net.sf.ingenias/editor

public Vector<Hashtable<String,String>> getPossibleRoleAssignment(String relationshipType, String[] connectedEntities) throws NotFound{
  Vector<GraphCell> entities=new Vector<GraphCell>();
  for (String entityID:connectedEntities) {
    DefaultGraphCell entity = findEntity(entityID);
    if (entity==null){
      // the entity may have not been created yet as graphical object
      // The object manager may know about it.
      if (this.ids.om.findUserObject(entityID).size()>0)
        entity=new DefaultGraphCell(this.ids.om.findUserObject(entityID).firstElement());
      else
        throw new ingenias.exception.NotFound("Entity "+entityID+" that you tried to connect did not exist in any graph ");
    }
    //throw new ingenias.exception.NotFound("Entity "+entityID+" that you tried to connect did not exist in any graph ");
    entities.add(entity);    
  }
  GraphCell[] selected=new GraphCell[entities.size()];
  selected=entities.toArray(selected);
  NAryEdge nEdge=(NAryEdge) RelationshipFactory.getNRelationshipInstance(relationshipType, selected,browser);
  Vector<Hashtable<String, String>> result = convertToVectorHashtable(connectedEntities, selected, nEdge);
  return result;
}
origin: net.sf.ingenias/editor

public static GraphRelationshipFactory createDefaultEmptyGraphFactory(){
  return new GraphRelationshipFactory(IDEState.emptyIDEState());
}
ingenias.generator.browserGraphRelationshipFactory

Most used methods

  • <init>
  • calculateCenter
  • convertToVectorHashtable
  • edgesAttributes
  • findEntity
  • getPorts
  • getPossibleRelationships
  • getPossibleRoleAssignment
  • insertRelationshipInManager

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
  • Kernel (java.awt.image)
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now