The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"Add an operator to an existing Extension"
Hi everyone !
I really need your help... I'm french, so i'm sorry for my bad english.
I'm new in RapidMiner and I must create an empty operator (just for try, after that i will do something harder) in the extension Series. When I open RapidMiner, i can see the extension, but i can't find the code of the extension in the source code of RapidMiner. Is it normal ?
I put the extension .jar in a hidden file .config/RapidMiner/.
Moreover, I have no idea how we can create an operator. I'm new in java too. I read the documentation "How extend RapidMiner 5" and... Well... I read it, but I am not sure I understood it (not just because it is written in english).
I am really lost. And a little desperate... I have no idea what I am doing.
I hope you will understand what i am asking.
Once again, i am sorry for my english.
Regards,
Leeloo
I really need your help... I'm french, so i'm sorry for my bad english.
I'm new in RapidMiner and I must create an empty operator (just for try, after that i will do something harder) in the extension Series. When I open RapidMiner, i can see the extension, but i can't find the code of the extension in the source code of RapidMiner. Is it normal ?
I put the extension .jar in a hidden file .config/RapidMiner/.
Moreover, I have no idea how we can create an operator. I'm new in java too. I read the documentation "How extend RapidMiner 5" and... Well... I read it, but I am not sure I understood it (not just because it is written in english).
I am really lost. And a little desperate... I have no idea what I am doing.
I hope you will understand what i am asking.
Once again, i am sorry for my english.
Regards,
Leeloo
Tagged:
0
Answers
well.. if you're new to Java, this is most definitely not the best way to get started..
Anyway, if you must do it, I suggest waiting ~2 more weeks. We will publish an extension template which can be set up by simply invoking a Gradle task. The template contains all the relevant information you need on how to create your own operators.
If waiting is also not an option, you can look at the sourcecode of the Series extension here: https://svn.code.sf.net/p/rapidminer/code/Plugins/ValueSeries/Unuk/
The most relevant files are
https://svn.code.sf.net/p/rapidminer/code/Plugins/ValueSeries/Unuk/resources/com/rapidminer/resources/OperatorsValueSeries.xml
https://svn.code.sf.net/p/rapidminer/code/Plugins/ValueSeries/Unuk/resources/com/rapidminer/resources/i18n/OperatorsDocValueSeries.xml
and obviously the actual source file of an operator. You just add a class which extends one of the Operator classes/subclasses, add it to the OperatorsValueSeries.xml file and add name and group information to the OperatorsDocValueSeries.xml file.
This is in parts a bit outdated considering Studio 6.4, but it still works regardless.
Regards,
Marco
I know it is not the best way to get started but i am a trainee in a big enterprise and i am feeling like being on another planet...
Thank you for the links of the sourcecode of the Series extension. I was looking for it since several days.
Waiting is not really an option (I must create the operator for tomorrow). I tried what you told me to do. I added the informations to the OperatorsValueSeries.xml file and to the OperatorsDocValueSeries.xml file.
But I have a problem. I can't convert my .java file (which contains the code of my operator) to a .class file. I tried with javac, but I have some errors (as example, it doesn't recognize InputPort, or OutputPort and other things).
I suppose I did something wrong, but i can't figure what.
we use a build system to convert our extensions to a single .jar file each. With Studio 6, this build system is Gradle. However, you are using Studio 5, which used Ant. You will notice a build.xml in the root folder of the sources. That is used by Ant to display the available tasks. The relevant task should be called something like "installExtension" or something along these lines. That will create a .jar and place it in the Studio/lib/plugins folder. That .jar is then picked up as an extension (you need to remove the regular Series extension .jar when using your own one).
I suppose you have both Studio and the series sources checked out via SVN and located in a separate project in Eclipse or another IDE? That way, you can easily use the built-in Ant tools to get it to work without too much hassle.
Regards,
Marco
Okay, so I need to "open" (or "import") the extension in Eclipse as a different project. But I never succeeded it. The files in the extension are .class files. I did not find the extension with .java files on the internet. Maybe I was looking at the wrong place.
So, when i will succeed to open the extension in Eclipse, I put my operator in the extension, then I run the build.xml. It will give me a .jar file that will be placed in Studio/lib/plugins (or I will need to place it by myself ?). Am I right ? I think I understand what I have to do.
There is just the problem : how import the extension in Eclipse.
Regards,
Leeloo
well, that's rather simple. You add an SVN client to your Eclipse instance, e.g. Subclipse or Subversive. You can then use the URL to the repository I posted earlier. The repository is managed by SVN. This will get you all the necessary files, obviously including the .java files.
You do the same with the actual RapidMiner Studio code: https://svn.code.sf.net/p/rapidminer/code/Unuk/
Regards,
Marco