@Override public void doWork() throws OperatorException { AlignmentAnalyzerParametersImpl params; try { params = parseParameters(); } catch (IOException e) { throw new OperatorException(e.getMessage()); } PluginContext context = ProMPluginContextManager.instance() .getFutureResultAwareContext(AlignmentAPNAnalyzerPlugin.class); XSEventStream stream = getStreamPort().getData(XSEventStreamIOObject.class).getArtifact(); XLogArray arr = new XLogArray(); for (InputPort i : referenceLogsPort.getManagedPorts()) { try { arr.add(i.getData(XLogIOObject.class).getArtifact()); } catch (UserError e) { } } // TODO: use meta-data to process classifiers! List<XEventClassifier> classifiers = fetchClassifiers(arr); params.setClassifier(classifiers.get(0)); List<XSEventStreamToAcceptingPetriNetReader> algos = new ArrayList<XSEventStreamToAcceptingPetriNetReader>(); for (InputPort i : getAlgorithmsPort().getManagedPorts()) { try { algos.add( (XSEventStreamToAcceptingPetriNetReader) i.getData(XSEventStreamToAcceptingPetriNetReaderIOObject.class).getArtifact()); } catch (UserError e) { } } XSStreamAnalyzer< XSEvent, Map<XSReader<XSEvent, AcceptingPetriNet>, Map<Long, Iterable<Iterable<Double>>>>, AcceptingPetriNet> analyzer = AlignmentAPNAnalyzerPlugin.run( context, stream, arr, params, algos.toArray(new XSEventStreamToAcceptingPetriNetReader[algos.size()])); getAnalyzerPort() .deliver( new XSStreamAnalyzerIOObject< XSEvent, Map<XSReader<XSEvent, AcceptingPetriNet>, Map<Long, Iterable<Iterable<Double>>>>, AcceptingPetriNet>(analyzer, context)); }
public AlignmentAPNAnalyzerOperator(OperatorDescription description) { super(description, new AlignmentAnalyzerParametersImpl()); referenceLogsPort.start(); }