title: Embeddable customizable graph editor (Java, Flash, HTML+Javascript)
body: <p>I have an application that uses intricate graph-like structure as a configuration. The application itself resembles a <a href="http://en.wikipedia.org/wiki/Netgraph" rel="nofollow">NetGraph</a>- or <a href="http://en.wikipedia.org/wiki/Netfilter" rel="nofollow">netfilter</a> firewall, thus graph nodes have types and properties (which correspond to operations) and they're interconnected with directed edges.</p>
  
  <p>I'd like to have an easy-to-user configuration editor for my application that provides visualization and editing for configuration as a graph.</p>
  
  <p>In my dream scenario, application would receive this configuration as a file in one of popular graph formats (for example, <a href="http://en.wikipedia.org/wiki/Trivial_Graph_Format" rel="nofollow">TGF</a>, <a href="http://en.wikipedia.org/wiki/DOT_language" rel="nofollow">DOT</a>, <a href="http://en.wikipedia.org/wiki/GraphML" rel="nofollow">GraphML</a>, etc), parse it and use.</p>
  
  <p>A few requirements (not really strict, I'm open to consider various options) - graph editor should be:</p>
  
  <ul>
  <li>available to be embedded in web UI - i.e. implemented in Javascript/HTML, Flash or as a Java applet</li>
  <li>able to load TGF-style graph (i.e. without layouting instructions, nodes would be without coordinates) and lay it out in a somewhat decent automatically</li>
  <li>able to save this graph back</li>
  <li>able to load/save using requests to HTTP server, not a file directly</li>
  <li>customizable to make it work with strict set of node types (so that user can't just create arbitrary node type or arbitrary properties for a given node)</li>
  <li>open-source</li>
  </ul>
  
  <p>So far I've found <a href="http://www.yworks.com/en/products_yed_about.html" rel="nofollow">yEd</a> and it's Flash version, <a href="http://www.yworks.com/en/products_graphity_about.html" rel="nofollow">Graphity</a> - both look cool, but they aren't customizable (to strip them to bare-bones functionality, i.e. creation of one a few node types) and not open source, so embedding them anywhere pledges to be somewhat painful.</p>
  
  <p>Another option I'm considering is trashing the whole "visual editor" idea and make user just write down bare TGF or DOT-style definitions in a plain text file <em>and</em> visualize them for later checking using something like <a href="http://www.graphviz.org/" rel="nofollow">GraphViz</a>. Is it a viable way to go?</p>