[SOLVED]operator.setParameter method
Hi, I'm new to rapidminer. I'm trying to execute this simple process using java code
I've read the question n 6 at this pagehttp://rapid-i.com/rapidforum/index.php/topic,5807.0.htmlbut I don't understand what is that class SingleDocumentInputOperator.
Thanks for your help.
I need to change the repository_entry value of the two retrieve operators. I'm using the setParameter method
<宏/ >
<参数键=“repository_entry”值= " / /当地Repository/data/model"/>
<参数键=“repository_entry”值= " / /当地Repository/data/testing"/>
Operator opRetModel = process.getOperator("Retrieve model");but I don't understand what to use as first parameter to specify the path of the saved model.
opRetModel.setParameter(???,model path)
I've read the question n 6 at this pagehttp://rapid-i.com/rapidforum/index.php/topic,5807.0.htmlbut I don't understand what is that class SingleDocumentInputOperator.
Thanks for your help.
Tagged:
0
Answers
I have updated the question in the FAQ because the operator used was from an extension and thus not the best example.
I'll rewrite this here anyway:
Step 1) Open the "OperatorsCore.xml" file and search for the name of the operator. In your case,
Step 2) You can then check said class for string constants and you will find "PARAMETER_REPOSITORY_ENTRY". This is the key you need to use.
Regards,
Marco
I'm still having problems calling this method when the parameter to set is the path to a file.
This code gives me a null pointer exception on the third row even if the path is correct and the file exists. If I execute the process through rapidminer gui with the same parameter it works ???
in the 3rd row of your code the only possiblity for a NullPointerException is when "opReadModel" is null. This is also quite likely given your process xml: The operator is called "Retrieve model" in your process, not "Read model". The call "process.getOperator("name") returns null if no operator is found with the given name.
Regards,
Marco
Thank you very much. ;D