Codota Logo
GraphRelationship.getRoles
Code IndexAdd Codota to your IDE (free)

How to use
getRoles
method
in
ingenias.generator.browser.GraphRelationship

Best Java code snippets using ingenias.generator.browser.GraphRelationship.getRoles (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: net.sf.phat/phat-generator

public static Vector<GraphRole> getRolesFromRelationship(
    GraphRelationship rel, String role) {
  Vector<GraphRole> related = new Vector<GraphRole>();
  GraphRole[] roles = rel.getRoles();
  for (int k = 0; k < roles.length; k++) {
    if (roles[k].getName().toLowerCase().equals(role.toLowerCase())) {
      related.add(roles[k]);
    }
  }
  return related;
}
origin: net.sf.phat/phat-generator

public static Vector<GraphEntity> getRelatedElementsVectorInSameDiagram(
    GraphEntity agent, String relationshipname, String role)
    throws NullEntity {
  GraphRelationship[] rels = agent.getRelationships();
  Vector related = new Vector();
  for (GraphRelationship gr : rels) {
    if (gr.getType().toLowerCase()
        .equals(relationshipname.toLowerCase())) {
      GraphRole[] roles = gr.getRoles();
      for (int k = 0; k < roles.length; k++) {
        if (roles[k].getName().toLowerCase()
            .equals(role.toLowerCase())) {
          related.add(roles[k].getPlayer());
        }
      }
    }
  }
  return new Vector(new HashSet(related));
}
origin: net.sf.phat/phat-generator

if (gr.getType().toLowerCase()
    .equals(relationshipname.toLowerCase())) {
  GraphRole[] roles = gr.getRoles();
  for (int k = 0; k < roles.length; k++) {
    if (roles[k].getName().toLowerCase()
origin: net.sf.phat/phat-generator

if (gr.getType().toLowerCase()
    .equals(relationshipname.toLowerCase())) {
  GraphRole[] roles = gr.getRoles();
  for (int k = 0; k < roles.length; k++) {
    if (roles[k].getName().toLowerCase()
origin: net.sf.phat/phat-generator

if (gr.getType().toLowerCase()
    .equals(relationshipname.toLowerCase())) {
  GraphRole[] roles = gr.getRoles();
  for (int k = 0; k < roles.length; k++) {
    if (roles[k].getName().toLowerCase()
origin: net.sf.phat/phat-generator

if (gr.getType().toLowerCase()
    .equals(relationshipname.toLowerCase())) {
  GraphRole[] roles = gr.getRoles();
  for (int k = 0; k < roles.length; k++) {
    if (roles[k].getName().toLowerCase()
origin: net.sf.phat/phat-generator

if (gr.getType().toLowerCase()
    .equals(relationshipname.toLowerCase())) {
  GraphRole[] roles = gr.getRoles();
  for (int k = 0; k < roles.length; k++) {
    if (roles[k].getName().toLowerCase()
origin: net.sf.phat/phat-generator

if (gr.getType().toLowerCase()
    .equals(relationshipname.toLowerCase())) {
  GraphRole[] roles = gr.getRoles();
  for (int k = 0; k < roles.length; k++) {
    if (roles[k].getName().toLowerCase()
origin: net.sf.phat/phat-generator

public static boolean isTargetOfAnyRelationship(GraphEntity ge)
    throws NullEntity {
  for (GraphRelationship gr : ge.getRelationships()) {
    for (GraphRole gRole : gr.getRoles()) {
      if (gRole.getPlayer().getID().equals(ge.getID())
          && gRole.getName().endsWith("target")) {
        return true;
      }
    }
  }
  return false;
}
origin: net.sf.phat/phat-generator

if (gr.getType().toLowerCase()
    .equals(relationshipname.toLowerCase())) {
  GraphRole[] roles = gr.getRoles();
  for (int k = 0; k < roles.length; k++) {
origin: net.sf.phat/phat-generator

if (gr.getType().toLowerCase()
    .equals(relationshipname.toLowerCase())) {
  GraphRole[] roles = gr.getRoles();
  for (int k = 0; k < roles.length; k++) {
    if (roles[k].getName().toLowerCase()
origin: net.sf.phat/phat-generator

  && gr.getType().toLowerCase()
  .equals(relationshipname.toLowerCase())) {
GraphRole[] roles = gr.getRoles();
for (int k = 0; k < roles.length; k++) {
  if (roles[k].getName().toLowerCase()
origin: net.sf.phat/phat-generator

public static GraphEntity getTargetEntity(GraphEntity ge, GraphRelationship gr)
    throws NullEntity {
  GraphRole gRole = getTargetRole(gr.getRoles());
  System.out.println("Roles:");
  for (GraphRole r : gr.getRoles()) {
    System.out.println("-" + r.getName() + "->" + r.getPlayer().getID());
  }
  System.out.println("gRole = " + gRole.getPlayer().getID());
  if (gRole != null && !gRole.getPlayer().getID().equals(ge.getID())) {
    return gRole.getPlayer();
  }
  return null;
}
origin: net.sf.phat/phat-generator

public static Collection<GraphEntity> getTargetsEntity(GraphEntity ge, String relationType) {
  List<GraphEntity> result = new ArrayList<>();
  try {
    for (GraphRelationship gr : ge.getRelationships()) {
      if (gr.getType().equals(relationType)) {
        for (GraphRole gRole : getTargetsRole(gr.getRoles())) {
          if (gRole != null && gRole.getPlayer().getID() != ge.getID()) {
            result.add(gRole.getPlayer());
          }
        }
      }
    }
  } catch (Throwable ex) {
    ex.printStackTrace();
  }
  return result;
}
origin: net.sf.phat/phat-generator

public static GraphEntity getTargetEntity(GraphEntity ge, String relationType, GraphRelationship[] rel) {
  try {
    for (GraphRelationship gr : rel) {
      if (gr.getType().equals(relationType)) {
        GraphRole sRole = getSourceRole(gr.getRoles());
        GraphRole gRole = getTargetRole(gr.getRoles());
        if (sRole != null && sRole.getPlayer().getID().equals(ge.getID())
            && gRole != null && !gRole.getPlayer().getID().equals(ge.getID())) {
          return gRole.getPlayer();
        }
      }
    }
  } catch (Throwable ex) {
    ex.printStackTrace();
  }
  return null;
}
origin: net.sf.phat/phat-generator

public static Collection<GraphEntity> getSourcesEntity(GraphEntity ge, String relationType) {
  List<GraphEntity> result = new ArrayList<GraphEntity>();
  try {
    for (GraphRelationship gr : ge.getRelationships()) {
      if (gr.getType().equals(relationType)) {
        for (GraphRole gRole : getSourcesRole(gr.getRoles())) {
          if (gRole != null && gRole.getPlayer().getID() != ge.getID()) {
            result.add(gRole.getPlayer());
          }
        }
      }
    }
  } catch (Throwable ex) {
    ex.printStackTrace();
  }
  return result;
}
origin: net.sf.phat/phat-generator

public static GraphEntity getSourceEntity(GraphEntity ge, GraphRelationship gr) {
  GraphRole gRole = getSourceRole(gr.getRoles());
  try {
    if (gRole != null && gRole.getPlayer().getID() != ge.getID()) {
      return gRole.getPlayer();
    }
  } catch (NullEntity e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  }
  return null;
}
origin: net.sf.phat/phat-generator

GraphEntity target = null;
System.out.println("\trel=" + progTrans.getID() + ":" + progTrans.getType());
for (GraphRole gRole : progTrans.getRoles()) {
  System.out.println("\t\trole="
      + gRole.getID() + ":"
origin: net.sf.phat/phat-generator

GraphEntity target = null;
System.out.println("\trel=" + gr.getID() + ":" + gr.getType());
for (GraphRole gRole : gr.getRoles()) {
  System.out.println("\t\trole=" + gRole.getID() + ":" + gRole.getName()
      + ":" + gRole.getPlayer().getID() + ":" + gRole.getPlayer().getType());
origin: net.sf.ingenias/htmldoc

GraphRole[] groles = gr[i].getRoles();
for (int h = 0; h < groles.length; h++) {
  Repeat rroles = new Repeat("roles");
ingenias.generator.browserGraphRelationshipgetRoles

Popular methods of GraphRelationship

  • getType
  • getID
  • getGraph

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • JButton (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