Package org.mycore.pi.cli
Class MCRPICommands
java.lang.Object
org.mycore.pi.cli.MCRPICommands
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addFlagToObject
(String mycoreIDString) static void
controlObjectWithService
(String objectIDString, String serviceID) static void
controlObjectWithServiceAndAdditional
(String objectIDString, String serviceID, String additional) static void
createPIForObjectIfNotExist
(String serviceID, String objectIDString) static void
createPIForObjectIfNotExist
(String serviceID, String objectIDString, String additional) static void
migrateURNGranularToServiceID
(String serviceID) static void
removeControlFromObject
(String objectIDString, String serviceID) static void
removeControlFromObject
(String objectIDString, String serviceID, String additional) static void
updateObject
(String objectIDString)
-
Constructor Details
-
MCRPICommands
public MCRPICommands()
-
-
Method Details
-
addFlagsToObjects
-
addFlagToObject
@MCRCommand(syntax="add pi flags to object {0}", help="see add pi flags to all objects!", order=20) public static void addFlagToObject(String mycoreIDString) -
migrateURNGranularToServiceID
@MCRCommand(syntax="migrate urn granular to service id {0}", help="Used to migrate urn granular to MyCoRe-PI. {0} should be your granular service id.", order=30) public static void migrateURNGranularToServiceID(String serviceID) -
controlObjectWithService
@MCRCommand(syntax="try to control {0} with pi service {1}", help="This command tries to read a pi from the object {0} with the MetadataManager from the specified service {1}. If the service configuration is right then the pi is under control of MyCoRe.", order=50) public static void controlObjectWithService(String objectIDString, String serviceID) throws MCRAccessException, MCRActiveLinkException, IOException -
controlObjectWithServiceAndAdditional
@MCRCommand(syntax="try to control {0} with pi service {1} with additional {2}", help="This command tries to read a pi from the object {0} with the MetadataManager from the specified service {1}. If the service configuration is right then the pi is under control of MyCoRe.", order=40) public static void controlObjectWithServiceAndAdditional(String objectIDString, String serviceID, String additional) throws MCRAccessException, MCRActiveLinkException, IOException -
removeControlFromObject
@MCRCommand(syntax="remove control {0} with pi service {1} with additional {2}", help="This commands removes the pi control from the object {0}(object id) with the serivce {1}(service id) and the additional {2}", order=60) public static void removeControlFromObject(String objectIDString, String serviceID, String additional) throws MCRAccessException, MCRActiveLinkException, MCRPersistentIdentifierException -
removeControlFromObject
@MCRCommand(syntax="remove control {0} with pi service {1}", help="This commands removes the pi control from the object {0}(object id) with the serivce {1}(service id)", order=70) public static void removeControlFromObject(String objectIDString, String serviceID) throws MCRAccessException, MCRActiveLinkException, MCRPersistentIdentifierException -
updateObject
@MCRCommand(syntax="update all PI of object {0}", help="Triggers the update method of every Object!", order=80) public static void updateObject(String objectIDString) -
createPIForObjectIfNotExist
@MCRCommand(syntax="create pi with {0} for object {1} with additional ({2})", help="Creates a persistent identifier with the pi service with the id {0} for the object {1} with additional ({2}). Does nothing if the object already has a pi from the service {0}.", order=90) public static void createPIForObjectIfNotExist(String serviceID, String objectIDString, String additional) throws MCRAccessException, ExecutionException, MCRActiveLinkException, MCRPersistentIdentifierException, InterruptedException -
createPIForObjectIfNotExist
@MCRCommand(syntax="create pi with {0} for object {1}", help="Creates a persistent identifier with the pi service with the id {0} for the object {1}. Does nothing if the object already has a pi from the service {0}.", order=100) public static void createPIForObjectIfNotExist(String serviceID, String objectIDString) throws MCRAccessException, ExecutionException, MCRActiveLinkException, MCRPersistentIdentifierException, InterruptedException
-