[WIP] Paper Reference Relationship Visualization#2041
Conversation
|
New Prrv (Paper Reference Relationship Visualization) Plugin using JavaFX and Prefux library (https://github.com/effrafax/Prefux). |
|
@tobiasdiez I tried to use https://github.com/stefaneidelloth/javafx-d3 because I already coded with d3 and it sounded very tempting to display these variations. But it's not possible to simply wrap your d3.js code and put it in JavaFx. You have to use the javafxd3 library which is not completed yet. When I was at the point where I set out my nodes I discovered the whole force layout (https://github.com/stefaneidelloth/javafx-d3/blob/master/javafx-d3/main/java/org/treez/javafxd3/d3/layout/Force.java) and other listener are not implemented yet. The prefux library is not perfect, because i had to implemented arrowheads and some listener on myself, but at least I am not fully depending on the library. |
|
@bruehldev It would be nice if you provided a link to code where one could inspect your experiments. |
|
@koppor I pushed my changes on JabRef so far. The prefux plugin works and can be tested over JabRef ->View -> Paper Reference Relationship Visualization. Each bib entry needs a field for references. Inside of the highest jabref folder is a seminar.bib which can be loaded to test it.
I will move the model to the correct folder, and delete the d3 test files and library on the next commit. |
|
OutputStream to InputStream: http://stackoverflow.com/a/16973800/873282 |
-Added Prefux to external-libraries.txt -Deleted D3 content -Table insertion to prefux.jar
Fixed wrong order of rendering Added color renderer Deleted defaultedgerenderer
Corrected extern to external
Ask user for root node of his document
boceckts
left a comment
There was a problem hiding this comment.
Looks nice but some work is still needed.
| License: BSD 3-Clause | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
Why did you insert empty lines here?
| Optional<String> result = dialog.showAndWait(); | ||
| String inputValue = result.get(); | ||
|
|
||
| return inputValue; |
There was a problem hiding this comment.
Please return the Optional as I think this will throw an exception if the input dialog is empty. return dialog.showAndWait();
| * @return inputValue as String of the input field | ||
| */ | ||
| public static String showTextInputDialogAndWait(String defaultText, String title, String context) { | ||
| TextInputDialog dialog = new TextInputDialog(defaultText); |
There was a problem hiding this comment.
The whole point of the FXDialogs class is that it provides methods to easily instantiate a dialog that inherits from FXAlert. This is important as JavaFX dialogs do not natively disable and unfocus swing windows which is why we need a class that takes care of it; the FXAlert class. So please create a custom TextInputDialog that inherits from FXAlert.
| /** | ||
| * This will create and display a new textinputdialog of the specified | ||
| * {@link AlertType} but with user defined buttons as optional | ||
| * {@link ButtonType}s. |
There was a problem hiding this comment.
The comment doesn't apply to this method.
|
|
||
| /** | ||
| * Created by Daniel on 10/13/2016. | ||
| */ |
There was a problem hiding this comment.
Please replace with a describing javadoc comment as I have no idea what this class does or if it is even needed.
|
|
||
| // Create edges & external nodes | ||
| for (int sourceID = 0; pureEntryList.size() > sourceID; sourceID++) { | ||
| if (pureEntryList.get(sourceID).getField("cites").isPresent()) { |
There was a problem hiding this comment.
This can be filtered by using the pureEntryList.stream.filter(...) method outside of the for loop.
| for (int sourceID = 0; pureEntryList.size() > sourceID; sourceID++) { | ||
| if (pureEntryList.get(sourceID).getField("cites").isPresent()) { | ||
| // Split cites | ||
| String[] citeLines = pureEntryList.get(sourceID).getField("cites").get().split(","); |
There was a problem hiding this comment.
If you convert the array to a list you can also filter the list by using a stream and calling the filter method to remove all null values. This way you need less if statement inside the for loop.
| for (int targetID = 0; pureEntryList.size() > targetID; targetID++) { | ||
| // Don't refer to yourself | ||
| // Cite matching with bibtexkey of any bibtex entry? | ||
| if (citeLine.trim().equals((pureEntryList.get(targetID).getField("bibtexkey").get().trim())) && sourceID != targetID) { |
There was a problem hiding this comment.
As far as I know the getField() method of an entry returns an optional which can also be null. Can it happen that at his stage an entry in the pureEntryList has no BibTeX-key?
| * | ||
| * @param sourceID start of the edge | ||
| * @param targetID end of the edge | ||
| */ |
There was a problem hiding this comment.
Parameter missing and I think "Adds an edge to the graph" is more appropriate.
|
|
||
| About_JabRef=About_JabRef | ||
|
|
||
| Paper_Reference_Relationship_Visualization = Paper_Reference_Relationship_Visualization |
There was a problem hiding this comment.
You need to run ./gradlew localizationUpdate to include the string in the remaining property files.
Show bibtex as label instead of tooltips Boolean for externalnodes and nodes without edges
Show bibtexkey as label instead of tooltip
# Conflicts: # external-libraries.txt # seminar.bib # src/main/java/net/sf/jabref/gui/JabRefFrame.java # src/main/java/net/sf/jabref/gui/prrv/PrrvDialogView.java # src/main/java/net/sf/jabref/gui/prrv/ReferenceRelationship.java
Refine code
# Conflicts: # src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java # src/main/java/net/sf/jabref/model/entry/FieldName.java
Addded missing Check_integrity in JabRef_... Added missing Paper_Reference_Relationship_Visualization in Menu_... Deleted No_references_found
New chapter in javafx changelog (feature)
|
@bruehldev Any news on this? How far is the PR regarding merging? |
|
Looks good at demonstration settings.
We as JabRef developers currently don't have the time to work on this as are currently trying to focus on other things. 🔥 |
|
Related question on tex.sx: Tool to visualize connections between bibtex entries |
Remark for contributors:
JabRef/lib/Prefux.jar.