本文整理汇总了Java中org.deckfour.xes.model.XLog类的典型用法代码示例。如果您正苦于以下问题:Java XLog类的具体用法?Java XLog怎么用?Java XLog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XLog类属于org.deckfour.xes.model包,在下文中一共展示了XLog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: extractXESLog
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
/**
* Generates XES log based on the given inputs, namely:
* Domain Ontology, OBDA Model, and annotation information
*
* @author Ario Santoso ([email protected] / [email protected])
* @param domainOntology
* @param obdaModel
* @param annotation
* @return event log - XLog
* @throws InvalidDataSourcesNumberException
* @throws OWLException
* @throws InvalidAnnotationException
* @throws XESLogExtractionFailureException
* @deprecated this one is only maintained for backward compatibility with the other OnProm plug in, at some point it should be removed
*/
@Deprecated
public static XLog extractXESLog(OWLOntology domainOntology, OBDAModel obdaModel, AnnotationQueries annotation)
throws InvalidDataSourcesNumberException, InvalidAnnotationException, OWLException, XESLogExtractionFailureException, OBDAException, MalformedQueryException{
List<OBDADataSource> odsList = obdaModel.getSources();
if(odsList.size() > 1)
throw new InvalidDataSourcesNumberException(odsList.size());
//Construct EBDA Model
logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Start constucting an EBDA Model"));
LEObjectFactory leFact = LEObjectFactory.getInstance();
EBDAModelNaiveImpl ebdaModel = leFact.createEBDAModelNaiveImpl();
//add data source information to the EBDA Model
ebdaModel.addSource(odsList.get(0));
logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Construct the mappings for the EBDA Model"));
//add new mapping based on the annotation information
ebdaModel.addMapping(domainOntology, obdaModel, annotation);
logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Finish constucting an EBDA Model"));
return extractXESLog(ebdaModel);
}
示例2: getXESLog17
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
/**
*
* Generates XES log based on the given particular OBDA model that connects a
* Database to the Event Ontology (i.e., EBDA).
*
* @author Ario Santoso ([email protected] / [email protected])
* @param ebdaModel - an Event OBDA model (i.e., a particular OBDA model) that
* connects a Database to the Event Ontology
* @return event log - XLog
* @throws OWLException
*/
public XLog getXESLog17(EBDAModelWithOptimizedXAttributesEncoding ebdaModel) throws XESLogExtractionFailureException{
logger.info(String.format(
LEConstants.LOG_INFO_TEMPLATE, "Start extracting XES Log from the EBDA Model"));
EBDAReasonerImplWithParallelProcessing ebdaR = new EBDAReasonerImplWithParallelProcessing(ebdaModel);
ebdaR.setExecutionLogListener(this);
try{
//Create XLogOnProm
XLogOnProm xlog = ebdaR.extractXLog();
if(xlog == null)
throw new XESLogExtractionFailureException(LEConstants.MSG_LOG_CREATION_FAILURE);
logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Finish extracting XES Log from the EBDA Model"));
//return the log
return xlog;
} catch (OWLException e) {
e.printStackTrace();
throw new XESLogExtractionFailureException();
}
}
示例3: extractOnPromXESLogUsingParallelAndOptimizedXAttributesProcessing
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
/**
*
* Generates XES log based on the given particular OBDA model that connects a
* Database to the Event Ontology (i.e., EBDA).
*
* <br /><br />
* Feature(s)/Note(s):
* <ul>
* <li>It encodes/extracts the XAttributes information (i.e., key, type, values) in/from the Attributes URI</li>
* <li>It must use EBDAModelWithOptimizedXAttributesEncoding</li>
* <li>It runs some tasks in parallel</li>
* </ul>
*
* @author Ario Santoso ([email protected] / [email protected])
* @param ebdaModel - an Event OBDA model (i.e., a particular OBDA model) that
* connects a Database to the Event Ontology
* @return event log - XLog
* @throws OWLException
*/
public XLog extractOnPromXESLogUsingParallelAndOptimizedXAttributesProcessing(EBDAModelWithOptimizedXAttributesEncoding ebdaModel) throws XESLogExtractionFailureException{
logger.info(String.format(
LEConstants.LOG_INFO_TEMPLATE, "Start extracting XES Log from the EBDA Model"));
EBDAReasonerImplWithParallelProcessing ebdaR = new EBDAReasonerImplWithParallelProcessing(ebdaModel);
ebdaR.setExecutionLogListener(this);
try{
//Create XLogOnProm
XLogOnProm xlog = ebdaR.extractXLog();
if(xlog == null)
throw new XESLogExtractionFailureException(LEConstants.MSG_LOG_CREATION_FAILURE);
logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Finish extracting XES Log from the EBDA Model"));
return xlog;
} catch (OWLException e) {
e.printStackTrace();
throw new XESLogExtractionFailureException();
}
}
示例4: mineProcessTree
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
@Override
public ProcessTree mineProcessTree(UIPluginContext context, XLog log, boolean structure, MiningSettings params, XEventClassifier xEventClassifier) {
LogPreprocessing logPreprocessing = new LogPreprocessing();
log = logPreprocessing.preprocessLog(context, log);
System.setOut(new PrintStream(new OutputStream() {
@Override
public void write(int b) throws IOException {}
}));
IMProcessTree miner = new IMProcessTree();
if(miningParameters == null) {
miningParameters = new MiningParametersIMc();
miningParameters.setClassifier(xEventClassifier);
}
ProcessTree result = miner.mineProcessTree(log, miningParameters);
logPreprocessing.removedAddedElements(result);
System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
return result;
}
示例5: createGraph
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
public Graph createGraph(XLog log, String event_label) {
Graph graph = new Graph();
ArrayList<XEvent> pre_window = new ArrayList<>(window_size);
ArrayList<XEvent> post_window = new ArrayList<>(window_size);
XEvent center_element = null;
for(XTrace trace : log) {
pre_window.clear();
post_window.clear();
center_element = null;
for(int i = 0; i < trace.size(); i++) {
center_element = shiftWindows(pre_window, post_window, center_element, trace.get(i));
if(center_element != null) {
System.out.println(toString(pre_window) + " " + toString(center_element) + " " + toString(post_window));
}
}
}
return graph;
}
示例6: minePetrinet
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
@Override
public PetrinetWithMarking minePetrinet(UIPluginContext context, XLog log, boolean structure, MiningSettings params, XEventClassifier xEventClassifier) {
LogPreprocessing logPreprocessing = new LogPreprocessing();
log = logPreprocessing.preprocessLog(context, log);
BPMNMinerPlugin bpmnMinerPlugin = new BPMNMinerPlugin();
BPMNDiagram diagram = bpmnMinerPlugin.mineBPMNModel(context, log);
if (structure) {
try {
StructuringService structuring = new StructuringService();
diagram = structuring.structureDiagram(diagram);
} catch (Exception e) {
e.printStackTrace();
}
}
BPMNToPetriNetConverter.convert(diagram);
Object[] objects = BPMNToPetriNetConverter.convert(diagram);
logPreprocessing.removedAddedElements((Petrinet) objects[0]);
context.addConnection(new InitialMarkingConnection((Petrinet) objects[0], (Marking) objects[1]));
context.addConnection(new FinalMarkingConnection((Petrinet) objects[0], (Marking) objects[2]));
return new PetrinetWithMarking((Petrinet) objects[0], (Marking) objects[1], (Marking) objects[2]);
}
示例7: minePetrinet
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
@Override
public PetrinetWithMarking minePetrinet(UIPluginContext context, XLog log, boolean structure, MiningSettings params, XEventClassifier xEventClassifier) {
LogPreprocessing logPreprocessing = new LogPreprocessing();
log = logPreprocessing.preprocessLog(context, log);
System.setOut(new PrintStream(new OutputStream() {
@Override
public void write(int b) throws IOException {}
}));
IMPetriNet miner = new IMPetriNet();
if(miningParameters == null) {
miningParameters = new MiningParametersIMa();
miningParameters.setClassifier(xEventClassifier);
}
Object[] result = miner.minePetriNetParameters(context, log, miningParameters);
logPreprocessing.removedAddedElements((Petrinet) result[0]);
System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
return new PetrinetWithMarking((Petrinet) result[0], (Marking) result[1], (Marking)result[2]);
}
示例8: removeInfrequentBehaviour
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
public static XLog removeInfrequentBehaviour(PluginContext context, XEventClassifier xEventClassifier, XLog log, Automaton<String> automaton, double lowerbound, double upperbound, boolean exception, boolean excludeTraces) throws HighThresholdException {
double originalEvents = countEvents(log);
XLog result = filter(context, xEventClassifier, log, automaton, excludeTraces);
// XLog result = filter(context, xEventClassifier, log, automaton, false);
double resultEvents = countEvents(result);
if(exception) {
if (resultEvents > 0.0) {
if (resultEvents / originalEvents < 0.5 && lowerbound < upperbound) {
System.out.println("error1");
throw new HighThresholdException();
}
return result;
} else {
throw new HighThresholdException();
}
}else {
return result;
}
}
示例9: constructMapping
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
private static TransEvClassMapping constructMapping(Petrinet net, XLog log, XEventClass dummyEvClass) {
TransEvClassMapping mapping = new TransEvClassMapping(xEventClassifier, dummyEvClass);
XLogInfo summary = XLogInfoFactory.createLogInfo(log, xEventClassifier);
for (Transition t : net.getTransitions()) {
boolean mapped = false;
for (XEventClass evClass : summary.getEventClasses().getClasses()) {
String id = evClass.getId();
if (t.getLabel().equals(id)) {
mapping.put(t, evClass);
mapped = true;
break;
}
}
if (!mapped) {
mapping.put(t, dummyEvClass);
}
}
return mapping;
}
示例10: constructMapping
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
private static TransEvClassMapping constructMapping(Petrinet net, XEventClassifier xEventClassifier, XLog log, XEventClass dummyEvClass) {
TransEvClassMapping mapping = new TransEvClassMapping(xEventClassifier, dummyEvClass);
XLogInfo summary = XLogInfoFactory.createLogInfo(log, xEventClassifier);
for (Transition t : net.getTransitions()) {
boolean mapped = false;
for (XEventClass evClass : summary.getEventClasses().getClasses()) {
String id = evClass.getId();
if (t.getLabel().equals(id)) {
mapping.put(t, evClass);
mapped = true;
break;
}
}
if (!mapped) {
mapping.put(t, dummyEvClass);
}
}
return mapping;
}
示例11: computeMeasurement
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
@Override
public Measure computeMeasurement(UIPluginContext pluginContext, XEventClassifier xEventClassifier, PetrinetWithMarking petrinetWithMarking, MiningAlgorithm miningAlgorithm, XLog log) {
Measure measure = new Measure();
if(petrinetWithMarking == null) return measure;
try {
BPMNDiagram bpmn = PetriNetToBPMNConverter.convert(petrinetWithMarking.getPetrinet(), petrinetWithMarking.getInitialMarking(), petrinetWithMarking.getFinalMarking(), false);
// BPMNCleaner.clean(bpmn);
// BPMNSimplifier.simplify(bpmn);
ComplexityCalculator cc = new ComplexityCalculator(bpmn);
measure.addMeasure("size", cc.computeSize());
measure.addMeasure("cfc", cc.computeCFC());
measure.addMeasure("struct.", cc.computeStructuredness());
measure.addMeasure("duplicates", cc.computeDuplicates());
return measure;
} catch( Exception e ) { return measure; }
}
示例12: filterLog
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
public XLog filterLog(XLog rawlog) {
XLog log = rawlog;
XFactory factory = new XFactoryNaiveImpl();
LogOptimizer logOptimizer = new LogOptimizer(factory);
log = logOptimizer.optimizeLog(log);
XFactoryRegistry.instance().setCurrentDefault(factory);
LogModifier logModifier = new LogModifier(factory, XConceptExtension.instance(), XTimeExtension.instance(), logOptimizer);
logModifier.insertArtificialStartAndEndEvent(log);
Automaton<String> automatonOriginal = automatonFactory.generate(log);
double[] arcs = infrequentBehaviourFilter.discoverArcs(automatonOriginal, 1.0);
NoiseFilterUI noiseUI = new NoiseFilterUI();
NoiseFilterResult result = noiseUI.showGUI(this, arcs, automatonOriginal.getNodes());
return infrequentBehaviourFilter.filterLog(new FakePluginContext(), rawlog, result);
}
示例13: showGUI
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
public ConceptualModel showGUI(XLog log, int algorithm) throws NoEntityException {
List<String> allAttributes = discoverERmodel.generateAllAttributes(log);
DiscoverERmodel_UI_ignoreAttributes ignoreGui = new DiscoverERmodel_UI_ignoreAttributes(allAttributes);
/*
* Step 1: discover primary keys
*/
UnifiedMap<String, Data> data = discoverERmodel.generateData(log, ignoreGui.getIgnoreAttributes());
List<DiscoverERmodel.PrimaryKeyData> pKeyData = DiscoverERmodel.PrimaryKeyData.getData(data);
DiscoverERmodel_UI_primaryKeys pKeyGui = new DiscoverERmodel_UI_primaryKeys(pKeyData);
// get user selection
Map<Set<String>, Set<String>> group = pKeyGui.getSelection();
discoverERmodel.setPrimaryKeysEntityName(generateEntitiesNames(group));
ConceptualModel concModel = discoverERmodel.createConceptualModel(group, data);
return discoverERmodel.showGUI(concModel, discoverERmodel.getPrimaryKeys_entityName(), algorithm);
}
示例14: computeFitness
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
private PNRepResult computeFitness(UIPluginContext context, PetrinetWithMarking petrinetWithMarking, XLog log) {
Petrinet petrinet = petrinetWithMarking.getPetrinet();
Marking initialMarking = petrinetWithMarking.getInitialMarking();
Marking finalMarking = petrinetWithMarking.getFinalMarking();
context.addConnection(new FinalMarkingConnection(petrinet, finalMarking));
PetrinetReplayerWithILP replayer = new PetrinetReplayerWithILP();
XEventClass dummyEvClass = new XEventClass("DUMMY",99999);
Map<Transition, Integer> transitions2costs = constructTTCMap(petrinet);
Map<XEventClass, Integer> events2costs = constructETCMap(petrinet, log, dummyEvClass);
parameters = constructParameters(transitions2costs, events2costs, petrinet, initialMarking, finalMarking);
mapping = constructMapping(petrinet, log, dummyEvClass);
try {
return replayer.replayLog(context, petrinet, log, mapping, parameters);
} catch (AStarException | ArrayIndexOutOfBoundsException e) {
e.printStackTrace();
}
return null;
}
示例15: removeRedundantPathToEnd
import org.deckfour.xes.model.XLog; //导入依赖的package包/类
private BPMNDiagram removeRedundantPathToEnd(BPMNDiagram subProcess, XLog log, Set<String> bpmnDiagrams) {
Set<String> possibleActivitiesToCheck = new UnifiedSet<String>();
for (XTrace trace : log) {
XEvent last = null;
for (XEvent event : trace) {
if (last != null) {
String name = xce.extractName(event);
if (bpmnDiagrams.contains(name)) {
possibleActivitiesToCheck.add(xce.extractName(last));
break;
}
}
last = event;
}
}
return removePath(subProcess, possibleActivitiesToCheck);
}