@Override protected AlignmentAnalyzerParametersImpl parseParameters() throws UserError, IOException { AlignmentAnalyzerParametersImpl params = super.parseParameters(); params.setMaxNumberOfStates(getParameterAsInt(PARAMETER_KEY_MAX_STATE_SPACE)); params.setTimeoutMili(getParameterAsInt(PARAMETER_KEY_TIMEOUT)); return params; }
@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)); }