Skip to content
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

Moving Data Distribution API into the Vitro codebase #484

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

litvinovg
Copy link
Member

VIVO GitHub issue

  • Other Relevant Links (Mailing list discussion, related pull requests, etc.)

What does this pull request do?

Added the Data Distribution API and report generation into Vitro codebase.

Additional Notes:

Any additional information that you think would be helpful when reviewing this PR.

Interested parties

@chenejac @hauschke @brianjlowe

Reviewers' expertise

Candidates for reviewing this PR should have some of the following expertises:

  1. Java
  2. HTML, CSS, JavaScript
  3. FreeMarker
  4. SPARQL
  5. Ontologies
  6. Natural language knowledge
    1. English
    2. German
    3. Spanish
    4. French
    5. Portuguese
    6. Russian
    7. Serbian

Reviewers' report template

Please update the following template which should be used by reviewers.

General comment

A reviewer should provide here comments and suggestions for requested changes if any.

Testing

A reviewer should briefly describe here how it was tested

Code reviewing

A reviewer should briefly describe here which part was code reviewed

@litvinovg litvinovg requested a review from chenejac January 16, 2025 09:57
@hauschke
Copy link
Member

@markuskotte agreed to review German language parts, when and if necessary.

Copy link
Contributor

@chenejac chenejac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@litvinovg thanks for nice and significant contribution. I have posted a couple of comments.

Sandra Mierz and others added 24 commits March 3, 2025 16:16
takeover from graham

rm unimplemented or unnecessary classes

rm unused distributors

added us text for vqt

use local server port to make new request instead of port used by the client

fix self signed certificate issue

Renamed german translation properties

checkstyle fixes
This reverts commit 7c2f665991b94c8d9f7e4f38342502815a4be8f7.
This reverts commit 915f96dc8549f11aad44c62a21f5096e02345528.
chenejac
chenejac previously approved these changes Mar 12, 2025
@chenejac chenejac requested a review from ivanmrsulja March 12, 2025 11:30
Copy link
Member

@ivanmrsulja ivanmrsulja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Very large PR but I managed to find some potential things to improve. If you have time please address some of them 😃 Good work!

RoleInfo roleCopy = role.clone();
roleInfos.add(roleCopy);
operationsToRoles.put(operation.toLowerCase(), roleInfos);
for (String roleUri : roles.keySet()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that iterating using (Map.Entry<String, Map<String, Boolean>> entry : operations.entrySet()) will be more efficient.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you see a performance issue there?
Suggested code looks less readable to me.

} else {
EntityPolicyController.revokeAccess(entityUri, aot, ao, role.getUri());
if (Boolean.TRUE.equals(roles.get(role))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Boolean.TRUE.equals() used for better readability?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

public void generateReport(OutputStream outputStream, RequestModelAccess request, UserAccount account)
throws ReportGeneratorException {
// Get the XML
Document xmlDoc = generateXml(request, account);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check is xmlDoc is null

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving Data Distribution API into the Vitro codebase
4 participants