-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement support for migrating RDF serializations other than turtle #61
Conversation
Thanks for this @cjcolvar. I'm having a little trouble with my 4.7.5 export, it seems to be lacking some information. But while I figure that out, could I get you to add a better test of the fcrepo-upgrade-utils/src/main/java/org/fcrepo/upgrade/utils/UpgradeUtilDriver.java Lines 142 to 144 in 9242276
Something like if (cmd.hasOption("source-rdf")) {
final Lang lang = RDFLanguages.contentTypeToLang(cmd.getOptionValue("source-rdf"));
if (lang == null) {
printHelpAndExit(format("invalid RDF content-type (%s) provided", cmd.getOptionValue("source-rdf")),
configOptions);
}
config.setSrcRdfLang(lang);
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjcolvar I also figured out part of my issue, which might be that there are more spots assuming text/turtle
in this codebase.
https://fedora-repository.atlassian.net/browse/FCREPO-3992
I'm good with this work, it does was it says. If you could add the rdf type check so people don't specify something and just get turtle then I'll merge.
But just be aware that the Fedora 4 to 5 "upgrade" might look like it is working but doesn't. It then fails to allow you to upgrade from Fedora 5 to 6.
5e28700
to
068fb9f
Compare
Thanks @whikloj for the quick review! I added the check you suggested. FWIW I think my upgrade to 6 worked correctly with these changes, but maybe my dataset is different from yours and wasn't hitting the issue you are seeing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
What does this Pull Request do?
The upgrade-utils has an option for source rdf language (
source-rdf
) but in reality only turtle was supported. This PR adds support for other rdf serializations and tests with ntriples.Jira Ticket
https://fedora-repository.atlassian.net/browse/FCREPO-3989
What's new?
getSrcRdfExt()
convenience method to ConfigTURTLE_EXTENSION
with new methodTURTLE_EXTENSION
contsantLang.TTL
references togetSrcRdfLang()
How should this be tested?
Try exporting from fedora 4 or 5 in ntriples (or another rdf serialization) and running the upgrade utils.
Interested parties
@whikloj