Representing a network diagram using SVG and JAVA

V

vishal.changrani

Hello all,
Wow this forum is exactly what I was looking for!
Am kinda new to design paterns and have stumbled upon a design
problem....
I am trying to add SVG based graphics support to an existing Struts/
JSP/Servlet based web application. Basically I wanted to display a
network diagram comprising of 4 different type of elements.

I am using 'Recursive Composition' for my basic 4 elements and an
additional group element.
So I have an super-class called Element and then 5 sub-classes of it ,
one for each of the basic elements and 1 called Groupd which
aggragates all the 4 basic elements.

Now these elements are to be represented as network diagram. For this
I am using the 'Composite Structural Pattern'. However, currently the
diagram is in the form of a tree such that on run time - object
element1 may be connected to element2 and element 3..element2 may be
inturn connected to elemet4 and 5 and so on and so forth....

Could you help me decide and suggest me a design pattern (if one
exist) on how should I have a class which encapsulates how the
elements are connected to each other. So this class would contain
information on how elements are connected to each other on run-time -
as a Graph, as a tree or something else.
I was thinking of then using the class and passing it to the
Compositor class which generates the SVG XML (by in-turn calling
draw() on each of the basic elements)

I hope my email does not sounds confusing.
Any help will be much appreciated.

Thanks,
Vishal


PS:I have created a Visio class diagram for the same ...if anybody is
interested. lemme know and I will email it to you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top