/** * Utility function to create a textual container ID for an assembly component. * * @param component * The assembly component to create the ID for * @return The created ID */ protected static String createAssemblyComponentId(final AssemblyComponent component) { return COMPONENT_NODE_ID_PREFIX + component.getId(); }
@Override public String toString() { return +this.assemblyComponent.getId() + ":" + this.operation.getId() + "@" + this.id; }
/** * Returns a corresponding pair instance (existing or newly created). * * @param assemblyComponent * The assemble component for the pair. * @param operation * The operation for the pair. * * @return The corresponding pair instance if it exists, otherwise a new one. */ public final AssemblyComponentOperationPair getPairInstanceByPair(final AssemblyComponent assemblyComponent, final Operation operation) { final String namedIdentifier = assemblyComponent.getId() + "-" + operation.getId(); final AssemblyComponentOperationPair inst = this.getPairByNamedIdentifier(namedIdentifier); if (inst == null) { return this.createAndRegisterPair(namedIdentifier, operation, assemblyComponent); } return inst; }
final AssemblyComponent senderComponent = me.getSendingExecution().getAllocationComponent().getAssemblyComponent(); final AssemblyComponent receiverComponent = me.getReceivingExecution().getAllocationComponent().getAssemblyComponent(); if (!plottedComponentIds.contains(senderComponent.getId())) { ps.print("object(O" + senderComponent.getId() + ",\"\",\"" + SequenceDiagramFilter.assemblyComponentLabel(senderComponent, shortLabels) + "\");" + "\n"); plottedComponentIds.add(senderComponent.getId()); if (!plottedComponentIds.contains(receiverComponent.getId())) { ps.print("object(O" + receiverComponent.getId() + ",\"\",\"" + SequenceDiagramFilter.assemblyComponentLabel(receiverComponent, shortLabels) + "\");" + "\n"); plottedComponentIds.add(receiverComponent.getId()); final AssemblyComponent senderComponent = me.getSendingExecution().getAllocationComponent().getAssemblyComponent(); final AssemblyComponent receiverComponent = me.getReceivingExecution().getAllocationComponent().getAssemblyComponent(); senderDotId = "O" + senderComponent.getId(); receiverDotId = "O" + receiverComponent.getId(); } else { // needs to be adjusted if a new mode is introduced AbstractAnalysisComponent.LOGGER.error("Invalid mode: {}", sdMode);
AbstractDependencyGraphFormatter.createNodeId(assemblyComponent.getId()), assemblyComponent.getName(), DotFactory.DOT_SHAPE_NONE,
/** * Checks whether the given executions are equal or not. * * @param r1 * The first execution object. * @param r2 * The second execution object. * * @return true if and only if the executions have the same values. */ private boolean executionsEqual(final Execution r1, final Execution r2) { if (r1 == r2) { // NOPMD (no equals) return true; } if ((r1 == null) || (r2 == null)) { return false; } return (r1.getAllocationComponent().getAssemblyComponent().getId() == r2.getAllocationComponent().getAssemblyComponent().getId()) && (r1.getOperation().getId() == r2.getOperation().getId()) && (r1.getEoi() == r2.getEoi()) && (r1.getEss() == r2.getEss()); }
/** * Creates a new instance of this class using the given parameters. * * @param t * The execution trace to be stored in this container. */ public ExecutionTraceHashContainerAssemblyEquivalence(final ExecutionTrace t) { super(t); final int prime = 31; int result = 1; for (final Execution r : t.getTraceAsSortedExecutionSet()) { result = (prime * result) + r.getOperation().getId(); result = (prime * result) + r.getAllocationComponent().getAssemblyComponent().getId(); result = (prime * result) + r.getEoi(); result = (prime * result) + r.getEss(); } // this.hashCodeBuffer = result; }
for (final AssemblyComponent ac : assemblyComponents) { final String[] cells = new String[] { this.htmlEntityLabel(ac.getId(), Integer.toString(ac.getId()), EntityType.ASSEMBLY_COMPONENT), ac.getName(), this.htmlEntityRef(ac.getType().getId(), SystemModelRepository.simpleHTMLEscape(ac.getType().getFullQualifiedName()), EntityType.COMPONENT_TYPE), }; this.htmlEntityLabel(allocationComponent.getId(), Integer.toString(allocationComponent.getId()), EntityType.ALLOCATION_COMPONENT), this.htmlEntityRef(allocationComponent.getAssemblyComponent().getId(), SystemModelRepository.simpleHTMLEscape(allocationComponent.getAssemblyComponent().toString()), EntityType.ALLOCATION_COMPONENT),
DependencyGraphNode<AssemblyComponent> senderNode = this.getGraph().getNode(senderComponent.getId()); DependencyGraphNode<AssemblyComponent> receiverNode = this.getGraph().getNode(receiverComponent.getId()); if (senderNode == null) { senderNode = new DependencyGraphNode<>(senderComponent.getId(), senderComponent, t.getTraceInformation(), this.getOriginRetentionPolicy()); receiverNode = new DependencyGraphNode<>(receiverComponent.getId(), receiverComponent, t.getTraceInformation(), this.getOriginRetentionPolicy());