Skip to content

Commit

Permalink
Don't put the 'Generated by SchemaSpy' label on the utility graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
johncurrier committed Sep 15, 2005
1 parent 060c5fb commit da24638
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/net/sourceforge/schemaspy/view/DotFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private WriteStats writeRelationships(Table table, boolean includeImplied, boole
DotTableFormatter formatter = DotTableFormatter.getInstance();

String graphName = includeImplied ? "impliedTwoDegreesRelationshipsGraph" : (twoDegreesOfSeparation ? "twoDegreesRelationshipsGraph" : "oneDegreeRelationshipsGraph");
writeHeader(graphName, false, dot);
writeHeader(graphName, false, true, dot);

Set relatedTables = getImmediateRelatives(table, includeImplied, stats);

Expand Down Expand Up @@ -144,14 +144,16 @@ private Set getImmediateRelatives(Table table, boolean includeImplied, WriteStat
return relatedTables;
}

private void writeHeader(String graphName, boolean compact, LineWriter dot) throws IOException {
private void writeHeader(String graphName, boolean compact, boolean showLabel, LineWriter dot) throws IOException {
dot.writeln("// dot " + Dot.getInstance().getVersion() + " on " + System.getProperty("os.name") + " " + System.getProperty("os.version"));
dot.writeln("digraph \"" + graphName + "\" {");
dot.writeln(" graph [");
dot.writeln(" rankdir=\"RL\"");
dot.writeln(" bgcolor=\"" + StyleSheet.getInstance().getBodyBackground() + "\"");
dot.writeln(" label=\"\\nGenerated by SchemaSpy\"");
dot.writeln(" labeljust=\"l\"");
if (showLabel) {
dot.writeln(" label=\"\\nGenerated by SchemaSpy\"");
dot.writeln(" labeljust=\"l\"");
}
if (compact) {
dot.writeln(" nodesep=\"" + CompactNodeSeparator + "\"");
dot.writeln(" ranksep=\"" + CompactRankSeparator + "\"");
Expand Down Expand Up @@ -189,7 +191,7 @@ private WriteStats writeRelationships(Collection tables, boolean includeImplied,
else
graphName = "largeRelationshipsGraph";
}
writeHeader(graphName, compact, dot);
writeHeader(graphName, compact, true, dot);

Iterator iter = tables.iterator();

Expand Down Expand Up @@ -221,7 +223,7 @@ private WriteStats writeRelationships(Collection tables, boolean includeImplied,

public void writeOrphan(Table table, LineWriter dot) throws IOException {
DotTableFormatter formatter = DotTableFormatter.getInstance();
writeHeader(table.getName(), false, dot);
writeHeader(table.getName(), false, false, dot);
formatter.writeNode(table, "tables/", true, false, true, dot);
dot.writeln("}");
}
Expand Down

0 comments on commit da24638

Please sign in to comment.