Search in sources :

Example 1 with PCMEntryCallEvent

use of org.iobserve.service.privacy.violation.data.PCMEntryCallEvent in project iobserve-analysis by research-iobserve.

the class EntryEventMapperStage method computePcmEntryCallEvent.

private void computePcmEntryCallEvent(final ComponentEntry componentEntry, final OperationEntry operationEntry, final AllocationEntry allocationEntry, final EntryCallEvent event) throws DBException {
    /**
     * retrieve PCM model elements from mapping.
     */
    final AllocationContext allocationContext = this.allocationResource.findObjectByTypeAndId(AllocationContext.class, AllocationPackage.Literals.ALLOCATION_CONTEXT, ModelGraphFactory.getIdentification(allocationEntry.getAllocation()));
    final OperationSignature operationSignature = this.repositoryResource.findAndLockObjectById(OperationSignature.class, RepositoryPackage.Literals.OPERATION_SIGNATURE, ModelGraphFactory.getIdentification(operationEntry.getOperation()));
    final RepositoryComponent component = this.repositoryResource.findObjectByTypeAndId(RepositoryComponent.class, RepositoryPackage.Literals.REPOSITORY_COMPONENT, ModelGraphFactory.getIdentification(componentEntry.getComponent()));
    /**
     * assembly is inferred from allocation.
     */
    final AssemblyContext assemblyContext = this.assemblyResource.findObjectByTypeAndId(AssemblyContext.class, CompositionPackage.Literals.ASSEMBLY_CONTEXT, ModelGraphFactory.getIdentification(allocationContext.getAssemblyContext_AllocationContext()));
    /**
     * assemble event.
     */
    final PCMEntryCallEvent mappedEvent = new PCMEntryCallEvent(event.getEntryTime(), event.getExitTime(), component, operationSignature, assemblyContext, allocationContext);
    this.outputPort.send(mappedEvent);
}
Also used : AllocationContext(org.palladiosimulator.pcm.allocation.AllocationContext) OperationSignature(org.palladiosimulator.pcm.repository.OperationSignature) PCMEntryCallEvent(org.iobserve.service.privacy.violation.data.PCMEntryCallEvent) AssemblyContext(org.palladiosimulator.pcm.core.composition.AssemblyContext) RepositoryComponent(org.palladiosimulator.pcm.repository.RepositoryComponent)

Aggregations

PCMEntryCallEvent (org.iobserve.service.privacy.violation.data.PCMEntryCallEvent)1 AllocationContext (org.palladiosimulator.pcm.allocation.AllocationContext)1 AssemblyContext (org.palladiosimulator.pcm.core.composition.AssemblyContext)1 OperationSignature (org.palladiosimulator.pcm.repository.OperationSignature)1 RepositoryComponent (org.palladiosimulator.pcm.repository.RepositoryComponent)1