aboutsummaryrefslogtreecommitdiffstats
path: root/container-di
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-07-24 17:51:38 +0200
committerBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-07-24 17:51:38 +0200
commit44e73fc84cbb5b94af45626165343263fccf0ce3 (patch)
tree035347d9dd0e79a4c13539fb31494dc88fb18d70 /container-di
parent48936d2c44f6780882a18b3706d8e6ecae79b4a5 (diff)
DotGraph is not in use
Diffstat (limited to 'container-di')
-rw-r--r--container-di/pom.xml4
-rw-r--r--container-di/src/main/scala/com/yahoo/container/di/componentgraph/core/DotGraph.scala46
2 files changed, 0 insertions, 50 deletions
diff --git a/container-di/pom.xml b/container-di/pom.xml
index 0e1ff44558f..86baa0f2081 100644
--- a/container-di/pom.xml
+++ b/container-di/pom.xml
@@ -59,10 +59,6 @@
<artifactId>scala-library</artifactId>
</dependency>
<dependency>
- <groupId>org.scala-lang.modules</groupId>
- <artifactId>scala-xml_${scala.major-version}</artifactId>
- </dependency>
- <dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_${scala.major-version}</artifactId>
<scope>test</scope>
diff --git a/container-di/src/main/scala/com/yahoo/container/di/componentgraph/core/DotGraph.scala b/container-di/src/main/scala/com/yahoo/container/di/componentgraph/core/DotGraph.scala
deleted file mode 100644
index 90d9646f284..00000000000
--- a/container-di/src/main/scala/com/yahoo/container/di/componentgraph/core/DotGraph.scala
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.di.componentgraph.core
-
-/**
- * Generate dot graph from a ComponentGraph
- *
- * @author tonytv
- * @author gjoranv
- * @since 5.1.4
- */
-
-object DotGraph {
-
- def generate(graph: ComponentGraph): String = {
- val nodes = graph.nodes map(node)
-
- val edges = for {
- node <- graph.nodes
- usedNode <- node.usedComponents
- } yield edge(node, usedNode)
-
- (nodes ++ edges).
- mkString(
- """|digraph {
- | graph [ratio="compress"];
- | """.stripMargin, "\n ", "\n}")
- }
-
- private def label(node: Node) = {
- node.label.replace("\n", "\\n")
- }
-
- private def node(node: Node): String = {
- <node>
- "{node.componentId.stringValue()}"[shape=record, fontsize=11, label="{label(node)}"];
- </node>.text.trim
- }
-
- private def edge(node: Node, usedNode:Node): String = {
- <edge>
- "{node.componentId.stringValue()}"->"{usedNode.componentId.stringValue()}";
- </edge>.text.trim
-
- }
-
-}