fedora.client.batch
Class AutoModify

java.lang.Object
  extended by fedora.client.batch.AutoModify

public class AutoModify
extends java.lang.Object

Title: AutoModify.java

Description: This is a command-line version of the Batch Modify utility that's available in the admin GUI client. It processes an xml input file containing modify directives enabling mass updating of existing objects. The utility has six required arguments:

  1. hostName - Name of the Fedora repository server.
  2. portNum - port number o fthe Fedora server.
  3. username - username of the Fedora server admin user
  4. password - password of the Fedora server admin user
  5. directivesFilePath - absolute file path of the input file containing modify directives. Note that his file should should validate against the batchModify schema.
  6. logFilePath - absolute file path of the log file; an xml file providing a history of the transactions processed.

Version:
$Id: AutoModify.java 4423 2005-09-16 21:26:40Z payette $
Author:
rlw@virginia.edu

Field Summary
static FedoraAPIA APIA
           
static FedoraAPIM APIM
           
 
Constructor Summary
AutoModify(FedoraAPIA apia, FedoraAPIM apim, java.lang.String protocol, java.lang.String host, int port, java.lang.String user, java.lang.String pass)
           Constructor for the class.
 
Method Summary
static void main(java.lang.String[] args)
           
static void modify(FedoraAPIM APIM, Uploader UPLOADER, FedoraAPIA APIA, java.lang.String directivesFilePath, java.lang.String logFilePath, boolean isValidateOnly)
          Process the modify directives.
 void modify(java.lang.String directivesFilePath, java.lang.String logFilePath, boolean isValidateOnly)
          Processes the modify directives.
static void showUsage(java.lang.String errMessage)
          Displays the command-line syntax.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APIA

public static FedoraAPIA APIA

APIM

public static FedoraAPIM APIM
Constructor Detail

AutoModify

public AutoModify(FedoraAPIA apia,
                  FedoraAPIM apim,
                  java.lang.String protocol,
                  java.lang.String host,
                  int port,
                  java.lang.String user,
                  java.lang.String pass)
           throws java.net.MalformedURLException,
                  javax.xml.rpc.ServiceException,
                  java.io.IOException

Constructor for the class.

Parameters:
apia - - SOAP stub for APIA service.
apim - - SOAP stub for APIM service.
host - - Hostname of the Fedora server.
port - - Port number of the Fedora server.
user - - username of the Fedora server admin user.
pass - - password of the Fedora server admin user.
Throws:
java.net.MalformedURLException - - If the URL generated from host and port is invalid.
javax.xml.rpc.ServiceException - - If unable to connect via SOAP to the Fedora API-M web service.
java.io.IOException - - If an error occurs in creating an instance of the Uploader.
Method Detail

modify

public void modify(java.lang.String directivesFilePath,
                   java.lang.String logFilePath,
                   boolean isValidateOnly)

Processes the modify directives.

Parameters:
directivesFilePath - - The absolute file path of the file containing the modify directives.
logFilePath - - The absolute file path of the log file.
isValidateOnly - - Boolean flag; true indicates validate only; false indicates process the directives file.

modify

public static void modify(FedoraAPIM APIM,
                          Uploader UPLOADER,
                          FedoraAPIA APIA,
                          java.lang.String directivesFilePath,
                          java.lang.String logFilePath,
                          boolean isValidateOnly)

Process the modify directives.

Parameters:
APIM - - An instance of FedoraAPIM.
UPLOADER - - An instance of the Uploader.
directivesFilePath - - The absolute file path of the file containing the modify directives.
APIA - - An instance of FedoraAPIA.
logFilePath - - The absolute file path of the log file.
isValidateOnly - - Boolean flag; true indicates validate only; false indicates process the directives file.

showUsage

public static void showUsage(java.lang.String errMessage)

Displays the command-line syntax.

Parameters:
errMessage - - The error message to be displayed.

main

public static void main(java.lang.String[] args)