
You have got the project instance that contains the ruleset which you want to open.
Enter the name of the ruleset that you want to open.
String rulesetName = "Sample Ruleset";
IRuleset ruleset = project.getRuleset(rulesetName);
You get the desired ruleset.