Examples of UmlAssociation


Examples of org.tinyuml.model.UmlAssociation

   * @return the association element
   */
  private UmlAssociation createAssociation(ElementType elemType,
    Attributes attributes) {
    int id = Integer.valueOf(attributes.getValue("id"));
    UmlAssociation assoc = (UmlAssociation) elementFactory.create(elemType);
    assoc.setName(attributes.getValue("name"));
    int sourceId = Integer.valueOf(attributes.getValue("source"));
    int targetId = Integer.valueOf(attributes.getValue("target"));
    assoc.setSource(elementMap.get(sourceId));
    assoc.setTarget(elementMap.get(targetId));
    elementMap.put(id, assoc);
    return assoc;
  }
View Full Code Here

Examples of org.tinyuml.model.UmlAssociation

    UmlModelElement target = (UmlModelElement) mockTarget.proxy();   
    assoc.setElement1(source);
    assoc.setElement2(target);
    assoc.setName("name");
   
    UmlAssociation cloned = (UmlAssociation) assoc.clone();
    assertEquals(assoc.getName(), cloned.getName());
    assertEquals(assoc.getElement1(), cloned.getElement1());
    assertEquals(assoc.getElement2(), cloned.getElement2());
  }
View Full Code Here

Examples of org.tinyuml.model.UmlAssociation

  /**
   * {@inheritDoc}
   */
  public Connection createDependency(Node sourceNode, Node targetNode) {
    UmlAssociation association = (UmlAssociation)
      modelElementFactory.create(ElementType.DEPENDENCY);
    association.setSource(sourceNode.getModelElement());
    association.setTarget(targetNode.getModelElement());
    Connection connection = new Dependency(association);
    connection.setNode0(sourceNode);
    connection.setNode1(targetNode);
    return connection;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.