GraphvizDot.writeEdge( defaultRoot, dotName( ft ), null, out );
private static void createGraph( BufferedWriter out, AppSchema schema, FeatureType root ) throws IOException { if ( root != null ) { addNode( out, root ); } FeatureType[] directSubtypes = schema.getDirectSubtypes( root ); if ( directSubtypes != null && directSubtypes.length > 0 ) { for ( FeatureType dft : directSubtypes ) { if ( dft != null ) { GraphvizDot.writeEdge( dotName( root ), dotName( dft ), null, out ); createGraph( out, schema, dft ); } } } }
/** * @param out * @param id * @param level * @param sonID * @throws IOException */ public void outputAsDot( Writer out, String id, int level, int sonID ) throws IOException { if ( isLeaf() ) { GraphvizDot.writeVertex( id, getDotVertex( level, sonID, true ), out ); } else { GraphvizDot.writeVertex( id, getDotVertex( level, sonID, false ), out ); for ( int i = 0; i < 4; ++i ) { QTree<T> child = children[i]; if ( child != null ) { String newID = id + i; child.outputAsDot( out, newID, level + 1, i ); GraphvizDot.writeEdge( id, newID, null, out ); } } } }