-
Notifications
You must be signed in to change notification settings - Fork 85
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
Freemarker dataGetter directive #440
Conversation
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.
@litvinovg great work!!! I really like the implementation. I have added a couple of tiny comments/suggestions. I think it is important in the documentation to explain overriding saveToVar property with var attribute in datagetter directive. I needed some time to understand that in the code.
api/src/main/java/edu/cornell/mannlib/vitro/webapp/web/directives/DataGetterDirective.java
Show resolved
Hide resolved
api/src/main/java/edu/cornell/mannlib/vitro/webapp/web/directives/DataGetterDirective.java
Outdated
Show resolved
Hide resolved
api/src/main/java/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/SparqlQueryDataGetter.java
Show resolved
Hide resolved
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.
@litvinovg I have posted one comment in the review to align a comment with the code.
Regarding testing, I had the issue to test it. It was my fault, but we should consider to clarify that in the documentation. Namely, I defined a datagetter in an n3 file by using a prefix (display), and I also used the prefix in ftl file. So, we should clarify in the documentation that full uri has to be used in the ftl file.
api/src/main/java/edu/cornell/mannlib/vitro/webapp/web/directives/DataGetterDirective.java
Outdated
Show resolved
Hide resolved
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.
@litvinovg thanks.
Code reviewed and the usage of new directive tested.
Mentioned in VIVO GitHub issue
What does this pull request do?
Adds new Freemarker directive to execute DataGetters with provided parameters and save results as Freemarker variables.
What's new?
How should this be tested?
SparqlQueryDataGetter improvements covered by tests.
New directive could be tested by calling test data getter in Freemarker template:
Data getter configuration:
Interested parties
@VIVO-project/vivo-committers