Esempio n. 1
0
  private void handleAssociationEnd(Attributes atts) {
    // get the most recently found association
    UMLAssociation assoc = assocList.get(assocList.size() - 1);
    // TODO: something with type?
    String type = atts.getValue(XMIConstants.XMI_TYPE_ATTRIBUTE);
    boolean isNavigable =
        "true".equals(atts.getValue(XMIConstants.XMI_UML_ASSOCIATION_IS_NAVIGABLE));

    edge = new UMLAssociationEdge();
    if (assoc.getSourceUMLAssociationEdge() == null) {
      assoc.setSourceUMLAssociationEdge(new UMLAssociationSourceUMLAssociationEdge(edge));
      sourceNavigable = isNavigable;
    } else {
      assoc.setTargetUMLAssociationEdge(new UMLAssociationTargetUMLAssociationEdge(edge));
      targetNavigable = isNavigable;
    }
    edge.setRoleName(atts.getValue(XMIConstants.XMI_NAME_ATTRIBUTE));
    edge.setUMLClassReference(new UMLClassReference());
  }