![JAR search and dependency download from the Maven repository](/logo.png)
help.cmdClient.html Maven / Gradle / Ivy
Command Line Mode
Command Line Client
The command line version provides support to request service
documents and post files. Each run of the command line version
can either request a service document or post one file to one
or more specified location. Results are output to the screen.
The following options are available:
-gui
This starts the GUI version of the application. This is the default
mode if neither -gui or -cmd is set. Double clicking on the jar file
will launch the client in gui mode.
-cmd
This starts the application in command line mode.
-t <service|post|multipost>
The type of service. This is required. It is followed by a value of service, post or multipost.
-u <username>
Specifies a username if you are connecting to a server using Basic Authentication.
-p <password>
Specifies a password if you are connecting to a server using Basic Authentication.
-host <host>
A proxy host, e.g. wwwcache.myproxy.com. Use if you use a proxy server to access remote resources.
-port <port>
A proxy port, e.g. 8080. Use if you use a proxy server.
-help
Show a useage statement.
-file <file>
A file to upload. Use for Post operation.
-filetype <type>
A filetype, e.g. application/zip.
-verbose
Set verbose to true. Used in Post operation.
-noOp
Set NoOp to true. Used in Post operation.
-formatNamespace <namespace>
Specify a format namespace.
-onBehalfOf <name>
Specify the onBehalfOf name. Used for Post and Service operations.
-md5
Use an MD5 checksum when posting data to the server.
-slug <slug>
The slug value.
-checksumError
Corrupt the MD5 checksum. Used for testing. Only useful if you have also set -md5.
-dest <destination>
A new format for specifying the username, password, onBehalfOf and URL for a post. This is only used for a multipost operation. Multiple -dest arguments can be provided on the command line. The format is:
<username>[onBehalfOf]:<password>@<url>, e.g.
sword[myUser]:sword@http://www.myserver.com/collection and
sword:sword@http://www.myserver.com/collection
The onBehalfOf item is optional.
Example usage:
Request a service document using Basic Authentication
java -jar swordclient.jar -cmd -t service -u sword -p sword -href http://sword.aber.ac.uk/sword-basic/app/servicedocument
Request a service document using Basic Authentication. Using a proxy.
java -jar swordclient.jar -cmd -t service -u sword -p sword -href http://sword.aber.ac.uk/sword-basic/app/servicedocument -host www.mycache.com -port 8080
Post a zip file using Basic Authentication
java -jar swordclient.jar -cmd -t post -u sword -p sword -file BurningStubble.zip -filetype application/zip -href http://sword.aber.ac.uk/sword-basic/deposit
Post a zip file using Basic Authentication
java -jar swordclient.jar -cmd -t multipost -file BurningStubble.zip -filetype application/zip -dest sword:sword@http://sword.aber.ac.uk/sword-basic/deposit