|
|
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:
|
|
|
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 (call it, for example, test_rule.r):
|
|
|
|
|
|
PID_DO_reg {
|
|
|
*iCATCache = bool("true");
|
... | ... | @@ -13,6 +12,9 @@ To register an object with a new PID, it is possible to |
|
|
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 |
|
|
2) Then open a shell where the iRODS icommand are available and, after the initial authentication with [iinit](https://docs.irods.org/master/icommands/user/#iinit), type:
|
|
|
|
|
|
$ irule -F test_rule.r
|
|
|
PID: 842/cc6b7272-77c2-4bd8-a319-0fe4c91ff9dd
|
|
|
|
|
|
If the output shows the new PID just created, it works. |
|
|
\ No newline at end of file |