Class IRODSMetadata
java.lang.Object
org.irods.irods4j.high_level.metadata.IRODSMetadata
A high-level class providing functions for modifying metadata on various
iRODS entities.
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA class which represents a single atomic metadata operation to execute.static final classHolds the results of an atomic metadata API operation.static enumThe atomic metadata operations supported by iRODS. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddMetadataToCollection(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Adds a single metadata triple to a collection using rodsadmin privileges.static voidaddMetadataToCollection(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Adds a single metadata triple to a collection.static voidaddMetadataToDataObject(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Adds a single metadata triple to a data object using rodsadmin privileges.static voidaddMetadataToDataObject(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Adds a single metadata triple to a data object.static voidaddMetadataToResource(IRODSApi.RcComm comm, String resourceName, String attrName, String attrValue, Optional<String> attrUnits) Adds a single metadata triple to a resource.static voidaddMetadataToUserOrGroup(IRODSApi.RcComm comm, String userOrGroup, String attrName, String attrValue, Optional<String> attrUnits) Adds a single metadata triple to a user or group.atomicApplyMetadataOperationsToCollection(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, List<IRODSMetadata.AtomicMetadataOperation> operations) Sequentially executes all metadata operations on a collection atomically using rodsadmin privileges.atomicApplyMetadataOperationsToCollection(IRODSApi.RcComm comm, String logicalPath, List<IRODSMetadata.AtomicMetadataOperation> operations) Sequentially executes all metadata operations on a collection atomically.atomicApplyMetadataOperationsToDataObject(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, List<IRODSMetadata.AtomicMetadataOperation> operations) Sequentially executes all metadata operations on a data object atomically using rodsadmin privileges.atomicApplyMetadataOperationsToDataObject(IRODSApi.RcComm comm, String logicalPath, List<IRODSMetadata.AtomicMetadataOperation> operations) Sequentially executes all metadata operations on a data object atomically.atomicApplyMetadataOperationsToResource(IRODSApi.RcComm comm, String resourceName, List<IRODSMetadata.AtomicMetadataOperation> operations) Sequentially executes all metadata operations on a resource atomically.atomicApplyMetadataOperationsToUserOrGroup(IRODSApi.RcComm comm, String userOrGroup, List<IRODSMetadata.AtomicMetadataOperation> operations) Sequentially executes all metadata operations on a user or group atomically.static voidremoveMetadataFromCollection(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Removes a single metadata triple from a collection using rodsadmin privileges.static voidremoveMetadataFromCollection(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Removes a single metadata triple from a collection.static voidremoveMetadataFromDataObject(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Removes a single metadata triple from a data object using rodsadmin privileges.static voidremoveMetadataFromDataObject(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Removes a single metadata triple from a data object.static voidremoveMetadataFromResource(IRODSApi.RcComm comm, String resourceName, String attrName, String attrValue, Optional<String> attrUnits) Removes a single metadata triple from a resource.static voidremoveMetadataFromUserOrGroup(IRODSApi.RcComm comm, String userOrGroup, String attrName, String attrValue, Optional<String> attrUnits) Removes a single metadata triple from a user or group.static voidsetMetadataOnCollection(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Sets a single metadata triple on a collection using rodsadmin privileges.static voidsetMetadataOnCollection(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Sets a single metadata triple on a collection.static voidsetMetadataOnDataObject(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Sets a single metadata triple on a data object using rodsadmin privileges.static voidsetMetadataOnDataObject(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) Sets a single metadata triple on a data object.static voidsetMetadataOnResource(IRODSApi.RcComm comm, String resourceName, String attrName, String attrValue, Optional<String> attrUnits) Sets a single metadata triple on a resource.static voidsetMetadataOnUserOrGroup(IRODSApi.RcComm comm, String userOrGroup, String attrName, String attrValue, Optional<String> attrUnits) Sets a single metadata triple on a user or group.
-
Field Details
-
asAdmin
Instructs the server to execute operations using rodsadmin level privileges.- Since:
- 0.1.0
-
-
Constructor Details
-
IRODSMetadata
public IRODSMetadata()
-
-
Method Details
-
addMetadataToCollection
public static void addMetadataToCollection(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Adds a single metadata triple to a collection.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a collection.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
addMetadataToCollection
public static void addMetadataToCollection(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Adds a single metadata triple to a collection using rodsadmin privileges.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a collection.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
removeMetadataFromCollection
public static void removeMetadataFromCollection(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Removes a single metadata triple from a collection.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a collection.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
removeMetadataFromCollection
public static void removeMetadataFromCollection(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Removes a single metadata triple from a collection using rodsadmin privileges.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a collection.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
setMetadataOnCollection
public static void setMetadataOnCollection(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Sets a single metadata triple on a collection.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a collection.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
setMetadataOnCollection
public static void setMetadataOnCollection(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Sets a single metadata triple on a collection using rodsadmin privileges.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a collection.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
addMetadataToDataObject
public static void addMetadataToDataObject(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Adds a single metadata triple to a data object.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a data object.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
addMetadataToDataObject
public static void addMetadataToDataObject(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Adds a single metadata triple to a data object using rodsadmin privileges.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a data object.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
removeMetadataFromDataObject
public static void removeMetadataFromDataObject(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Removes a single metadata triple from a data object.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a data object.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
removeMetadataFromDataObject
public static void removeMetadataFromDataObject(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Removes a single metadata triple from a data object using rodsadmin privileges.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a data object.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
setMetadataOnDataObject
public static void setMetadataOnDataObject(IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Sets a single metadata triple on a data object.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a data object.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
setMetadataOnDataObject
public static void setMetadataOnDataObject(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Sets a single metadata triple on a data object using rodsadmin privileges.- Parameters:
comm- The connection to an iRODS server.logicalPath- The absolute logical path to a data object.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
addMetadataToResource
public static void addMetadataToResource(IRODSApi.RcComm comm, String resourceName, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Adds a single metadata triple to a resource.This operation requires rodsadmin level privileges.
- Parameters:
comm- The connection to an iRODS server.resourceName- The name of a resource.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
removeMetadataFromResource
public static void removeMetadataFromResource(IRODSApi.RcComm comm, String resourceName, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Removes a single metadata triple from a resource.This operation requires rodsadmin level privileges.
- Parameters:
comm- The connection to an iRODS server.resourceName- The name of a resource.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
setMetadataOnResource
public static void setMetadataOnResource(IRODSApi.RcComm comm, String resourceName, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Sets a single metadata triple on a resource.This operation requires rodsadmin level privileges.
- Parameters:
comm- The connection to an iRODS server.resourceName- The name of a resource.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
addMetadataToUserOrGroup
public static void addMetadataToUserOrGroup(IRODSApi.RcComm comm, String userOrGroup, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Adds a single metadata triple to a user or group.This operation requires rodsadmin level privileges.
- Parameters:
comm- The connection to an iRODS server.userOrGroup- The name of a user or group.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
removeMetadataFromUserOrGroup
public static void removeMetadataFromUserOrGroup(IRODSApi.RcComm comm, String userOrGroup, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Removes a single metadata triple from a user or group.This operation requires rodsadmin level privileges.
- Parameters:
comm- The connection to an iRODS server.userOrGroup- The name of a user or group.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
setMetadataOnUserOrGroup
public static void setMetadataOnUserOrGroup(IRODSApi.RcComm comm, String userOrGroup, String attrName, String attrValue, Optional<String> attrUnits) throws IOException, IRODSException Sets a single metadata triple on a user or group.This operation requires rodsadmin level privileges.
- Parameters:
comm- The connection to an iRODS server.userOrGroup- The name of a user or group.attrName- The metadata attribute name.attrValue- The metadata attribute value.attrUnits- The metadata attribute units.- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
atomicApplyMetadataOperationsToCollection
public static IRODSMetadata.AtomicMetadataOperationsResult atomicApplyMetadataOperationsToCollection(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, List<IRODSMetadata.AtomicMetadataOperation> operations) throws IOException Sequentially executes all metadata operations on a collection atomically using rodsadmin privileges.- Parameters:
adminTag- Instructs the server to execute the operation using rodsadmin privileges.comm- The connection to the iRODS server.logicalPath- The absolute logical path to a collection.operations- The list of metadata operations.- Returns:
- An object containing error information.
- Throws:
IOException- Since:
- 0.1.0
-
atomicApplyMetadataOperationsToCollection
public static IRODSMetadata.AtomicMetadataOperationsResult atomicApplyMetadataOperationsToCollection(IRODSApi.RcComm comm, String logicalPath, List<IRODSMetadata.AtomicMetadataOperation> operations) throws IOException Sequentially executes all metadata operations on a collection atomically.- Parameters:
comm- The connection to the iRODS server.logicalPath- The absolute logical path to a collection.operations- The list of metadata operations.- Returns:
- An object containing error information.
- Throws:
IOException- Since:
- 0.1.0
-
atomicApplyMetadataOperationsToDataObject
public static IRODSMetadata.AtomicMetadataOperationsResult atomicApplyMetadataOperationsToDataObject(AdminTag adminTag, IRODSApi.RcComm comm, String logicalPath, List<IRODSMetadata.AtomicMetadataOperation> operations) throws IOException Sequentially executes all metadata operations on a data object atomically using rodsadmin privileges.- Parameters:
adminTag- Instructs the server to execute the operation using rodsadmin privileges.comm- The connection to the iRODS server.logicalPath- The absolute logical path to a data object.operations- The list of metadata operations.- Returns:
- An object containing error information.
- Throws:
IOException- Since:
- 0.1.0
-
atomicApplyMetadataOperationsToDataObject
public static IRODSMetadata.AtomicMetadataOperationsResult atomicApplyMetadataOperationsToDataObject(IRODSApi.RcComm comm, String logicalPath, List<IRODSMetadata.AtomicMetadataOperation> operations) throws IOException Sequentially executes all metadata operations on a data object atomically.- Parameters:
comm- The connection to the iRODS server.logicalPath- The absolute logical path to a data object.operations- The list of metadata operations.- Returns:
- An object containing error information.
- Throws:
IOException- Since:
- 0.1.0
-
atomicApplyMetadataOperationsToResource
public static IRODSMetadata.AtomicMetadataOperationsResult atomicApplyMetadataOperationsToResource(IRODSApi.RcComm comm, String resourceName, List<IRODSMetadata.AtomicMetadataOperation> operations) throws IOException Sequentially executes all metadata operations on a resource atomically.This operation requires rodsadmin level privileges.
- Parameters:
comm- The connection to the iRODS server.resourceName- The name of a resource.operations- The list of metadata operations.- Returns:
- An object containing error information.
- Throws:
IOException- Since:
- 0.1.0
-
atomicApplyMetadataOperationsToUserOrGroup
public static IRODSMetadata.AtomicMetadataOperationsResult atomicApplyMetadataOperationsToUserOrGroup(IRODSApi.RcComm comm, String userOrGroup, List<IRODSMetadata.AtomicMetadataOperation> operations) throws IOException Sequentially executes all metadata operations on a user or group atomically.This operation requires rodsadmin level privileges.
- Parameters:
comm- The connection to the iRODS server.userOrGroup- The name of a user or group.operations- The list of metadata operations.- Returns:
- An object containing error information.
- Throws:
IOException- Since:
- 0.1.0
-