Skip to content

Commit

Permalink
release 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yfirmy committed Jan 10, 2020
1 parent 5c72489 commit bb35a2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>fr.firmy.lab</groupId>
<artifactId>eternity2-server</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
<name>eternity2-server</name>
<description>Eternity II Server</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import fr.firmy.lab.eternity2server.model.Action;
import fr.firmy.lab.eternity2server.model.MaterializedPath;
import fr.firmy.lab.eternity2server.model.Node;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

Expand All @@ -20,6 +22,8 @@
@Component
public class GraphService {

private static Logger LOGGER = LoggerFactory.getLogger( GraphService.class );

private SearchTreeManager searchTreeManager;

@Autowired
Expand All @@ -30,7 +34,11 @@ public GraphService(SearchTreeManager searchTreeManager) {
public String createMermaidDiagram() {

Tree inMemory = new Tree();
inMemory.load( searchTreeManager.getAllPaths() );
List<Node> paths = searchTreeManager.getAllPaths();
inMemory.load( paths );

LOGGER.info("Database LTREE contains "+ paths.size() + " lines" );
LOGGER.info("Drawn Tree Diagram contains "+ inMemory.index.size() + " nodes" );

StringBuilder output = new StringBuilder();
append("graph TD\n", output);
Expand Down Expand Up @@ -62,7 +70,6 @@ private void writeTreeNode(TreeNode node, StringBuilder output) {
}

private void append(String line, StringBuilder output) {
System.out.print(line);
output.append(line);
}

Expand Down

0 comments on commit bb35a2c

Please sign in to comment.