Skip to content

Updated file loading so that embedded directories are supported.

Created by: ivanmrsulja

What does this pull request do?

Enables loading RDF files from sub-directories, so that .n3 template refactoring can be implemented by using packages. Loading subdirectories only works in the case of everytime files, so that file graph loading won't be affected (they are implemented with different loading logic in mind).

What's new?

Changed RDFFilesLoader class (getPaths method) so that it supports loading files from sub-directories using visitor pattern. As mentioned above, this loading method only works if the loading directory is named "everytime", indicating that it contains dynapi .n3 templates.

How should this be tested?

Startup VIVO dynapi. You should include some .n3 templates that are split in (ideally with hierarchy > 1) packages, you can find few examples here. After startup, RDF files from sub-directories should be loaded and all functionality should be available to you whether through swagger documentation or some client mocking tool (eg. Postman, cURL...).

Interested parties

@litvinovg @chenejac @brianjlowe

Merge request reports