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);
}
Aggregations