@Test public void testGetAssociationByDirection() { final Association association = Bpmn2Factory.eINSTANCE.createAssociation(); association.setAssociationDirection(null); propertyReader = new AssociationPropertyReader(association, bpmnDiagram, definitionResolver); assertEquals(NonDirectionalAssociation.class, propertyReader.getAssociationByDirection()); association.setAssociationDirection(AssociationDirection.NONE); assertEquals(NonDirectionalAssociation.class, propertyReader.getAssociationByDirection()); association.setAssociationDirection(AssociationDirection.ONE); assertEquals(DirectionalAssociation.class, propertyReader.getAssociationByDirection()); }
public Class getAssociationByDirection() { AssociationDirection d = association.getAssociationDirection(); if (!AssociationDirection.NONE.equals(d)) { return DirectionalAssociation.class; } return NonDirectionalAssociation.class; }
AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { public Class getAssociationByDirection() { AssociationDirection d = association.getAssociationDirection(); if (!AssociationDirection.NONE.equals(d)) { return DirectionalAssociation.class; } return NonDirectionalAssociation.class; } }
AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { public Class getAssociationByDirection() { AssociationDirection d = association.getAssociationDirection(); if (!AssociationDirection.NONE.equals(d)) { return DirectionalAssociation.class; } return NonDirectionalAssociation.class; } AssociationPropertyReader(Association association,
                                     BPMNDiagram diagram,
                                     DefinitionResolver definitionResolver); }
AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { public Class getAssociationByDirection() { AssociationDirection d = association.getAssociationDirection(); if (!AssociationDirection.NONE.equals(d)) { return DirectionalAssociation.class; } return NonDirectionalAssociation.class; } AssociationPropertyReader(Association association,
                                     BPMNDiagram diagram,
                                     DefinitionResolver definitionResolver); @Override String getSourceId(); @Override String getTargetId(); Class getAssociationByDirection(); @Override Connection getSourceConnection(); @Override Connection getTargetConnection(); @Override List<Point2D> getControlPoints(); @Override DefinitionResolver getDefinitionResolver(); }
AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { public Class getAssociationByDirection() { AssociationDirection d = association.getAssociationDirection(); if (!AssociationDirection.NONE.equals(d)) { return DirectionalAssociation.class; } return NonDirectionalAssociation.class; } AssociationPropertyReader(Association association,
                                     BPMNDiagram diagram,
                                     DefinitionResolver definitionResolver); @Override String getSourceId(); @Override String getTargetId(); Class getAssociationByDirection(); @Override Connection getSourceConnection(); @Override Connection getTargetConnection(); @Override List<Point2D> getControlPoints(); @Override DefinitionResolver getDefinitionResolver();  }