@Override protected IVertex addVertex(final DeployedOperation deployedOperation) { final OperationType operation = deployedOperation.getAssemblyOperation().getOperationType(); final ComponentType component = operation.getComponentType(); final int componentId = this.identifierRegistry.getIdentifier(component); final IVertex componentVertex = this.graph.addVertexIfAbsent(componentId); componentVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.COMPONENT_TYPE); componentVertex.setPropertyIfAbsent(PropertyKeys.NAME, component.getName()); componentVertex.setPropertyIfAbsent(PropertyKeys.PACKAGE_NAME, component.getPackage()); this.responseTimeDecorator.decorate(componentVertex, component); return componentVertex; }
@Override protected IVertex addVertex(final DeployedOperation deployedOperation) { final OperationType operation = deployedOperation.getAssemblyOperation().getOperationType(); final ComponentType component = operation.getComponentType(); final int componentId = this.identifierRegistry.getIdentifier(component); final IVertex componentVertex = this.graph.addVertexIfAbsent(componentId); componentVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.COMPONENT_TYPE); componentVertex.setPropertyIfAbsent(PropertyKeys.NAME, component.getName()); componentVertex.setPropertyIfAbsent(PropertyKeys.PACKAGE_NAME, component.getPackage()); final IGraph componentSubgraph = componentVertex.addChildGraphIfAbsent(); final int operationId = this.identifierRegistry.getIdentifier(operation); final IVertex operationVertex = componentSubgraph.addVertexIfAbsent(operationId); operationVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.OPERATION_TYPE); operationVertex.setPropertyIfAbsent(PropertyKeys.NAME, operation.getName()); operationVertex.setPropertyIfAbsent(PropertyKeys.RETURN_TYPE, operation.getReturnType()); operationVertex.setPropertyIfAbsent(PropertyKeys.MODIFIERS, operation.getModifiers()); operationVertex.setPropertyIfAbsent(PropertyKeys.PARAMETER_TYPES, operation.getParameterTypes()); this.responseTimeDecorator.decorate(operationVertex, operation); return operationVertex; }
private IVertex addVertex(final OperationCall operationCall) { final int vertexId = this.objectIdentifierRegistry.getIdentifier(operationCall); final IVertex vertex = this.graph.addVertex(vertexId); final OperationType operationType = operationCall.getOperation().getAssemblyOperation().getOperationType(); final ComponentType componentType = operationType.getComponentType(); final DeploymentContext deploymentContext = operationCall.getOperation().getComponent().getDeploymentContext(); vertex.setProperty("name", operationType.getName()); vertex.setProperty("returnType", operationType.getReturnType()); vertex.setProperty("modifiers", operationType.getModifiers()); vertex.setProperty("parameterTypes", operationType.getParameterTypes()); vertex.setProperty("component", componentType.getName()); vertex.setProperty("package", componentType.getPackage()); vertex.setProperty("deploymentContext", deploymentContext.getName()); vertex.setProperty("stackDepth", operationCall.getStackDepth()); // ... maybe further parameters return vertex; }