Java Graph Visualisation Library: Nodes with multiple connect points - java

Can anyone recommend a Java Graph Visualisation library in which graph nodes can be rendered with multiple connect points?
For example, supposing a graph node represents a processor that takes input from two sources and produces output. This would be visualised as 3 vertices. However, clearly each vertex has a defined role in the workflow and therefore ideally my node would appear with 3 distinct connection points that the user could attach vertices to.
I've taken a look at JUNG but I don't think it will suit my needs.
Any recommendations welcome; either on specific libraries or alternative approaches I can take.

You could try JGraph's java library
JGRAPH
It has a good amount of functionality and I have used it with success before. The only thing is that the documentation is a bit lacking, but if you read through some examples and code its pretty good when you get the hang of it.

Take a look at JGraph (http://www.jgraph.com/). I used jgraph-5.14.0.0 for a similar project before. Here are the graphs that I made for another project: https://github.com/eamocanu/spellcheck.graph/tree/master/graph%20photos

Related

My own graph representation for Neo4j

I have a graph that I want to explore in different ways. This graph is going to be explored by users and I cannot know in advance what information they want to retrieve from the graph. I like Cypher very much and I was wondering if I can use it as a frond-end but using my own representation of the graph.
Let me explain that: I cannot transform my graph into a Neo4j Graph for performance reasons. Hence, I was thinking that maybe I can use Cypher and a modification of Neo4j to explore the graph using my own representation of Node, Labels, Properties and so on.
I think this solution would be good because I can:
Reuse the parser and semantic checker of the language
Partially reuse the optimization engine, let's say the platform independent part.
I was exploring the source code at github and it seems really coupled to a specific implementation.
My questions:
Are you aware of some project using Cypher/Neo4j like this?
Are you aware of another graph database with a good query language that can be used like that?
Any suggestions on how to address the modifications to Neo4J
Just to explain a little bit why I cannot copy the graph. It is a graph that is already produced by another system. It changes a lot an it has easily 10000 nodes, I cannot monitor the graph modification to update the graph because it is, once again, time consuming. Even worse, I have to provide a mechanism to query the graph every five seconds.

get distance between two places

I actually am trying to find the distance between two places, I am new to this. I came to know about openstreetmap. But I am not sure what to do.
I found a traveling salesman application that uses osm to route.
But here my question is how to get a osm between places .e.g. "http://www.openstreetmap.org/api/0.6/map?bbox=10,30,10,30" this gives me the map of the box (10,30,10,30) .. but if I want to get the map between leeds and sheffield what should be my query.
Or is there any other way to find the distance.(As I am a student I want some open source way for my academic project..)
please suggest..
You should consider implementing this by yourself.
First, I suggest you to use the Overpass API to do your queries.
Then implement this algorithm over the ways you get from the Overpass API :)
For calculating the routing distance between two places you can use one of the various online or offline routers. There is also a list of various information for routing developers containing a list of libraries and other information.
If you have to obtain the location of a specific address before doing the actual routing you can use Nominatim.

data structure for Graph in java

i am looking to implement a algorithm for the Travel Salesman Problem. I want to model the solution using the graph , in this a vertex will represent a city and edge will represent the cost from one city to another.
At any point i have to compute cost from one city to another like
(cityA, cityB)--->cost
What data structure in java should i use for graph?
And what kind of GUI tool or library can i use to represent a graph ?
If you are free to use external libraries, JGraphT is easy to use.
Why a graph, of course. Take a look at JUNG.
depending on the size of your problem and your hardware, you might want to take a look at nosql graph databases like: http://neo4j.org/
most of them are easy to handle and some (like neo4j) provide a graph visualization which is nice for debugging purpose.
if you want to develop with as much performance as possible, you might have to create your own simple graph format. Most of the told ones are slow due to a lot of overhead (generics etc.)

Java - generate class diagram by myself

I am working on a small project in Java described below:
Input: List of objects for directed graph. ( Nodes with different kind of edges: inheritance, inner-class, friend classes, etc. )
Output: class diagram, as planar as possible.
My problem is:
I would like to have some 3rd party software that will do it for me or at least have an algorithm of selecting nodes and edges to keep my graph as planar as possible.
EDIT:
I see I may not have written clearly what I want... I don't want to generate class diagram based on Java project with its files, but I am parsing C++ file and get from there list described in above input. Then I want to call some function on that list and get my diagram. I was trying to use JGraph or JGraphT but I unfortunately didn't find any graph-theory functionality which suit my requirements.
Regards,
Daniel
If you use Eclipse IDE you can use Soyatec's eUML2 free plugin. Have a look here.

any API for handling graph? in java

I would like to use the concept of MindMap
http://en.wikipedia.org/wiki/Mind_map
in a AI program. Is there any API for java? A good api for drawing and manipulating graphs with enough documentation and examples will also do the job.
I dont actually need to represent it graphically , i just need to build the map in any method(used for representing graphs, ) and search in it.
The program shall take a word as input
Search the mindmap for it and display the relevant words.
JGraphT was possible solution for me. I am working on it
Have you tried FreeMind? It's an open-source Java MindMap framework.

Categories

Resources