|
|
To register an object with a new PID, it is possible to
|
|
|
1. define a rule
|
|
|
2. invoke it
|
|
|
3. check the result, querying the PID registry
|
|
|
|
|
|
1) To define a rule that can be invoked by an iRODS icommand called [irule](https://docs.irods.org/master/icommands/user/#irule) means to create a file similar to this:
|
|
|
|
|
|
PID_DO_reg {
|
|
|
*iCATCache = bool("true");
|
|
|
EUDATCreatePID(*parent_pid, *source, *ror, *iCATCache, *newPID);
|
|
|
writeLine("stdout","PID: *newPID");
|
|
|
}
|
|
|
INPUT *source="/My collection of registered data/datum.txt",*parent_pid="None",*ror="None"
|
|
|
OUTPUT ruleExecOut
|
|
|
|
|
|
2)
|
|
|
$ irule -F EUDATCreatePID_TestRule2.r
|
|
|
PID: 842/cc6b7272-77c2-4bd8-a319-0fe4c91ff9dd |
|
|
\ No newline at end of file |