Metadata Management using iCommands¶
GoCommands provides features to manage metadata for data objects, collections, resources, and users in the Data Store using the imeta
command.
Metadata consists of three components:
- Name (Attribute): The name of information.
- Value: The actual data or information.
- Unit (Optional): Specifies the unit of measurement, if applicable.
List Metadata of Data Objects, Collections, Resources, or Users¶
imeta ls [flags] <irods-object>...
iRODS Objects¶
iROD Object | Flag | Description |
---|---|---|
data object |
-d |
List metadata of data objects |
collection |
-C |
List metadata of collections |
resource |
-R |
List metadata of resources |
user |
-u |
List metadata of users |
Example Usage¶
-
List metadata of a data object:
imeta ls -d /iplant/home/myUser/file.txt
-
List metadata of a collection:
imeta ls -C /iplant/home/myUser/dir
-
List metadata of a resource:
imeta ls -R myResc
-
List metadata of a user:
imeta ls -u myUser
Add Metadata to Data Objects, Collections, Resources, or Users¶
imeta add [flags] <irods-object> <metadata-name> <metadata-value> [metadata-unit]
iRODS Objects¶
iROD Object | Flag | Description |
---|---|---|
data object |
-d |
List metadata of data objects |
collection |
-C |
List metadata of collections |
resource |
-R |
List metadata of resources |
user |
-u |
List metadata of users |
Example Usage¶
-
Add metadata to a data object:
imeta add -d /iplant/home/myUser/file.txt meta_name meta_value
-
Add metadata to a data object with metadata-unit:
imeta add -d /iplant/home/myUser/file.txt meta_name meta_value meta_unit
-
Add metadata to a collection:
imeta add -C /iplant/home/myUser/dir meta_name meta_value
-
Add metadata to a resource:
imeta add -R myResc meta_name meta_value
-
Add metadata to a user:
imeta add -u myUser meta_name meta_value
Remove Metadata from Data Objects, Collections, Resources, or Users¶
Remove metadata by name (attribute) and value:
imeta rm [flags] <irods-object> <metadata-name> <metadata-value>
Remove metadata by ID:
imeta rmi [flags] <irods-object> <metadata-ID>
Note: The metadata-ID
is a numeric identifier for the metadata. It can be obtained from the output of the imeta ls
command.
iRODS Objects¶
iROD Object | Flag | Description |
---|---|---|
data object |
-d |
List metadata of data objects |
collection |
-C |
List metadata of collections |
resource |
-R |
List metadata of resources |
user |
-u |
List metadata of users |
Example Usage¶
-
Remove metadata from a data object by name:
imeta rm -d /iplant/home/myUser/file.txt meta_name meta_value
-
Remove metadata from a data object by ID:
imeta rmi -d /iplant/home/myUser/file.txt 979206950
-
Remove metadata from a collection:
imeta rm -C /iplant/home/myUser/dir meta_name meta_value
-
Remove metadata from a resource:
imeta rm -R myResc meta_name meta_value
-
Remove metadata from a user:
imeta rm -u myUser meta_name meta_value