/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated NOT */ public EList<ResourceNode> getActivityInput() { // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and // org.eclipse.emf.ecore.EStructuralFeature.Setting // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should // be used. EObjectEList<ResourceNode> resultSet = new EObjectEList<ResourceNode>( ResourceNode.class, this, FlowChartPackage.ACTIVITY_NODE__ACTIVITY_INPUT_OPT); for (DiagramArc arc : getIncoming()) { if (arc.getSrc() instanceof ResourceNode) { if (!arc.isOptional()) resultSet.add((ResourceNode) arc.getSrc()); } } return resultSet; }
public void translate() throws InvalidIDException, VoidRepositoryException { SplitNode node = this.getNode(); this.placeCount++; PlaceHLAPI pS = new PlaceHLAPI("p" + this.getPlaceCount()); pS.setNameHLAPI(new NameHLAPI(super.createPNMLLabel(node.getLabel() + "_start", 'p'))); pS.setContainerPageHLAPI(super.getPage()); List<PlaceHLAPI> start = new Vector<PlaceHLAPI>(); List<PlaceHLAPI> ends = new Vector<PlaceHLAPI>(); Hashtable<PlaceHLAPI, DiagramNode> otherEnds = new Hashtable<PlaceHLAPI, DiagramNode>(); start.add(pS); // add a transition and an EndPlace for every outgoing Edge for (DiagramArc arc : node.getOutgoing()) { this.transCount++; TransitionHLAPI t = new TransitionHLAPI("t" + this.getTransCount()); String name = ""; if (arc.getLabel().equals("") || arc.getLabel() == null) name = ""; else name = arc.getLabel(); t.setNameHLAPI(new NameHLAPI(super.createPNMLLabel(name, 't'))); t.setContainerPageHLAPI(super.getPage()); this.arcCount++; new ArcHLAPI("a" + this.getArcCount(), pS, t, page); this.placeCount++; PlaceHLAPI pE = new PlaceHLAPI("p" + this.getPlaceCount()); pE.setContainerPageHLAPI(super.getPage()); this.arcCount++; new ArcHLAPI("a" + this.getArcCount(), t, pE, page); ends.add(pE); otherEnds.put(pE, arc.getTarget()); } this.setPair(new NodePair(start, ends)); this.getPair().setOtherEnds(otherEnds); if (node.getIncoming().size() > 1) { this.getPair().removeStart(pS); super.addInterfaceIn(pS); } else if (node.getIncoming().size() > 0) this.getPair().setOtherEnd(pS, node.getIncoming().get(0).getSrc()); super.getTable().put(node, this.getPair()); }