Codota Logo
Browser.getAllEntities
Code IndexAdd Codota to your IDE (free)

How to use
getAllEntities
method
in
ingenias.generator.browser.Browser

Best Java code snippets using ingenias.generator.browser.Browser.getAllEntities (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: net.sf.phat/phat-generator

public static List<GraphEntity> getEntities(Browser b, String typeName) {
  List<GraphEntity> result = new ArrayList<GraphEntity>();
  
  for(GraphEntity ge: b.getAllEntities()) {
    if(ge.getType().equals(typeName)) {
      result.add(ge);
    }
  }
  return result;
}
origin: net.sf.phat/phat-generator

public static boolean hasAnyEntity(Browser b, String typeName) {
  boolean result = false;
  
  for(GraphEntity ge: b.getAllEntities()) {
    if(ge.getType().equals(typeName)) {
      result = true;
      break;
    }
  }
  return result;
}

origin: net.sf.phat/phat-generator

public static Vector<GraphEntity> getProfilesTypeOf(String humanId, String profileType, Browser browser) {
  Vector<GraphEntity> result = new Vector<GraphEntity>();
  try {
    GraphEntity[] entities = browser.getAllEntities();
    for (GraphEntity adl : entities) {
      if (adl.getType().equalsIgnoreCase(profileType)) {
        GraphEntity human = Utils.getTargetEntity(adl, "ProfileOf");
        if (human != null && human.getID().equals(humanId)) {
          result.add(adl);
        }
      }
    }
  } catch (Throwable ex) {
    ex.printStackTrace();
  }
  return result;
}
origin: net.sf.phat/phat-generator

public static GraphEntity getProfileTypeOf(String humanId, String profileType, Browser browser) {
  GraphEntity result = null;
  try {
    GraphEntity[] entities = browser.getAllEntities();
    for (GraphEntity adl : entities) {
      if (adl.getType().equalsIgnoreCase(profileType)) {
        GraphEntity human = Utils.getTargetEntity(adl, "ProfileOf");
        if (human != null && human.getID().equals(humanId)) {
          return adl;
        }
      }
    }
  } catch (Throwable ex) {
    ex.printStackTrace();
  }
  return result;
}
origin: net.sf.phat/phat-generator

/**
 * It obtains all entities in the specification whose type represented as
 * string is the same as the string passed as parameter
 *
 * @param type The type the application is looking for
 * @return
 * @throws NotInitialised
 */
public static GraphEntity[] generateEntitiesOfType(String type,
    Browser browser) throws NotInitialised {
  Graph[] gs = browser.getGraphs();
  Sequences p = new Sequences();
  GraphEntity[] ges = browser.getAllEntities();
  HashSet actors = new HashSet();
  for (int k = 0; k < ges.length; k++) {
    if (ges[k].getType().equals(type)) {
      actors.add(ges[k]);
    }
  }
  return toGEArray(actors.toArray());
}
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

public static Vector<String> findAllDifferences(Browser bimp1, Browser bimp2){
  GraphEntity[] entities = bimp1.getAllEntities();
  boolean allIncluded=true;
  Vector<String> differences=new Vector<String>();
  int k=0;
  while (k<entities.length){
    GraphEntity ent1 = entities[k];
    GraphEntity ent2 = bimp2.findEntity(ent1.getID());
    allIncluded=allIncluded && ent2!=null;
    if (ent2==null){
      differences.add("entity "+ent1.getID()+":"+ent1.getType()+" does not exist");
    } else {
      differences.addAll(checkEntity(ent1, ent2, new Vector()));
    }
    k++;
  }        
  return differences;		
}
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

public void generateActivityClasses(Sequences seq) throws NullEntity,
    NotFound {
  for (GraphEntity ge : browser.getAllEntities()) {
    if (ge.getType().equals(ACTIVITY_TYPE)) {
      GraphAttribute ga = ge
          .getAttributeByName(SEQ_TASK_DIAGRAM_FIELD);
      if (ga != null) {
        String actDiagId = Utils.replaceBadChars(ga.getSimpleValue());
        if (actDiagId != null && !actDiagId.equals("")) {
          Repeat rep = new Repeat("activities");
          seq.addRepeat(rep);
          rep.add(new Var("aID", Utils.replaceBadChars(ge.getID())));
          rep.add(new Var("aType", Utils.replaceBadChars(ge.getType())));
          rep.add(new Var("aDesc", Utils.getAttributeByName(ge, "Description")));
          rep.add(new Var("stID", Utils.replaceBadChars(actDiagId)));
          continue;
        }
      }
      logger.log(Level.SEVERE, "The {0} activity doesn't have sequential task diagram!",
          new Object[]{ge.getID()});
      System.exit(0);
    }
  }
}
origin: net.sf.phat/phat-generator

new SymptomEvolutionGenerator(browser).generateFSMSymptomEvolutionClasses(seq);
new SimulationGenerator(browser).generateSimulations(seq);
GraphEntity[] entities = browser.getAllEntities();
Vector<String> errors = new Vector<String>();
for (GraphEntity norm : entities) {
ingenias.generator.browserBrowsergetAllEntities

Javadoc

Obtains all the entities defined in all diagrams. This array of entities show no duplicates

Popular methods of Browser

  • getGraphs
    Obtains all existing diagrams in the specification.
  • getState
    It obtains the internal descriptors associated with the editor
  • findEntity
    It locates the entity whose id is "id" in the whole specification. If no entity is found, it returns
  • getGraph
    Obtains a graph with a concrete id. If there is no any, it returns null

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • String (java.lang)
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ImageIO (javax.imageio)
  • JTextField (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now