Tabnine Logo
GraphEntity.getAllRelationships
Code IndexAdd Tabnine to your IDE (free)

How to use
getAllRelationships
method
in
ingenias.generator.browser.GraphEntity

Best Java code snippets using ingenias.generator.browser.GraphEntity.getAllRelationships (Showing top 15 results out of 315)

origin: net.sf.phat/phat-generator

public static GraphRelationship[] getRelatedElementsRels(
    GraphEntity element, String relationshipname) {
  Vector rels = element.getAllRelationships();
  Enumeration enumeration = rels.elements();
  Vector related = new Vector();
  while (enumeration.hasMoreElements()) {
    GraphRelationship gr = (GraphRelationship) enumeration
        .nextElement();
    if (gr.getType().toLowerCase()
        .equals(relationshipname.toLowerCase())) {
      related.add(gr);
    }
  }
  return toGRArray(related.toArray());
}
origin: net.sf.phat/phat-generator

Vector rels = element.getAllRelationships();
Enumeration enumeration = rels.elements();
Vector<GraphRole> related = new Vector<GraphRole>();
origin: net.sf.phat/phat-generator

  GraphEntity agent, String relationshipname, String role)
  throws NullEntity {
Vector rels = agent.getAllRelationships();
Enumeration enumeration = rels.elements();
Vector related = new Vector();
origin: net.sf.phat/phat-generator

Vector rels = element.getAllRelationships();
Enumeration enumeration = rels.elements();
Vector related = new Vector();
origin: net.sf.phat/phat-generator

Vector rels = element.getAllRelationships();
Enumeration enumeration = rels.elements();
Vector related = new Vector();
origin: net.sf.phat/phat-generator

Vector rels = element.getAllRelationships();
Enumeration enumeration = rels.elements();
Hashtable related = new Hashtable();
origin: net.sf.phat/phat-generator

Vector rels = element.getAllRelationships();
Enumeration enumeration = rels.elements();
Vector related = new Vector();
origin: net.sf.phat/phat-generator

Vector rels = element.getAllRelationships();
Enumeration enumeration = rels.elements();
Vector related = new Vector();
origin: net.sf.phat/phat-generator

  public static GraphEntity getADL(String humanId, Browser browser) {
    GraphEntity result = null;
    try {
      GraphEntity[] entities = browser.getAllEntities();
      for (GraphEntity adl : entities) {
        if (adl.getType().equalsIgnoreCase(ADLProfile_SPEC_DIAGRAM)) {
          Vector<GraphRelationship> rels = adl.getAllRelationships("ProfileOf");
          for (GraphRelationship rel : rels) {
            GraphEntity connectedHuman = Utils.getTargetEntity(adl, rel);
            if (connectedHuman != null && connectedHuman.getID().equalsIgnoreCase(humanId)) {
              return adl;
            }
          }
        }
      }
    } catch (Throwable ex) {
      ex.printStackTrace();
    }
    return result;
  }
}
origin: net.sf.ingenias/editor

differences.addAll(fieldDifferences);
if (!fieldDifferences.isEmpty()){
  Vector<GraphRelationship> relationships1 = ent1.getAllRelationships();
  Vector<GraphRelationship> relationships2 = ent2.getAllRelationships();
  int j=0;
  allIncluded=allIncluded && relationships1.size()==relationships2.size();
origin: net.sf.phat/phat-generator

Vector rels = element.getAllRelationships();
Enumeration enumeration = rels.elements();
Vector related = new Vector();
origin: net.sf.ingenias/editor

public static boolean containedInto(Browser bimp1, Browser bimp2){
  GraphEntity[] entities = bimp1.getAllEntities();
  boolean allIncluded=true;
  int k=0;
  while (allIncluded && k<entities.length){
    GraphEntity ent1 = entities[k];
    GraphEntity ent2 = bimp2.findEntity(ent1.getID());
    allIncluded=allIncluded && ent2!=null;            
    allIncluded = allIncluded &&  containedIntoAttributes(allIncluded, ent1, ent2);            
    Vector<GraphRelationship> relationships1 = ent1.getAllRelationships();
    Vector<GraphRelationship> relationships2 = ent2.getAllRelationships();
    int j=0;
    allIncluded=allIncluded && relationships1.size()==relationships2.size();
    while (allIncluded && j<relationships1.size()){
      GraphRelationship gr1=relationships1.elementAt(j);
      boolean found=false;
      for (int l=0;l<relationships2.size() && !found;l++){
        GraphRelationship gr2=relationships2.elementAt(l);
        found=found || (gr2.getID().equals(gr1.getID()) && 
            containedIntoAttributes(allIncluded, gr1, gr2));
      }
      allIncluded=allIncluded && found;
      j++;    
    }            
    k++;
  }        
  return allIncluded;		
}
origin: net.sf.phat/phat-generator

  GraphEntity element, String relationshipname, String role)
  throws NullEntity {
Vector rels = element.getAllRelationships();
Enumeration enumeration = rels.elements();
Vector related = new Vector();
origin: net.sf.phat/phat-generator

private Vector<Graph> getPDDiagramsForActor(GraphEntity actor) {
  Vector<Graph> patientGraphs = new Vector<Graph>();
  Vector<GraphRelationship> rels = actor.getAllRelationships("ProfileOf");
  for (GraphRelationship rel : rels) {
    GraphEntity target;
    try {
      target = Utils.getSourceEntity(actor, rel);
      if (target.getType().equals("ParkinsonsProfile")) {
        GraphAttribute diagNameAtt = target.getAttributeByName("ParkinsonSpecDiag");
        if (diagNameAtt != null && diagNameAtt.getSimpleValue() != null
            && browser.getGraph(diagNameAtt.getSimpleValue()) != null) {
          patientGraphs.add(browser.getGraph(diagNameAtt.getSimpleValue()));
        }
      }
    } catch (NotFound e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
  return patientGraphs;
}
origin: net.sf.ingenias/editor

  public void actionPerformed(ActionEvent e) {
    Log.getInstance().logERROR("Replacing");
    try {
      Vector<GraphRelationship> rels = 
          browser.findEntity(ent.getId()).getAllRelationships();
      Entity newent = ConvertUtils.convert(state,ent.getId(), ent.getType(),
          current);
      for (int j=0;j<rels.size();j++){
        ((GraphRelationshipImp)rels.elementAt(j)).getNAryEdge().replace(ent.getId(),newent);
      }
      Vector<ModelJGraph> models = state.gm.getUOModels();
      for (int j=0;j<models.size();j++){
        GraphModel mjg = models.elementAt(j).getModel();
        for (int l=0;l<mjg.getRootCount();l++){
          if (((DefaultGraphCell)mjg.getRootAt(l)).getUserObject().equals(ent)){
            ((DefaultGraphCell)mjg.getRootAt(l)).setUserObject(newent);
            Log.getInstance().logERROR("Replaced in model "+models.elementAt(j).getName());
          }
        }
      }
    }
    catch (Exception e1) {
      e1.printStackTrace();
      Log.getInstance().log(e1.getMessage());
    }
  }
});
ingenias.generator.browserGraphEntitygetAllRelationships

Popular methods of GraphEntity

  • getID
  • getType
  • getAllAttrs
  • getAttributeByName
  • getRelationships

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Top Sublime Text plugins
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