RelationPreferenceService relationPreferenceService = dspace.getServiceManager().getServiceByName(
"org.dspace.app.cris.service.RelationPreferenceService", RelationPreferenceService.class);
ApplicationService applicationService = dspace.getServiceManager().getServiceByName(
"applicationService", ApplicationService.class);
CommandLineParser parser = new PosixParser();
Options options = new Options();
options.addOption("h", "help", false, "help");
options.addOption("a", "all_researcher", false,
"Work on all researchers pages");
options.addOption("s", "single_researcher", true,
"Work on single researcher");
options.addOption("d", "MODE_DATE", true,
"Script work only on RP names modified after this date");
options.addOption("D", "MODE_HOUR", true,
"Script work only on RP names modified in this hours range");
CommandLine line = parser.parse(options, args);
if (line.hasOption('h'))
{
HelpFormatter myhelp = new HelpFormatter();
myhelp.printHelp("ScriptBindItemToRP \n", options);