public XESLogInfoProvider(LogViewViewer viewer) { switch (viewer.getModel().getType()) { case Aristaflow: try { AristaFlowParser parser = (AristaFlowParser) viewer.loadLogReader(); mActivities = new ArrayList<>(parser.getActivityCandidates()); mSubjects = new ArrayList<>(parser.getOriginatorCandidates()); } catch (ParseException | IOException | ParameterException | ParserException e) { throw new RuntimeException(e); } break; case MXML: case XES: try { ISciffLogSummary summary = viewer.loadLogReader().getSummary(); mActivities = new ArrayList<>(Arrays.asList(summary.getModelElements())); mSubjects = new ArrayList<>(Arrays.asList(summary.getOriginators())); mRoles = new ArrayList<>(Arrays.asList(summary.getRoles())); } catch (ParseException | IOException | ParameterException | ParserException e) { throw new RuntimeException(e); } default: break; } }
private void parseAsAFLog(File fileReference) { try { AristaFlowParser parser = new AristaFlowParser(fileReference); parser.parse(whichTimestamp.BOTH); mActivities = new ArrayList<>(parser.getActivityCandidates()); mSubjects = new ArrayList<>(parser.getOriginatorCandidates()); } catch (ParseException | IOException e) { throw new RuntimeException(e); } }
private boolean isAFlog(File xesLogFile) { return AristaFlowParser.canParse(xesLogFile); }