Home Wiki Blog Forum GEXF.net

Gephi forums

Community support

How To fetch graph information in the Java code.

Once it's running

How To fetch graph information in the Java code.

Postby sayongitab » 15 May 2013 11:01

Hi,

iam trying to plot a graph in gephi using java code. The data that comes might be partially duplicate. However whenever such partially duplicate data arrives i need to update same position on the graph with updated value for the data.

For eg . counterparty = "Bank1" is plotted for unmatchedAmount = 20 on the x-y graph . however counterparty = "Bank1" again arrives after some time but with different value for unmatchedAmount =10. In this case I want to update same position of bank1 with changed value of unmatched amount.


So the question here is how do i fetch the data which is already plotted on gephi back in my java code so that i can compare it with existing data on the graph and if match is found then update it with new value instead of plotting the new value on the graph.

Which code exactly from the toolkit needs to be used here. In which data structure is the json formatted data from gephi to be collected back. What datstructure does gephi use internally in order to fetch the JSON formatted data to it ?

Please help.
sayongitab
 
Posts: 13
Joined: 09 May 2013 12:43

Re: How To fetch graph information in the Java code.

Postby pegerp » 17 May 2013 09:18

Hi sayongitab.

Check this example at Gephi Toolkit Portal: https://wiki.gephi.org/index.php/Toolki ... late_Graph

There are examples how you can iterate over nodes, fetch nodes by their ID and modify the nodes. Whenever you are about to insert new data check whether the node or edge already exists before inserting it. That way you should be able to code the logic to update existing data according to your needs. That should hopefully get you started.
pegerp
 
Posts: 101
Joined: 21 Dec 2011 18:10

Re: How To fetch graph information in the Java code.

Postby sayongitab » 20 May 2013 08:32

thanks pegerp. I will try this out.
Also one more thing whenever i try to add the gephitoolkit jar in the buildpath of the project in eclipse the classes are never recognized when i write code using the toolkit files. Is there some other way out to this issue other than decompiling the source and putting files directly as part of the project ? i ended up decompiling json files and adding them in the project as json.jar files were not being picked up and throwed noCallDefinationFound error.
sayongitab
 
Posts: 13
Joined: 09 May 2013 12:43

Re: How To fetch graph information in the Java code.

Postby pegerp » 20 May 2013 19:55

Do you mean Eclipse or Netbeans? I'm using Netbeans because Gephi is developed with it. Those programs are quite similar. Can't help you more with that issue though.
pegerp
 
Posts: 101
Joined: 21 Dec 2011 18:10


Return to How-To and Troubleshooting

Who is online

Users browsing this forum: No registered users and 1 guest

sports medicine portsmouth nh where to buy metronidazole