-
Notifications
You must be signed in to change notification settings - Fork 0
Story/q20 19 #23
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
base: develop
Are you sure you want to change the base?
Story/q20 19 #23
Conversation
….0 into story/Q20-18
jdamerow
left a comment
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.
It really throws me off that the ConceptPower classes capitalize the "P" 😅 the app is called "Conceptpower". Maybe change the class names? :)
| // If both old and new cache values are null/blank/empty, nothing has changed | ||
| // If old value is null/blank/empty, new value is not null/blank/empty, difference present | ||
| // If old value is not null/blank/empty, new value is null/blank/empty, difference present | ||
| // If both are not null/blank/empty, we need to check difference |
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.
this should probably go into the javadoc (which is missing)
| if (isDifferentString(conceptCache.getPos(), this.getPos())) return -1; | ||
| if (isDifferentString(conceptCache.getTypeId(), this.getTypeId())) return -1; | ||
| if (isDifferentString(conceptCache.getUri(), this.getUri())) return -1; | ||
| if (isDifferentString(conceptCache.getWord(), this.getWord())) return -1; |
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.
this is not following our formatting guidelines. or it could be put as an OR statement (formatted one condition a line), so that only once -1 is returned.
| if(isDifferentString(type.getDescription(), this.getDescription())) return -1; | ||
| if(isDifferentString(type.getName(), this.getName())) return -1; | ||
| if(isDifferentString(type.getUri(), this.getUri())) return -1; | ||
| return 0; |
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.
same as before
| @Override | ||
| public ConceptPowerReply getConceptPowerReply(String conceptURI) { | ||
| Map<String, String> pathVariables = new HashMap<>(); | ||
| pathVariables.put("concept_uri", conceptURI); |
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.
these are not path variables, are they? but parameters?
| logger.error("Could not get concept for URI: " + conceptURI + " at URL: " + conceptPowerURL, e); | ||
| } | ||
|
|
||
| return null; |
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.
it looks like don't where you use the return value, you don't check for null, which means it'll throw a nullpointer if conceptpower is down? or throws an error? The better approach would probably be throw an exception if there is no response or an exception from conceptpower, and then handle it appropriate where it makes sense.
| private boolean updateConceptCache(ConceptCache conceptCache, ConceptCache conceptCacheOld, String uri) { | ||
|
|
||
| // ConceptPower returned a concept and either no conceptCache entry exists in the DB | ||
| // or if one exists, it is different from the current conceptCache entry |
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.
this should probably be part of the javadoc
| List<ConceptEntry> conceptEntries = conceptPowerReply.getConceptEntries(); | ||
| ConceptCache conceptCache = null; | ||
|
|
||
| if (conceptEntries != null && !conceptEntries.isEmpty()) { |
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.
turn this if around and just return if this condition is not met. It'll unindent all the following code.
...ga/src/main/java/edu/asu/diging/quadriga/core/service/impl/MappedTripleGroupServiceImpl.java
Show resolved
Hide resolved
| neo4j.url=${neo4j.url} | ||
| neo4j.database=${neo4j.database} | ||
|
|
||
| conceptpower_base_url=${conceptpower.base.url} |
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.
there is no conceptpower.base.url property in the pom, is there? If this property is required here, it needs to be added to the pom.
|
|
||
| citesphere_client_id=${citesphere.client.id} | ||
| citesphere_client_secret=${citesphere.client.secret} | ||
| citesphere_client_secret=${citesphere.client.id} |
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.
this does not look right
|
|
||
| ConceptCache conceptCache = conceptCacheService.getConceptByUri(uri); | ||
|
|
||
| conceptCacheUpdateInterval=0; |
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.
this seems wrong
|
|
||
| // Determine page number and size for network pagination | ||
| page = (page == null || page < 0) ? 0 : page - 1; | ||
| size = (size == null || size < 1) ? 10 : size; |
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.
instead of checking for null you can just specify a default value in the RequestParam annotation
| neo4j.url=${neo4j.url} | ||
| neo4j.database=${neo4j.database} | ||
|
|
||
| conceptpower_base_url=${conceptpower.base.url} |
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.
I think this has still not been added to the pom?
|
Make it so, Jenkins. |
|
Tests are failing |
Guidelines for Pull Requests
If you haven't yet read our code review guidelines, please do so, You can find them here.
Please confirm the following by adding an x for each item (turn
[ ]into[x]).Please provide a brief description of your ticket
(you can copy the ticket if it hasn't changed)
https://diging.atlassian.net/browse/Q20-19
On the collection page, it should be possible to browse all networks in collection -
basically a paginated list of all networks ordered by submission date. When the user clicks on a network it would be visualized (similar to the old quadriga).
Anything else the reviewer needs to know?
This story is dependent on story Q20-3, Q20-7, Q20-12, Q20-18 and since all of these stories are yet to be merged, this PR may show a lot of file changes that are actually part of the above stories. This will go away once all of these are merged