🦉 🎤   RapidMiner Wisdom 2020 - CALL FOR SPEAKERS   🦉 🎤

We are inviting all community members to submit proposals to speak at Wisdom 2020 in Boston.


Whether it's a cool RapidMiner trick or a use case implementation, we want to see what you have.
Form link is below and deadline for submissions is November 15. See you in Boston!

CLICK HERE TO GO TO ENTRY FORM

"How to set/initialize the repository in java?"

mdcmdc Member Posts: 58  Guru
edited May 23 in Help

Hi,

I am trying to run an xml process file in java. The process file includes access to the repository, however I couldn't figure out how to set the repository location in the program. I assume that it should be a reference to the 'repositories.xml' in ~/.Rapidminer5 directory.

Can someone show me the line of codes I need? I've been searching the forum and I couldn't get any reference.

thanks,
matthew

Here's the code:

import java.io.File;
import java.io.IOException.*;
import com.rapidminer.RapidMiner;
import com.rapidminer.operator.IOContainer;
import com.rapidminer.operator.OperatorException;

public class Main {

    public static void main(String[] args) {

        RapidMiner.init();

        System.setProperty("rapidminer.home", "/home/matthew/rapidminer");
        com.rapidminer.Process process = null;
        try {
            process = new com.rapidminer.Process(new File("/home/matthew/Sample.xml"));
        } catch (Exception e) {
            System.out.print("error here 1");
        }

        if (process != null) {
            IOContainer result = null;
            try {
                result = process.run();
            } catch (OperatorException e) {
                System.out.print("error here 2");
            }
        }
    }
}
Tagged:

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,527   Unicorn
    Hi,
    I don't know in the moment, but I refer you to the upcoming integration white paper that will deal with this issue.

    Greetings,
      Sebastian
Sign In or Register to comment.