Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


The Camel Serializer Module is currently a proof of concept but has documentation and code. It works by listening for events about newly created resources, or edits to existing resources. As such, the re-indexer Camel component must be invoked to export resources that were created before it started listening, unless they are edited while the camel serializer is turned on.

Exporting Resources Using the Export Tool

...

  1. Download executable jar (TBD)
  2. Build from source

Preparing sample data

  1. Go to Fedora in a browser

...

  1. . If you're using the Quick Start method, this will located at: http://localhost:8080/rest
  2. Under the Create New Child Resource

...

  1. form on the right-hand side of the page,

...

  1. create a new resource called "albums"
  2. Navigate to

...

  1. the new resource at http://localhost:8080/

...

  1. rest/albums
  2. Under type on the right-hand side of the page, choose "binary" and select a file to upload from the resulting Choose File button
  3. Leave the identifier field blank and click Add

You will now have a Container with a binary file ready to export at and create a new child resource there.  This time, change the type to binary and upload a sample binary file. I used a jpg image for this example.  The identifier will get filled in by Fedora if you don't choose one yourself.
You now have a Container to export (http://localhost:8080/fcrepo/rest/albums).

Using the export tool

Move to the directory where you downloaded the code (cd . For Vagrant installs, this will be under /opt/fcrepo-import-export for the vagrant install).   ; otherwise, it will located in the directory where you cloned the GitHub repository when you build the tool from source. From there, you will need to locate the compiled jar file. If you build it from source, it will be in the GitHub repo at fcrepo-import-export/target/fcrepo-import-export-0.0.1-SNAPSHOT.jar.

To see all the available command line options:

Code Block
languagebash
java -jar fcrepo-import-export-driver/target/fcrepo-import-export-driver-0.0.1-SNAPSHOT.jar -h

Note: You will see "Error parsing args: Unrecognized option: -h" but this is bug and will be addressed in forthcoming releases.

To export all the RDF and binary resources in your sample container:

Code Block
languagebash
java -jar fcrepo-import-export-driver/target/fcrepo-import-export-driver-0.0.1-SNAPSHOT.jar -m-mode export --rresource http://localhost:8080/fcrepo/rest/albums -d-descDir /tmp/descriptions --bbinDir /tmp/binaries


You should now have RDF resources exported to /tmp/descriptions and binary resources in /tmp/binaries.  If you do not want backups of the binaries, omit the -b flag.  You cannot export only binaries, you must include the -d flag.

There are other command line options available, e.g.,:
-u to provide a username and password for Fedora basic authentication.
With the vagrant box, if you have Fedora Auth turned on and are using the default settings, you would add the following to your command:

...