Package com.im.df.api.dml
Class Vertices
- java.lang.Object
-
- com.im.df.api.dml.Vertices
-
public final class Vertices extends java.lang.Object
Common utilities related toDFDataTree.Vertex
class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Vertices.DataTreeLevelComparator
Compares two vertices according to their level in a data tree to which they belong.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
prettyPrintTree(DFDataTree.Vertex vertex)
Pretty-prints tree having givenDFDataTree.Vertex
as a root.
-
-
-
Method Detail
-
prettyPrintTree
@Beta public static java.lang.String prettyPrintTree(DFDataTree.Vertex vertex)
Pretty-prints tree having givenDFDataTree.Vertex
as a root.E.g.:
+-- root entity () +-- entity A (1:1) |-- entity B (1:1) | |-- entity C (M:N) | | |-- entity D (M:1) | | +-- entity I (1:1) | +-- entity H (1:1) |-- entity E (1:1) | +-- entity G (1:1) +-- entity F (1:M)
Note: this method is not considered stable API and might be removed at any time. More generic solution is being considered instead. So use this only during development.
- Parameters:
vertex
- vertex whose sub-tree to print- Returns:
- pretty-printed tree as string
-
-