To prevent spam users, you can only post on this forum after registration, which is by invitation. If you want to post on the forum, please send me a mail (h DOT m DOT w DOT verbeek AT tue DOT nl) and I'll send you an invitation in return for an account.
Add new classifier
Hi everyone,
I'm developing my plugin and it I need some help at this stage.
I would like to ask for the source code of the add "XEventClassifier" based on events log attributes.
So, any one can help me with that?
Kind Regards
Henda
I'm developing my plugin and it I need some help at this stage.
I would like to ask for the source code of the add "XEventClassifier" based on events log attributes.
So, any one can help me with that?
Kind Regards
Henda
Comments
-
Hi Henda,Assume that variable log holds the log (XLog) to which you want to add the new classifier, that variable name holds the name (String) for the new classifier, and that variable keys holds the array of attribute keys (String[]) to be used for the new classifier:
log.getClassifiers().add(new XEventAttributeClassifier(name, keys));
Kind regards,Eric.
-
Thank you very much Eric.
Kind regards
Henda -
Hi everyone,
Could someone help me please to use "getDefiningAttributeKeys()" to have an array of attribute keys (String[]). -
Hi Henda,Assume classifier is an event classifier (XEventClassifier), then the following line returns the array of keys:
classifier.getDefiningAttributeKeys()
Assume that the classifier is the same as added to the log as mentioned in my previous post, then this would return keys.Kind regards,Eric. -
Hi hverbeek
I have a result an array with attributes keys of classifiers, but a want to have attributes keys of the log. -
Hi Henda,A log (XLog) is an element with attributes (extends XEleemnt, which extends XAttributable), hence it has a getAttributes() method which provides you with the attribute map (XAttributeMap). This map extends Map<String,XAttribute>, so it has a keyset() method. So, assuming log is an XLog, the following provides you with a collection of all attribute keys:
log.getAttributes().keyset();
If you really need a String[] instead of a Collection<String>, then convert the resulting collection to such an array.Also see https://svn.win.tue.nl/trac/prom/browser/OpenXES/trunk/src/org/deckfour/xes/model for the sources of the classes you're using.Kind regards,Eric.
Howdy, Stranger!
Categories
- 1.6K All Categories
- 45 Announcements / News
- 225 Process Mining
- 6 - BPI Challenge 2020
- 9 - BPI Challenge 2019
- 24 - BPI Challenge 2018
- 27 - BPI Challenge 2017
- 8 - BPI Challenge 2016
- 68 Research
- 1K ProM 6
- 394 - Usage
- 288 - Development
- 9 RapidProM
- 1 - Usage
- 7 - Development
- 54 ProM5
- 19 - Usage
- 187 Event Logs
- 32 - ProMimport
- 75 - XESame