Skip to content

[WIP] Paper Reference Relationship Visualization#2041

Closed
bruehldev wants to merge 23 commits into
JabRef:javafxfrom
bruehldev:PRRV
Closed

[WIP] Paper Reference Relationship Visualization#2041
bruehldev wants to merge 23 commits into
JabRef:javafxfrom
bruehldev:PRRV

Conversation

@bruehldev

@bruehldev bruehldev commented Sep 22, 2016

Copy link
Copy Markdown
Contributor
  • Is working
  • Show name during mouse hover on nodes
  • Screenshots added (for bigger UI changes)
    prrv-screenshot
  • Manually tested changed features in running JabRef
  • Zoom on node with highest referenceCount
  • String match regarding to special characters
  • Checkbox to suppress external nodes
  • Message for semicolon syntax
  • Put arrowhead on line
  • Notice title with the same name
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)
  • Change in CHANGELOG.md described
  • Tests created for changes

Remark for contributors:

  • Add external Prefux.jar library to your project. The path is JabRef/lib/Prefux.jar.
  • The prefux library is a little bit modified see here

@bruehldev

Copy link
Copy Markdown
Contributor Author

New Prrv (Paper Reference Relationship Visualization) Plugin using JavaFX and Prefux library (https://github.com/effrafax/Prefux).
Based on following issue: JabRef#95

@tobiasdiez

tobiasdiez commented Sep 22, 2016

Copy link
Copy Markdown
Member

Depending on how powerful and easy-to-use the Prefux library is, you also might consider d3 (which in my opinion is an amazing library). For the relationship of papers, you can use a directed graph or be a bit more creative with http://www.findtheconversation.com/concept-map/# or http://mbostock.github.io/d3/talk/20111116/bundle.html (should look good if you group by keyword). If you decide to go this way, here are a few links which might be helpful:

@bruehldev

Copy link
Copy Markdown
Contributor Author

@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.

@koppor

koppor commented Sep 29, 2016

Copy link
Copy Markdown
Member

@bruehldev It would be nice if you provided a link to code where one could inspect your experiments.

@bruehldev bruehldev closed this Oct 2, 2016
@bruehldev bruehldev deleted the PRRV branch October 2, 2016 18:28
@bruehldev bruehldev restored the PRRV branch October 2, 2016 18:28
@bruehldev bruehldev reopened this Oct 2, 2016
@bruehldev

bruehldev commented Oct 2, 2016

Copy link
Copy Markdown
Contributor Author

@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.
My currently problems are:

I will move the model to the correct folder, and delete the d3 test files and library on the next commit.

@koppor koppor changed the title [WIP] Prrv [WIP] PRRV Oct 5, 2016
@koppor koppor changed the title [WIP] PRRV [WIP] Paper Reference Relationship Visualization Oct 5, 2016
@koppor

koppor commented Oct 5, 2016

Copy link
Copy Markdown
Member

OutputStream to InputStream: http://stackoverflow.com/a/16973800/873282

-Added Prefux to external-libraries.txt
-Deleted D3 content
-Table insertion to prefux.jar

@boceckts boceckts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks nice but some work is still needed.

Comment thread external-libraries.txt Outdated
License: BSD 3-Clause



Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why did you insert empty lines here?

Optional<String> result = dialog.showAndWait();
String inputValue = result.get();

return inputValue;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The comment doesn't apply to this method.


/**
* Created by Daniel on 10/13/2016.
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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(",");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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)
@lenhard

lenhard commented Jan 20, 2017

Copy link
Copy Markdown
Member

@bruehldev Any news on this? How far is the PR regarding merging?

@koppor

koppor commented Feb 15, 2017

Copy link
Copy Markdown
Member

Looks good at demonstration settings.

  • When used at a real-life database, it has the issue that closing and reopening does not work.
  • The master branch has to be merged.
  • The prefux updates from https://github.com/bruehldev/Prefux/ should be generalized and sent back to the main repository
  • Since prefux is currently integrated as a jar, we have to work on getting prefux published on maven central.

We as JabRef developers currently don't have the time to work on this as are currently trying to focus on other things. 🔥
We will come back later to this topic, therefore closing adding on-hold label and closing this PR for now.

@koppor koppor closed this Feb 15, 2017
@koppor

koppor commented Apr 18, 2017

Copy link
Copy Markdown
Member

Related question on tex.sx: Tool to visualize connections between bibtex entries

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.

5 participants