Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated the screenshots, and added the simplified syntax for executing the program.
Info
titleNote

The project

...

home for this project is: https://github.com/peterdietz/SAFBuilder

The input for a command-line batch ingest of materials to DSpace is well documented, and is called "Simple Archive Format", however there needs to be a tool that easily facilitates creating a Simple Archive Format package. The use case satisfied with the Simple Archive Format Packager is that someone has a spreadsheet filled with metadata as well as content files that are eventually destined for repository ingest.

Thus the input to the Simple Archive Format Packager is a spreadsheet (.csv) that has the following columns:

  • filename for  of the bitstream/content file(s)
  • metadata with namespace.element.(qualifer) metadata for the item. Examples would be: dc.description or dc.contributor.author

Image Removed

Java Compiling and Running Instructions

Further, dates need to be in ISO-8601 format in order to be properly recognized. And for metadata that has multiple values, you can separate each entry with a double-pipe "||".

Image Added
While you are preparing the batch load, you have a directory containing a spreadsheet filled with metadata and content files. Image Added

Obtaining, Compiling, and Running SAFBuilder

The SAFBuilder project reside on GitHub. Check out the source code, recompile it, and run it. Using this application will probably require that you have already downloaded and installed Java's JDK. It is possible to run the SAFBuilder from Windows, however the commands to do so are not detailed here.

From the terminal:The commands below will: check out the code from Git, download the external java libraries used to make the tool, compile the source code, and execute it.

Code Block
git clone git://github.com/peterdietz/SAFBuilder.git
cd SAFBuilder
wget http://mirrors.ibiblio.org/pub/mirrors/maven2/net/sourceforge/javacsv/javacsv/2.0/javacsv-2.0.jar
wget http://mirrors.ibiblio.org/pub/mirrors/maven2/xmlwriter/xmlwriter/2.2/xmlwriter-2.2.jar
wget http://mirrors.ibiblio.org/pub/mirrors/maven2/commons-io/commons-io/1.4/commons-io-1.4.jar
mkdir classes
javac -classpath javacsv-2.0.jar:commons-io-1.4.jar:xmlwriter-2.2.jar src/edu/osu/kb/batch/*.java -d classes
java -cp classes edu.osu.kb.batch.BatchProcess
/recompile.sh

./safbuilder.sh

The final command will then give you the arguments used to invoke the program.

...

To run the tool over the sample data:

Code Block
java -cp classes:javacsv-2.0.jar:commons-io-1.4.jar:xmlwriter-2.2.jar edu.osu.kb.batch.BatchProcess /home/peter/NetBeansProjects./safbuilder.sh /path/to/SAFBuilder/src/edu/osu/kb/sample_data AAA_batch-metadata.csv

...