Search in sources :

Example 1 with OperationEntry

use of org.iobserve.model.correspondence.OperationEntry in project iobserve-analysis by research-iobserve.

the class EntryEventMapperStage method execute.

@Override
protected void execute(final EntryCallEvent event) throws Exception {
    /**
     * retrieve mapping.
     */
    // TODO correct key names?
    final List<ComponentEntry> entries = this.correspondenceResource.findObjectsByTypeAndProperty(ComponentEntry.class, CorrespondencePackage.Literals.COMPONENT_ENTRY, "implementationId", event.getClassSignature());
    if (!entries.isEmpty()) {
        final ComponentEntry componentEntry = entries.get(0);
        final OperationEntry operationEntry = this.correspondenceResource.findObjectsByTypeAndProperty(OperationEntry.class, CorrespondencePackage.Literals.OPERATION_ENTRY, "implementationId", event.getOperationSignature()).get(0);
        if (operationEntry != null) {
            final AllocationEntry allocationEntry = this.correspondenceResource.findObjectsByTypeAndProperty(AllocationEntry.class, CorrespondencePackage.Literals.ALLOCATION_ENTRY, "implementationId", event.getHostname()).get(0);
            if (allocationEntry != null) {
                this.computePcmEntryCallEvent(componentEntry, operationEntry, allocationEntry, event);
            } else {
                this.logger.debug("No corresponding allocation for entry call {}", event.toString());
            }
        } else {
            this.logger.debug("No corresponding component for entry call {}", event.toString());
        }
    } else {
        this.logger.debug("No corresponding component for entry call {}", event.toString());
    }
}
Also used : AllocationEntry(org.iobserve.model.correspondence.AllocationEntry) ComponentEntry(org.iobserve.model.correspondence.ComponentEntry) OperationEntry(org.iobserve.model.correspondence.OperationEntry)

Aggregations

AllocationEntry (org.iobserve.model.correspondence.AllocationEntry)1 ComponentEntry (org.iobserve.model.correspondence.ComponentEntry)1 OperationEntry (org.iobserve.model.correspondence.OperationEntry)1