fcrepo-exts / fcrepo-import-export

Apache License 2.0
15 stars 19 forks source link

Prevents versions from being imported when the include versions flag … #127

Closed dbernstein closed 5 years ago

dbernstein commented 5 years ago

…is false.

Resolves: https://jira.duraspace.org/browse/FCREPO-3002


  1. Start a fresh repo create a container resource1 and a nested binary

    curl -X PUT -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/container
  2. Create a version

    curl -X POST -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/container/fcr:versions
  3. Run the import export tool:

    java -jar ~/code/fcrepo-import-export/target/fcrepo-import-export-0.4.0-SNAPSHOT.jar  --mode export --predicates "http://www.w3.org/ns/ldp#contains" --resource "http://localhost:8080/rest" --versions  --rdfLang "text/turtle" --dir export-dir
  4. Start a fresh repo: stop report, remove fcrepo4-data and start the repo

  5. Import the data with versions disabled.

    java -jar ~/code/fcrepo-import-export/target/fcrepo-import-export-0.4.0-SNAPSHOT.jar  --mode import --predicates "http://www.w3.org/ns/ldp#contains" --resource "http://localhost:8080/rest" --versions false --rdfLang "text/turtle" --dir export-dir
  6. Verify the resources have been successfully imported and that there are no fcr:versions related warnings or error messages.

  7. Repeat 4.

  8. Import data with versions enabled

    java -jar ~/code/fcrepo-import-export/target/fcrepo-import-export-0.4.0-SNAPSHOT.jar  --mode import --predicates "http://www.w3.org/ns/ldp#contains" --resource "http://localhost:8080/rest" --versions  --rdfLang "text/turtle" --dir export-dir
  9. Verify the resources have been successfully imported and that there are fcr:versions related warnings or error messages.

NOTE: Version import is coming in a subsequent PR. Thus you should not expect versions to successfully import when the versions flag is set to true.

dbernstein commented 5 years ago

I'm going to include the resolution to this issue in the pr for fcrepo-2982