├── .gitignore
├── LICENSE
├── README.md
├── cli
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── graphper
│ │ ├── Arguments.java
│ │ ├── Command.java
│ │ ├── CommandUnit.java
│ │ ├── CommandUnits.java
│ │ ├── Main.java
│ │ ├── Version.java
│ │ └── WrongCommandException.java
│ └── resources
│ └── logback.xml
├── core
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ └── org
│ │ │ ├── apache_gs
│ │ │ └── commons
│ │ │ │ ├── lang3
│ │ │ │ ├── ArrayUtils.java
│ │ │ │ ├── CharSequenceUtils.java
│ │ │ │ ├── CharUtils.java
│ │ │ │ ├── Range.java
│ │ │ │ └── StringUtils.java
│ │ │ │ └── text
│ │ │ │ ├── StringEscapeUtils.java
│ │ │ │ └── translate
│ │ │ │ ├── AggregateTranslator.java
│ │ │ │ ├── CharSequenceTranslator.java
│ │ │ │ ├── CodePointTranslator.java
│ │ │ │ ├── CsvTranslators.java
│ │ │ │ ├── EntityArrays.java
│ │ │ │ ├── JavaUnicodeEscaper.java
│ │ │ │ ├── LookupTranslator.java
│ │ │ │ ├── NumericEntityEscaper.java
│ │ │ │ ├── NumericEntityUnescaper.java
│ │ │ │ ├── OctalUnescaper.java
│ │ │ │ ├── SinglePassTranslator.java
│ │ │ │ ├── UnicodeEscaper.java
│ │ │ │ ├── UnicodeUnescaper.java
│ │ │ │ ├── UnicodeUnpairedSurrogateRemover.java
│ │ │ │ └── package-info.java
│ │ │ └── graphper
│ │ │ ├── api
│ │ │ ├── Assemble.java
│ │ │ ├── Cluster.java
│ │ │ ├── ClusterAttrs.java
│ │ │ ├── FileType.java
│ │ │ ├── FloatLabel.java
│ │ │ ├── GraphAttrs.java
│ │ │ ├── GraphContainer.java
│ │ │ ├── GraphResource.java
│ │ │ ├── Graphviz.java
│ │ │ ├── Html.java
│ │ │ ├── Line.java
│ │ │ ├── LineAttrs.java
│ │ │ ├── Node.java
│ │ │ ├── NodeAttrs.java
│ │ │ ├── Subgraph.java
│ │ │ ├── attributes
│ │ │ │ ├── ArrowShape.java
│ │ │ │ ├── ClusterShape.java
│ │ │ │ ├── ClusterShapeEnum.java
│ │ │ │ ├── ClusterStyle.java
│ │ │ │ ├── Color.java
│ │ │ │ ├── Dir.java
│ │ │ │ ├── FontStyle.java
│ │ │ │ ├── InitPos.java
│ │ │ │ ├── Labeljust.java
│ │ │ │ ├── Labelloc.java
│ │ │ │ ├── Layout.java
│ │ │ │ ├── LineStyle.java
│ │ │ │ ├── NodeShape.java
│ │ │ │ ├── NodeShapeEnum.java
│ │ │ │ ├── NodeStyle.java
│ │ │ │ ├── Port.java
│ │ │ │ ├── Rank.java
│ │ │ │ ├── Rankdir.java
│ │ │ │ ├── Splines.java
│ │ │ │ ├── Style.java
│ │ │ │ └── Tend.java
│ │ │ └── ext
│ │ │ │ ├── Box.java
│ │ │ │ ├── CirclePropCalc.java
│ │ │ │ ├── ClusterShapePost.java
│ │ │ │ ├── CylinderPropCalc.java
│ │ │ │ ├── DefaultBox.java
│ │ │ │ ├── DiamondPropCalc.java
│ │ │ │ ├── EllipsePropCalc.java
│ │ │ │ ├── LabelPositionCalc.java
│ │ │ │ ├── NodeShapePost.java
│ │ │ │ ├── NotePropCalc.java
│ │ │ │ ├── ParallelogramPropCalc.java
│ │ │ │ ├── PlainPropCalc.java
│ │ │ │ ├── PointPropCalc.java
│ │ │ │ ├── PortPosition.java
│ │ │ │ ├── RatioPortPosition.java
│ │ │ │ ├── RecordPropCalc.java
│ │ │ │ ├── RectanglePropCalc.java
│ │ │ │ ├── RegularPolylinePropCalc.java
│ │ │ │ ├── ShapeCenterCalc.java
│ │ │ │ ├── ShapePosition.java
│ │ │ │ ├── ShapePropCalc.java
│ │ │ │ ├── StarPropCalc.java
│ │ │ │ ├── SymmetryShapeCenterCalc.java
│ │ │ │ ├── TrapeziumPropCalc.java
│ │ │ │ └── TrianglePropCalc.java
│ │ │ ├── def
│ │ │ ├── AbstractBaseGraph.java
│ │ │ ├── AbstractDirectedEdge.java
│ │ │ ├── AbstractEdge.java
│ │ │ ├── AbstractUndirectedEdge.java
│ │ │ ├── AdjEdgeGraph.java
│ │ │ ├── AdjVertexGraph.java
│ │ │ ├── Bag.java
│ │ │ ├── BaseEdge.java
│ │ │ ├── BaseGraph.java
│ │ │ ├── ColorFormatException.java
│ │ │ ├── ConcatIterable.java
│ │ │ ├── Curves.java
│ │ │ ├── CycleDependencyException.java
│ │ │ ├── Dedigraph.java
│ │ │ ├── DedirectedEdgeGraph.java
│ │ │ ├── DedirectedGraph.java
│ │ │ ├── Digraph.java
│ │ │ ├── DirectedEdge.java
│ │ │ ├── DirectedEdgeGraph.java
│ │ │ ├── DirectedGraph.java
│ │ │ ├── Edge.java
│ │ │ ├── EdgeDedigraph.java
│ │ │ ├── EdgeOpGraph.java
│ │ │ ├── FlatPoint.java
│ │ │ ├── Graph.java
│ │ │ ├── ProxyDedigraph.java
│ │ │ ├── RectangleTree.java
│ │ │ ├── UnaryConcatIterable.java
│ │ │ ├── UndirectedEdgeGraph.java
│ │ │ ├── UndirectedGraph.java
│ │ │ ├── UnfeasibleException.java
│ │ │ ├── UnmodifiableBagException.java
│ │ │ ├── UnmodifiablePointException.java
│ │ │ ├── Vectors.java
│ │ │ ├── VertexDedigraph.java
│ │ │ ├── VertexIndex.java
│ │ │ └── VertexOpGraph.java
│ │ │ ├── draw
│ │ │ ├── AbstractPipelineTrigger.java
│ │ │ ├── AbstractRenderEngine.java
│ │ │ ├── ArrowDrawProp.java
│ │ │ ├── Brush.java
│ │ │ ├── ClusterDrawProp.java
│ │ │ ├── ClusterEditor.java
│ │ │ ├── ClusterPipelineTrigger.java
│ │ │ ├── ContainerDrawProp.java
│ │ │ ├── CustomizeShapeRender.java
│ │ │ ├── DefaultGraphResource.java
│ │ │ ├── DefaultPipelineFactory.java
│ │ │ ├── DefaultShapePosition.java
│ │ │ ├── DrawBoard.java
│ │ │ ├── DrawGraph.java
│ │ │ ├── Editor.java
│ │ │ ├── ExecuteException.java
│ │ │ ├── FailInitResourceException.java
│ │ │ ├── GraphEditor.java
│ │ │ ├── GraphPipelineTrigger.java
│ │ │ ├── GraphvizDrawProp.java
│ │ │ ├── LineDrawProp.java
│ │ │ ├── LineEditor.java
│ │ │ ├── LinePipelineTrigger.java
│ │ │ ├── NodeDrawProp.java
│ │ │ ├── NodeEditor.java
│ │ │ ├── NodePipelineTrigger.java
│ │ │ ├── PipelineFactory.java
│ │ │ ├── PipelineRenderEngine.java
│ │ │ ├── Rectangle.java
│ │ │ ├── RenderEngine.java
│ │ │ ├── common
│ │ │ │ ├── AWTextRender.java
│ │ │ │ ├── AndroidImgConverter.java
│ │ │ │ ├── BatikImgConverter.java
│ │ │ │ ├── CommonDrawBoard.java
│ │ │ │ ├── CommonRenderEngine.java
│ │ │ │ ├── DefaultImgConverter.java
│ │ │ │ ├── SvgConverter.java
│ │ │ │ └── SvgToPdfConverter.java
│ │ │ └── svg
│ │ │ │ ├── Document.java
│ │ │ │ ├── Element.java
│ │ │ │ ├── SvgBrush.java
│ │ │ │ ├── SvgConstants.java
│ │ │ │ ├── SvgDocument.java
│ │ │ │ ├── SvgDrawBoard.java
│ │ │ │ ├── SvgEditor.java
│ │ │ │ ├── SvgElement.java
│ │ │ │ ├── SvgRenderEngine.java
│ │ │ │ ├── cluster
│ │ │ │ ├── ClusterColorEditor.java
│ │ │ │ ├── ClusterHrefEditor.java
│ │ │ │ ├── ClusterLabelEditor.java
│ │ │ │ ├── ClusterShapeEditor.java
│ │ │ │ └── ClusterStyleEditor.java
│ │ │ │ ├── graphviz
│ │ │ │ ├── GraphBasicEditor.java
│ │ │ │ ├── GraphGridEditor.java
│ │ │ │ └── GraphLabelEditor.java
│ │ │ │ ├── line
│ │ │ │ ├── LineArrowEditor.java
│ │ │ │ ├── LineBoxesEditor.java
│ │ │ │ ├── LineControlPointsEditor.java
│ │ │ │ ├── LineFloatLabelsEditor.java
│ │ │ │ ├── LineHrefEditor.java
│ │ │ │ ├── LineLabelEditor.java
│ │ │ │ ├── LinePathEditor.java
│ │ │ │ └── LineStyleEditor.java
│ │ │ │ ├── node
│ │ │ │ ├── AbstractNodeShapeEditor.java
│ │ │ │ ├── NodeColorEditor.java
│ │ │ │ ├── NodeHrefEditor.java
│ │ │ │ ├── NodeImageEditor.java
│ │ │ │ ├── NodeLabelEditor.java
│ │ │ │ ├── NodeShapeEditor.java
│ │ │ │ └── NodeStyleEditor.java
│ │ │ │ └── shape
│ │ │ │ ├── CircleShapeRender.java
│ │ │ │ ├── EllipseShapeRender.java
│ │ │ │ ├── InvtrapeziumShapeRender.java
│ │ │ │ ├── ParallelogramShapeRender.java
│ │ │ │ ├── RectShapeRender.java
│ │ │ │ ├── RegularShapeRender.java
│ │ │ │ └── TrapeziumShapeRender.java
│ │ │ ├── layout
│ │ │ ├── ALine.java
│ │ │ ├── ANode.java
│ │ │ ├── AWTMeasureText.java
│ │ │ ├── AbstractFontSelector.java
│ │ │ ├── AbstractLayoutEngine.java
│ │ │ ├── AbstractOrthogonalRouter.java
│ │ │ ├── AbstractShifterStrategy.java
│ │ │ ├── AndroidMeasureText.java
│ │ │ ├── Cell.java
│ │ │ ├── CellLabelCompiler.java
│ │ │ ├── CombineShifter.java
│ │ │ ├── CurvePathClip.java
│ │ │ ├── DefaultFontOrder.java
│ │ │ ├── DefaultVal.java
│ │ │ ├── EnvStrategy.java
│ │ │ ├── FlatShifterStrategy.java
│ │ │ ├── FlipShifterStrategy.java
│ │ │ ├── FontOrder.java
│ │ │ ├── FontSelector.java
│ │ │ ├── Grid.java
│ │ │ ├── HtmlConvertor.java
│ │ │ ├── LabelAttributes.java
│ │ │ ├── LabelFormatException.java
│ │ │ ├── LayoutAttach.java
│ │ │ ├── LayoutEngine.java
│ │ │ ├── LayoutGraph.java
│ │ │ ├── LineClip.java
│ │ │ ├── LineHandler.java
│ │ │ ├── LineHelper.java
│ │ │ ├── LineRouter.java
│ │ │ ├── Mark.java
│ │ │ ├── Maze.java
│ │ │ ├── MeasureText.java
│ │ │ ├── NodeSizeExpander.java
│ │ │ ├── OrthoNodeSizeExpander.java
│ │ │ ├── OrthoVisGraph.java
│ │ │ ├── PathClip.java
│ │ │ ├── PortHelper.java
│ │ │ ├── PortNodeSizeExpander.java
│ │ │ ├── PortNodeSizeExpanderV2.java
│ │ │ ├── RoughMeasureText.java
│ │ │ ├── Shifter.java
│ │ │ ├── ShifterStrategy.java
│ │ │ ├── StaticFontOrder.java
│ │ │ ├── StraightPathClip.java
│ │ │ ├── dot
│ │ │ │ ├── AbstractCoordinate.java
│ │ │ │ ├── AbstractDotLineRouter.java
│ │ │ │ ├── Acyclic.java
│ │ │ │ ├── BasicCrossRank.java
│ │ │ │ ├── BoxGuideLineRouter.java
│ │ │ │ ├── ContainerCollapse.java
│ │ │ │ ├── Coordinate.java
│ │ │ │ ├── CoordinateV2.java
│ │ │ │ ├── CrossRank.java
│ │ │ │ ├── CurveFitBoxRouter.java
│ │ │ │ ├── DLine.java
│ │ │ │ ├── DNode.java
│ │ │ │ ├── DotAttachment.java
│ │ │ │ ├── DotDigraph.java
│ │ │ │ ├── DotGraph.java
│ │ │ │ ├── DotLayoutEngine.java
│ │ │ │ ├── DotLineRouterFactory.java
│ │ │ │ ├── DotMaze.java
│ │ │ │ ├── FeasibleTree.java
│ │ │ │ ├── LabelSupplement.java
│ │ │ │ ├── MinCross.java
│ │ │ │ ├── NetworkSimplex.java
│ │ │ │ ├── OrthogonalRouter.java
│ │ │ │ ├── PolyLineRouter.java
│ │ │ │ ├── RankContent.java
│ │ │ │ ├── RootCrossRank.java
│ │ │ │ ├── RoundedRouter.java
│ │ │ │ ├── RouterBox.java
│ │ │ │ ├── SameRankAdjacentRecord.java
│ │ │ │ ├── SplineRouter.java
│ │ │ │ ├── StraightLineRouter.java
│ │ │ │ ├── SubgrahOppositRankException.java
│ │ │ │ ├── SubgraphMerge.java
│ │ │ │ └── ULine.java
│ │ │ └── fdp
│ │ │ │ ├── AbstractFdpLayout.java
│ │ │ │ ├── AbstractFdpLineRouter.java
│ │ │ │ ├── AroundLineRouter.java
│ │ │ │ ├── FLine.java
│ │ │ │ ├── FNode.java
│ │ │ │ ├── FdpAttachment.java
│ │ │ │ ├── FdpGraph.java
│ │ │ │ ├── FdpLayoutEngine.java
│ │ │ │ ├── FdpMaze.java
│ │ │ │ ├── GFdpLayoutEngine.java
│ │ │ │ ├── JFdpLayoutEngine.java
│ │ │ │ ├── LineRouterFactory.java
│ │ │ │ ├── OrthogonalRouter.java
│ │ │ │ ├── PolylineRouter.java
│ │ │ │ ├── RoundedRouter.java
│ │ │ │ ├── SplineRouter.java
│ │ │ │ └── StraightLineRouter.java
│ │ │ └── util
│ │ │ ├── Asserts.java
│ │ │ ├── BoxUtils.java
│ │ │ ├── ClassUtils.java
│ │ │ ├── CollectionUtils.java
│ │ │ ├── EnvProp.java
│ │ │ ├── FontUtils.java
│ │ │ ├── GraphvizUtils.java
│ │ │ ├── LabelTagUtils.java
│ │ │ └── ValueUtils.java
│ └── resources
│ │ └── META-INF
│ │ └── services
│ │ ├── org.graphper.draw.CustomizeShapeRender
│ │ ├── org.graphper.draw.common.SvgConverter
│ │ ├── org.graphper.layout.FontOrder
│ │ ├── org.graphper.layout.FontSelector
│ │ └── org.graphper.layout.MeasureText
│ └── test
│ ├── java
│ ├── helper
│ │ ├── DocumentUtils.java
│ │ ├── GraphAssert.java
│ │ ├── SerialHelper.java
│ │ └── TableUtils.java
│ └── org
│ │ └── graphper
│ │ ├── api
│ │ ├── GraphvizTest.java
│ │ ├── HtmlTagTest.java
│ │ ├── LineTest.java
│ │ ├── NodeTest.java
│ │ ├── attributes
│ │ │ └── PortTest.java
│ │ └── ext
│ │ │ ├── StarPropCalcTest.java
│ │ │ └── TrianglePropCalcTest.java
│ │ ├── def
│ │ ├── BagTest.java
│ │ ├── DedirectedEdgeGraphTest.java
│ │ ├── DedirectedGraphTest.java
│ │ ├── DirectedEdgeGraphTest.java
│ │ ├── DirectedGraphTest.java
│ │ ├── FlatPointTest.java
│ │ ├── GEdge.java
│ │ ├── GNode.java
│ │ ├── GUEdge.java
│ │ ├── RectangleTreeTest.java
│ │ ├── UnaryConcatIterableTest.java
│ │ ├── UndirectedEdgeGraphTest.java
│ │ ├── UndirectedGraphTest.java
│ │ └── VectorsTest.java
│ │ ├── draw
│ │ ├── DrawGraphTest.java
│ │ └── svg
│ │ │ └── SvgDocumentTest.java
│ │ ├── layout
│ │ ├── CellLabelCompilerTest.java
│ │ ├── OrthoVisGraphTest.java
│ │ └── dot
│ │ │ ├── DotLayoutEngineTest.java
│ │ │ ├── SubgraphMergeTest.java
│ │ │ └── TLayout.java
│ │ └── util
│ │ └── LabelTagUtilsTest.java
│ └── resources
│ └── table
│ ├── table_1.html
│ ├── table_2.html
│ ├── table_3.html
│ ├── table_4.html
│ ├── table_5.html
│ ├── table_6.html
│ ├── table_7.html
│ └── table_8.html
├── docs
├── Color Intro.md
├── Image Security Warning.md
├── LabelTag.md
├── Table.md
├── cluster
│ ├── Color.md
│ ├── FillColor.md
│ ├── FontColor.md
│ ├── FontName.md
│ ├── FontSize.md
│ ├── Href.md
│ ├── ID.md
│ ├── Label.md
│ ├── Labeljust.md
│ ├── Labelloc.md
│ ├── Margin.md
│ ├── PenWidth.md
│ ├── Shape.md
│ ├── Style.md
│ └── ToolTip.md
├── edge
│ ├── ArrowHead.md
│ ├── ArrowSize.md
│ ├── ArrowTail.md
│ ├── Color.md
│ ├── ControlPoints.md
│ ├── Dir.md
│ ├── FontColor.md
│ ├── FontName.md
│ ├── FontSize.md
│ ├── HeadCell.md
│ ├── HeadClip.md
│ ├── HeadLabel.md
│ ├── HeadPort.md
│ ├── Href.md
│ ├── ID.md
│ ├── Label.md
│ ├── MinLen.md
│ ├── PenWidth.md
│ ├── Radian.md
│ ├── ShowBoxes.md
│ ├── Style.md
│ ├── TailCell.md
│ ├── TailCilp.md
│ ├── TailLabel.md
│ ├── TailPort.md
│ ├── Tooltip.md
│ ├── Weight.md
│ ├── lhead.md
│ └── ltail.md
├── graph
│ ├── FillColor.md
│ ├── FontColor.md
│ ├── FontName.md
│ ├── FontSize.md
│ ├── Href.md
│ ├── Initpos.md
│ ├── K.md
│ ├── Label.md
│ ├── Labeljust.md
│ ├── Labelloc.md
│ ├── Layout.md
│ ├── Margin.md
│ ├── Maxiter.md
│ ├── Mclimit.md
│ ├── Nodesep.md
│ ├── Nslimit.md
│ ├── Nslimit1.md
│ ├── Overlap.md
│ ├── Rankdir.md
│ ├── Ranksep.md
│ ├── Showgrid.md
│ ├── Size.md
│ ├── Splines.md
│ └── Tooltip.md
├── images
│ ├── node_record.png
│ ├── node_shape.png
│ └── node_style.png
├── node
│ ├── Color.md
│ ├── FillColor.md
│ ├── FixedSize.md
│ ├── FontColor.md
│ ├── FontName.md
│ ├── FontSize.md
│ ├── Href.md
│ ├── ID.md
│ ├── Image.md
│ ├── ImageSize.md
│ ├── Label.md
│ ├── Labeljust.md
│ ├── Labelloc.md
│ ├── Margin.md
│ ├── PenWidth.md
│ ├── Shape.md
│ ├── Sides.md
│ ├── Size.md
│ ├── Style.md
│ └── Tooltip.md
└── subgraph
│ └── Rank.md
├── dot
├── pom.xml
└── src
│ └── main
│ ├── antlr4
│ └── org
│ │ └── graphper
│ │ └── parser
│ │ └── grammar
│ │ ├── DOTLexer.g4
│ │ ├── DOTParser.g4
│ │ ├── HTMLLexer.g4
│ │ └── HTMLParser.g4
│ └── java
│ └── org
│ └── graphper
│ └── parser
│ ├── DotParser.java
│ ├── DotSyntaxErrorListener.java
│ ├── DotTempAttrListener.java
│ ├── GraphvizListener.java
│ ├── HtmlListener.java
│ ├── HtmlParser.java
│ ├── HtmlSyntaxErrorListener.java
│ ├── NodeExtractor.java
│ ├── ParseException.java
│ ├── ParserUtils.java
│ ├── PostGraphComponents.java
│ └── grammar
│ ├── DOTLexer.interp
│ ├── DOTLexer.java
│ ├── DOTLexer.tokens
│ ├── DOTParser.interp
│ ├── DOTParser.java
│ ├── DOTParser.tokens
│ ├── DOTParserBaseListener.java
│ ├── DOTParserBaseVisitor.java
│ ├── DOTParserListener.java
│ ├── DOTParserVisitor.java
│ ├── HTMLLexer.interp
│ ├── HTMLLexer.java
│ ├── HTMLLexer.tokens
│ ├── HTMLParser.interp
│ ├── HTMLParser.java
│ ├── HTMLParser.tokens
│ ├── HTMLParserBaseListener.java
│ ├── HTMLParserBaseVisitor.java
│ ├── HTMLParserListener.java
│ └── HTMLParserVisitor.java
├── pom.xml
└── test
├── picture
├── case_visual.png
├── fdp.png
├── layout.png
├── line_port.png
├── line_router.png
├── node_record.png
├── node_shape.png
├── rich_text.png
├── show_boxes.png
├── show_control_points.png
├── show_grid.png
├── table.png
├── table_assemble.png
└── table_example.png
├── pom.xml
└── src
└── test
├── java
├── dot
│ └── DotCasesTest.java
├── helper
│ ├── DocumentUtils.java
│ ├── GraphvizVisual.java
│ └── TableUtils.java
├── regression
│ ├── ClusterTest.java
│ ├── CoordinateTest.java
│ ├── LineTest.java
│ ├── PortTest.java
│ ├── SubgraphTest.java
│ └── TempTest.java
└── visual_case
│ ├── BugCaseTest.java
│ ├── CellLabelTest.java
│ ├── ClusterAttrTest.java
│ ├── ClusterTest.java
│ ├── DocCaseTest.java
│ ├── FdpTest.java
│ ├── GraphAttrTest.java
│ ├── LabelTest.java
│ ├── LineAttrTest.java
│ ├── MultiFontDisplayTest.java
│ ├── NodeAttrTest.java
│ ├── OrthoPortTest.java
│ ├── SelfLineTest.java
│ ├── SubgraphAttrTest.java
│ └── TableCaseTest.java
└── resources
├── dot
├── manual
│ ├── attrs_test.dot
│ ├── big_fdp_case.dot
│ ├── case1.dot
│ ├── case10.dot
│ ├── case11.dot
│ ├── case12.dot
│ ├── case13.dot
│ ├── case14.dot
│ ├── case15.dot
│ ├── case16.dot
│ ├── case17.dot
│ ├── case18.dot
│ ├── case19.dot
│ ├── case2.dot
│ ├── case20.dot
│ ├── case3.dot
│ ├── case4.dot
│ ├── case5.dot
│ ├── case6.dot
│ ├── case7.dot
│ ├── case8.dot
│ ├── case9.dot
│ ├── cluster.dot
│ ├── clusterAttrs.dot
│ ├── clusterIdMixedCase.dot
│ ├── clusterLabel.dot
│ ├── cluster_alloc_bug.dot
│ ├── cluster_case1.dot
│ ├── cluster_case2.dot
│ ├── cluster_case3.dot
│ ├── cluster_nest.dot
│ ├── cluster_optimize.dot
│ ├── cluster_same_rank.dot
│ ├── edgeSubgraphCombined.dot
│ ├── edgeSubgraphLeft.dot
│ ├── edgeSubgraphMiddle.dot
│ ├── edgeSubgraphRight.dot
│ ├── embedTable.dot
│ ├── fdp1.dot
│ ├── fdp2.dot
│ ├── fdp3.dot
│ ├── fdp4.dot
│ ├── fdp5.dot
│ ├── fdp6.dot
│ ├── fdp7.dot
│ ├── fdp8.dot
│ ├── fdp9.dot
│ ├── fdp_ortho_selfline.dot
│ ├── flow.dot
│ ├── grid.dot
│ ├── htmlTag.dot
│ ├── html_example.dot
│ ├── language.dot
│ ├── lhead.dot
│ ├── nodeDefinePriority.dot
│ ├── port.dot
│ ├── self_line.dot
│ ├── sequence_eg.dot
│ ├── stringCase.dot
│ ├── subgraphEndpointsEdges.dot
│ ├── template.dot
│ ├── timeline.dot
│ └── uml_eg.dot
└── random
│ ├── 121.dot
│ ├── 1221.dot
│ ├── 1314.dot
│ ├── 14.dot
│ ├── 1408.dot
│ ├── 1436.dot
│ ├── 1437.dot
│ ├── 1444-2.dot
│ ├── 1444.dot
│ ├── 144_no_ortho.dot
│ ├── 144_ortho.dot
│ ├── 1624.dot
│ ├── 165.dot
│ ├── 1658.dot
│ ├── 165_2.dot
│ ├── 165_3.dot
│ ├── 167.dot
│ ├── 1724.dot
│ ├── 1767.dot
│ ├── 1783.dot
│ ├── 1845.dot
│ ├── 1855.dot
│ ├── 1856.dot
│ ├── 1865.dot
│ ├── 1879.dot1
│ ├── 1880.dot
│ ├── 1898.dot
│ ├── 358.dot1
│ ├── 42.dot
│ ├── 56.dot
│ └── 925.dot
├── graph-visual-template.html
├── log4j.xml
└── table
├── table_1.html
├── table_2.html
├── table_3.html
├── table_4.html
├── table_5.html
├── table_6.html
├── table_7.html
└── table_8.html
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/*
2 | target/
3 | workspace.xml
4 | graph-support.iml
--------------------------------------------------------------------------------
/cli/src/main/java/org/graphper/WrongCommandException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 The graph-support project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.graphper;
18 |
19 | /**
20 | * Exception thrown when an invalid or unrecognized command is encountered.
21 | * This is typically used in command-line argument parsing to indicate incorrect usage.
22 | *
23 | * @author Jamison Jiang
24 | */
25 | public class WrongCommandException extends Exception {
26 |
27 | private static final long serialVersionUID = 7129182882393292716L;
28 |
29 | public WrongCommandException() {
30 | super();
31 | }
32 |
33 | public WrongCommandException(String message) {
34 | super(message);
35 | }
36 |
37 | public WrongCommandException(Throwable cause) {
38 | super(cause);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/cli/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
An API for creating text translation routines from a set of smaller building blocks. Initially created to make it 19 | * possible for the user to customize the rules in the StringEscapeUtils class.
20 | *These classes are immutable, and therefore thread-safe.
21 | * 22 | * @since 1.0 23 | */ 24 | package org.apache_gs.commons.text.translate; 25 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/FileType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api; 18 | 19 | /** 20 | * File type enumeration. 21 | * 22 | * @author Jamison Jiang 23 | */ 24 | public enum FileType { 25 | SVG("svg"), PNG("png"), JPG("jpg"), JPEG("jpeg"), GIF("gif"), 26 | 27 | // Need external plugin: Apache Batik 28 | TIFF("tiff"), 29 | // Need external plugin: Apache FOP 30 | PDF("pdf") 31 | ; 32 | 33 | FileType(String type) { 34 | this.type = type; 35 | } 36 | 37 | private final String type; 38 | 39 | public String getType() { 40 | return type; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/attributes/ArrowShape.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.attributes; 18 | 19 | /** 20 | * An enumeration of the different shapes of the line's arrowhead. 21 | * 22 | * @author Jamison Jiang 23 | */ 24 | public enum ArrowShape { 25 | 26 | VEE(0.75, true), 27 | 28 | CURVE(1, false), 29 | 30 | BOX(0.75, true), 31 | 32 | DOT(0.75, true), 33 | 34 | NONE(1, false), 35 | 36 | NORMAL(1, true); 37 | 38 | ArrowShape(double clipRatio, boolean needFill) { 39 | this.clipRatio = clipRatio; 40 | this.needFill = needFill; 41 | } 42 | 43 | private final double clipRatio; 44 | 45 | private final boolean needFill; 46 | 47 | /** 48 | * Returns the basic size ratio of arrow shape. 49 | * 50 | * @return the basic size ratio 51 | */ 52 | public double getClipRatio() { 53 | return clipRatio; 54 | } 55 | 56 | /** 57 | * Returns whether this arrow's shape needs filled. 58 | * 59 | * @return true if arrow's shape need filled 60 | */ 61 | public boolean isNeedFill() { 62 | return needFill; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/attributes/ClusterStyle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.attributes; 18 | 19 | /** 20 | * Cluster style. 21 | * 22 | * @author Jamison Jiang 23 | */ 24 | public enum ClusterStyle implements Style { 25 | 26 | /** 27 | * Dashed cluster consisting of a series of line segment. 28 | */ 29 | DASHED, 30 | 31 | /** 32 | * Dotted cluster consisting of a series of points. 33 | */ 34 | DOTTED, 35 | 36 | /** 37 | * Hide cluster when rendering (but the attributes are valid during layout). 38 | */ 39 | INVIS, 40 | 41 | /** 42 | * Draws the line segment boldly. 43 | */ 44 | BOLD, 45 | 46 | /** 47 | * Use rounded angles for clusters. 48 | */ 49 | ROUNDED; 50 | } 51 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/attributes/Dir.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.attributes; 18 | 19 | import org.graphper.api.Graphviz; 20 | 21 | /** 22 | * Line type for drawing arrowheads, indicates which ends of the edge should be decorated with an 23 | * arrowhead. It will only take effect under {@link Graphviz#digraph()}. 24 | * 25 | * @author Jamison Jiang 26 | */ 27 | public enum Dir { 28 | 29 | /** 30 | * The directed line from T to H, draw as T -> H. 31 | */ 32 | FORWARD, 33 | 34 | /** 35 | * The directed line from T to H, draw as T <- H. 36 | */ 37 | BACK, 38 | 39 | /** 40 | * The directed line from T to H, draw as T <-> H. 41 | */ 42 | BOTH, 43 | 44 | /** 45 | * The directed line from T to H, draw as T - H. 46 | */ 47 | NONE; 48 | } 49 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/attributes/InitPos.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.attributes; 18 | 19 | /** 20 | * Enumeration representing the initialization position algorithms for 21 | * Force-Directed Placement (FDP) graph layout. 22 | *23 | * These algorithms determine the initial positions of nodes in the layout. 24 | *
25 | * 26 | * @author Jamison Jiang 27 | */ 28 | public enum InitPos { 29 | 30 | /** 31 | * Initializes nodes in a grid pattern. 32 | */ 33 | GRID, 34 | 35 | /** 36 | * Arranges nodes in a circular pattern. 37 | */ 38 | CIRCLE, 39 | 40 | /** 41 | * Distributes nodes in sectors. 42 | */ 43 | SECTOR; 44 | } 45 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/attributes/LineStyle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.attributes; 18 | 19 | /** 20 | * Line style. 21 | * 22 | * @author Jamison Jiang 23 | */ 24 | public enum LineStyle { 25 | 26 | /** 27 | * Dashed line consisting of a series of line segment. 28 | */ 29 | DASHED, 30 | 31 | /** 32 | * Dotted line consisting of a series of points. 33 | */ 34 | DOTTED, 35 | 36 | /** 37 | * Line segments are drawn as solid lines. 38 | */ 39 | SOLID, 40 | 41 | /** 42 | * Hide line segments when rendering (but the attributes are valid during layout). 43 | */ 44 | INVIS, 45 | 46 | /** 47 | * Draws the line segment boldly. 48 | */ 49 | BOLD 50 | } 51 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/attributes/NodeStyle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.attributes; 18 | 19 | /** 20 | * Node style. 21 | * 22 | * @author Jamison Jiang 23 | */ 24 | public enum NodeStyle implements Style { 25 | 26 | /** 27 | * Dashed node border consisting of a series of line segment. 28 | */ 29 | DASHED, 30 | 31 | /** 32 | * Dotted node border consisting of a series of points. 33 | */ 34 | DOTTED, 35 | 36 | /** 37 | * Node border are drawn as solid lines. 38 | */ 39 | SOLID, 40 | 41 | /** 42 | * Hide node when rendering (but the attributes are valid during layout). 43 | */ 44 | INVIS, 45 | 46 | /** 47 | * Draws the node border boldly. 48 | */ 49 | BOLD, 50 | 51 | /** 52 | * Use rounded angles for nodes. 53 | */ 54 | ROUNDED 55 | } 56 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/attributes/Rankdir.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.attributes; 18 | 19 | import org.apache_gs.commons.lang3.StringUtils; 20 | 21 | /** 22 | * Sets direction of graph layout, only valid for {@link Layout#DOT}. 23 | * 24 | * @author Jamison Jiang 25 | */ 26 | public enum Rankdir { 27 | 28 | /** 29 | * Horizontal layout, left to right 30 | */ 31 | LR, 32 | 33 | /** 34 | * Horizontal layout, right to left 35 | */ 36 | RL, 37 | 38 | /** 39 | * Vertical layout, top to bottom 40 | */ 41 | TB, 42 | 43 | /** 44 | * Vertical layout, bottom to top 45 | */ 46 | BT; 47 | 48 | public static Rankdir rankdir(String rankdir) { 49 | if (StringUtils.isEmpty(rankdir)) { 50 | return Rankdir.TB; 51 | } 52 | 53 | try { 54 | return valueOf(rankdir); 55 | } catch (Exception e) { 56 | return Rankdir.TB; 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/attributes/Style.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.attributes; 18 | 19 | public interface Style { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/attributes/Tend.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.attributes; 18 | 19 | import org.graphper.api.FloatLabel; 20 | 21 | /** 22 | * The placement tendency of {@link FloatLabel}. 23 | * 24 | * @author Jamison Jiang 25 | */ 26 | public enum Tend { 27 | /** 28 | * Float Label as close as possible to the tail node. 29 | */ 30 | TAIL, 31 | 32 | /** 33 | * Float Label as close as possible to the head node. 34 | */ 35 | HEAD; 36 | } 37 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/CirclePropCalc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | import java.io.Serializable; 20 | import org.graphper.def.FlatPoint; 21 | 22 | public class CirclePropCalc implements ShapePropCalc, Serializable { 23 | 24 | private static final long serialVersionUID = 4004804900027011314L; 25 | 26 | @Override 27 | public FlatPoint minContainerSize(double innerHeight, double innerWidth) { 28 | double diameter = Math.sqrt(Math.pow(innerHeight, 2) + Math.pow(innerWidth, 2)); 29 | return new FlatPoint(diameter, diameter); 30 | } 31 | 32 | @Override 33 | public boolean in(Box box, FlatPoint flatPoint) { 34 | double r = Math.pow(flatPoint.getX() - box.getX(), 2) 35 | + Math.pow(flatPoint.getY() - box.getY(), 2); 36 | return Math.sqrt(r) <= box.getWidth() / 2; 37 | } 38 | 39 | @Override 40 | public void ratio(FlatPoint boxSize) { 41 | squareRatio(boxSize); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/ClusterShapePost.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | import org.graphper.api.ClusterAttrs; 20 | import org.graphper.api.attributes.ClusterShape; 21 | import org.graphper.util.Asserts; 22 | 23 | /** 24 | * {@link ClusterShape} post processing. 25 | * 26 | * @author Jamison Jiang 27 | */ 28 | public interface ClusterShapePost { 29 | 30 | /** 31 | * When some characteristics of the shape need to be changed according to the rest of the cluster 32 | * attributes, use this method to post-create the enhanced {@link ClusterShape} to replace the 33 | * original {@link ClusterShape}. 34 | * 35 | * @param clusterAttrs cluster attribute 36 | * @return post {@code ClusterShape} 37 | */ 38 | default ClusterShape post(ClusterAttrs clusterAttrs) { 39 | Asserts.nullArgument(clusterAttrs, "clusterAttrs"); 40 | return clusterAttrs.getShape(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/CylinderPropCalc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | import java.io.Serializable; 20 | import org.graphper.def.FlatPoint; 21 | import org.graphper.api.attributes.NodeShapeEnum; 22 | 23 | public class CylinderPropCalc implements ShapePropCalc, Serializable { 24 | 25 | private static final long serialVersionUID = 2065821057594213750L; 26 | 27 | public static final int TOP_LEN = 6; 28 | 29 | @Override 30 | public FlatPoint minContainerSize(double innerHeight, double innerWidth) { 31 | return new FlatPoint(innerHeight + (3 * TOP_LEN), innerWidth); 32 | } 33 | 34 | @Override 35 | public boolean in(Box box, FlatPoint point) { 36 | return NodeShapeEnum.RECT.in(box, point); 37 | } 38 | 39 | @Override 40 | public FlatPoint labelCenter(FlatPoint labelSize, Box box) { 41 | return new FlatPoint(box.getX(), box.getY() + ((double) TOP_LEN / 2)); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/NodeShapePost.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | import org.graphper.api.attributes.NodeShape; 20 | import org.graphper.util.Asserts; 21 | import org.graphper.api.NodeAttrs; 22 | 23 | /** 24 | * {@link NodeShape} post processing. 25 | * 26 | * @author Jamison Jiang 27 | */ 28 | public interface NodeShapePost { 29 | 30 | /** 31 | * When some characteristics of the shape need to be changed according to the rest of the node 32 | * attributes, use this method to post-create the enhanced {@link NodeShape} to replace the 33 | * original {@link NodeShape}. 34 | * 35 | * @param nodeAttrs node attribute 36 | * @return post {@code NodeShape} 37 | */ 38 | default NodeShape post(NodeAttrs nodeAttrs) { 39 | Asserts.nullArgument(nodeAttrs, "nodeAttrs"); 40 | return nodeAttrs.getShape(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/PlainPropCalc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | public class PlainPropCalc extends RectanglePropCalc { 20 | 21 | private static final long serialVersionUID = -5011222556684270924L; 22 | 23 | @Override 24 | public boolean needMargin() { 25 | return false; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/PointPropCalc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | import org.graphper.api.attributes.Color; 20 | 21 | public class PointPropCalc extends CirclePropCalc { 22 | 23 | private static final long serialVersionUID = -3153454718323111406L; 24 | 25 | @Override 26 | public boolean needMargin() { 27 | return false; 28 | } 29 | 30 | @Override 31 | public boolean ignoreLabel() { 32 | return true; 33 | } 34 | 35 | @Override 36 | public Color defaultFillColor() { 37 | return Color.BLACK; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/PortPosition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | public interface PortPosition { 20 | 21 | double horOffset(Box box); 22 | 23 | double verOffset(Box box); 24 | } -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/RatioPortPosition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | import java.io.Serializable; 20 | import org.graphper.util.Asserts; 21 | 22 | public class RatioPortPosition implements PortPosition, Serializable { 23 | 24 | private static final long serialVersionUID = -1767859727952040562L; 25 | 26 | private final double xRatio; 27 | 28 | private final double yRatio; 29 | 30 | public RatioPortPosition(double xRatio, double yRatio) { 31 | this.xRatio = xRatio; 32 | this.yRatio = yRatio; 33 | } 34 | 35 | @Override 36 | public double horOffset(Box box) { 37 | Asserts.nullArgument(box, "box"); 38 | return box.getWidth() * xRatio; 39 | } 40 | 41 | @Override 42 | public double verOffset(Box box) { 43 | Asserts.nullArgument(box, "box"); 44 | return box.getHeight() * yRatio; 45 | } 46 | 47 | public double getxRatio() { 48 | return xRatio; 49 | } 50 | 51 | public double getyRatio() { 52 | return yRatio; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/RecordPropCalc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | import java.io.Serializable; 20 | import org.graphper.def.FlatPoint; 21 | 22 | public class RecordPropCalc implements ShapePropCalc, Serializable { 23 | 24 | private static final long serialVersionUID = -8655733264629048199L; 25 | 26 | public static final int CORNER_LEN = 40; 27 | 28 | private final boolean radianCorner; 29 | 30 | public RecordPropCalc(boolean radianCorner) { 31 | this.radianCorner = radianCorner; 32 | } 33 | 34 | @Override 35 | public FlatPoint minContainerSize(double innerHeight, double innerWidth) { 36 | return new FlatPoint(innerHeight, innerWidth); 37 | } 38 | 39 | @Override 40 | public boolean in(Box box, FlatPoint point) { 41 | return Math.abs(box.getX() - point.getX()) <= box.getWidth() / 2 42 | && Math.abs(box.getY() - point.getY()) <= box.getHeight() / 2; 43 | } 44 | 45 | public boolean isRadianCorner() { 46 | return radianCorner; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/RectanglePropCalc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | import java.io.Serializable; 20 | import org.graphper.def.FlatPoint; 21 | 22 | public class RectanglePropCalc implements ShapePropCalc, Serializable { 23 | 24 | private static final long serialVersionUID = 5056940900129881225L; 25 | 26 | @Override 27 | public FlatPoint minContainerSize(double innerHeight, double innerWidth) { 28 | return new FlatPoint(innerHeight, innerWidth); 29 | } 30 | 31 | @Override 32 | public boolean in(Box box, FlatPoint point) { 33 | return Math.abs(box.getX() - point.getX()) <= box.getWidth() / 2 34 | && Math.abs(box.getY() - point.getY()) <= box.getHeight() / 2; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/ShapePosition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | import org.graphper.api.attributes.NodeShape; 20 | 21 | /** 22 | * Use ShapePosition to describe an element with container properties and shape properties. 23 | * 24 | * @author Jamison Jiang 25 | */ 26 | public interface ShapePosition extends Box { 27 | 28 | /** 29 | * Returns a primitive describing the shape the current object should conform to. Although 30 | * {@link NodeShape} is used to describe, the current element is not necessarily a node. 31 | * 32 | * @return current shape properties describe function 33 | */ 34 | ShapePropCalc shapeProp(); 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/api/ext/SymmetryShapeCenterCalc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.api.ext; 18 | 19 | import java.io.Serializable; 20 | 21 | public class SymmetryShapeCenterCalc implements ShapeCenterCalc, Serializable { 22 | 23 | private static final long serialVersionUID = -299277822910531114L; 24 | 25 | public static final SymmetryShapeCenterCalc SSPC = new SymmetryShapeCenterCalc(); 26 | 27 | @Override 28 | public double leftWidth(Double width) { 29 | return half(width); 30 | } 31 | 32 | @Override 33 | public double rightWidth(Double width) { 34 | return half(width); 35 | } 36 | 37 | @Override 38 | public double topHeight(Double height) { 39 | return half(height); 40 | } 41 | 42 | @Override 43 | public double bottomHeight(Double height) { 44 | return half(height); 45 | } 46 | 47 | private double half(Double val) { 48 | if (val == null) { 49 | return 0; 50 | } 51 | 52 | return val / 2; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/def/ColorFormatException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.def; 18 | 19 | /** 20 | * Color format exception. 21 | * 22 | * @author Jamison Jiang 23 | */ 24 | public class ColorFormatException extends RuntimeException { 25 | 26 | private static final long serialVersionUID = 1033876844829922354L; 27 | 28 | /** 29 | * Constructs a {@code ColorFormatException} with no verbose message. 30 | */ 31 | public ColorFormatException() { 32 | } 33 | 34 | /** 35 | * Constructs a {@code ColorFormatException} with verbose message. 36 | * 37 | * @param message error message 38 | */ 39 | public ColorFormatException(String message) { 40 | super(message); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/def/CycleDependencyException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.def; 18 | 19 | /** 20 | * An exception is thrown when some circular dependencies are found. 21 | * 22 | * @author Jamison Jiang 23 | */ 24 | public class CycleDependencyException extends RuntimeException { 25 | 26 | private static final long serialVersionUID = -3107358271649259443L; 27 | 28 | public CycleDependencyException() { 29 | } 30 | 31 | public CycleDependencyException(String message) { 32 | super(message); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/src/main/java/org/graphper/def/Edge.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The graph-support project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.graphper.def; 18 | 19 | /** 20 | * Basic identification of graph undirected edges. 21 | * 22 | * @param1111 | 5 |1111 | 6 |1111 | 7 |1111 | 8 ||||
22222 | 11 |22222 | 12 |22222 | 13 |22222 | 14 ||||
1111 | 17 |1111 | 18 |1111 | 19 |1111 | 20 |1111 | 21 |1111 | 22 |1111 | 23 |
First Name | 4 |Last Name | 5 |Email Address | 6 |
---|---|---|
Hillary | 9 |Nyakundi | 10 |tables@mail.com | 11 |
Lary | 14 |Mak | 15 |developer@mail.com | 16 |
Name | 4 |Subject | 5 |Marks | 6 |
---|---|---|
Hillary | 9 |Advanced Web | 10 |75 | 11 |
Operating Syatem | 14 |60 | 15 ||
Lary | 18 |Advanced Web | 19 |80 | 20 |
Operating Syatem | 23 |75 | 24 ||
Total Average: 72.5 | 27 |
Animals | 4 ||
---|---|
Hippopotamus | 7 ||
Horse | 10 |Mare | 11 |
Stallion | 14 ||
Crocodile | 17 ||
Chicken | 20 |Hen | 21 |
Rooster | 24 |
title1 | 4 |title2 | 5 |title3 | 6 ||||
---|---|---|---|---|---|
9 |
|
17 | cell2 | 18 |cell3 | 19 ||||
cell4 | 22 |cell5 | 23 |cell6 | 24 |
First Column of Outer Table | 4 |
5 |
|
14 |
Name | 4 |Age | 5 ||
---|---|---|
Jill | 8 |Smith | 9 |43 | 10 |
Eve | 13 |Jackson | 14 |57 | 15 |
18) ∠[EBA] = ∠[HFA] |
Rule 31. |
ff|sdf|{s|s|s1}| sh0007}|
4 |
21 | >];
22 | }
--------------------------------------------------------------------------------
/test/src/test/resources/dot/manual/case8.dot:
--------------------------------------------------------------------------------
1 | digraph unix {
2 | nodesep=0.486111;
3 | ranksep=0.833333;
4 | remincross=true;
5 | searchsize=500;
6 | sh0006 [shape=rect,label="sh0006",width=0.861111,height=0.543335,color="#000006"];
7 | sh0007 [shape=rect,label="sh0007",width=1.236111,height=0.543335,color="#000007"];
8 | sh0008 [shape=rect,label="sh0008",width=0.694444,height=0.543335,color="#000008"];
9 | sh0009 [shape=rect,label="sh0009",width=0.958333,height=0.543335,color="#000009"];
10 | sh0010 [shape=plain,label=<
5 | foo bar baz
19 |
6 |
12 |
7 |
11 |
8 | one two three
9 | four five six
10 | seven eight nine
13 |
18 |
14 |
17 |
15 | eins zwei sechs
16 | vier ffff
20 | abc
>];
11 |
12 | sh0010->sh0006[tailcell="p76423d8352c9e8fc8d7d65f62c55eae9",arrowsize=0.5,minlen=0,color="#00000B"];
13 | sh0010->sh0007[tailcell="pf75d91cdd36b85cc4a8dfeca4f24fa14",arrowsize=0.5,minlen=1,color="#00000F",showboxes=true];
14 | sh0010->sh0008[tailcell="pd8b00929dec65d422303256336ada04f",arrowsize=0.5,minlen=2,color="#000013"];
15 | sh0009->sh0010[headcell="pf75d91cdd36b85cc4a8dfeca4f24fa14",arrowsize=0.5,minlen=1,color="#000017"];
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/test/src/test/resources/dot/manual/case9.dot:
--------------------------------------------------------------------------------
1 | digraph unix {
2 | splines=ortho
3 |
4 | subgraph cluster_0 {
5 | label="cluster"
6 | margin="1.5,1"
7 | style=dashed
8 | sh0006
9 | sh0007
10 | }
11 |
12 | sh0006 [shape=record,label="{{process >;
15 | color=blue
16 | }
17 | start -> a0[label=
foo | bar | baz | ||||||
qux | quux |
6 |
7 |
|
19 |
|
30 |
|
35 | second 333 | 36 |
class |
qualifier |
elephant | 14 |two | 16 |||||
19 |
|
25 | penguin | 26 |||||
4 | 29 |
39 | | Edge labels also | 40 |41 | |
elephant | 8 |two | 10 |||||
13 |
|
19 | penguin | 20 |||||
4 | 23 |
1111 | 5 |1111 | 6 |1111 | 7 |1111 | 8 ||||
22222 | 11 |22222 | 12 |22222 | 13 |22222 | 14 ||||
1111 | 17 |1111 | 18 |1111 | 19 |1111 | 20 |1111 | 21 |1111 | 22 |1111 | 23 |
First Name | 4 |Last Name | 5 |Email Address | 6 |
---|---|---|
Hillary | 9 |Nyakundi | 10 |tables@mail.com | 11 |
Lary | 14 |Mak | 15 |developer@mail.com | 16 |
Name | 4 |Subject | 5 |Marks | 6 |
---|---|---|
Hillary | 9 |Advanced Web | 10 |75 | 11 |
Operating Syatem | 14 |60 | 15 ||
Lary | 18 |Advanced Web | 19 |80 | 20 |
Operating Syatem | 23 |75 | 24 ||
Total Average: 72.5 | 27 |
Animals | 4 ||
---|---|
Hippopotamus | 7 ||
Horse | 10 |Mare | 11 |
Stallion | 14 ||
Crocodile | 17 ||
Chicken | 20 |Hen | 21 |
Rooster | 24 |
title1 | 4 |title2 | 5 |title3 | 6 ||||
---|---|---|---|---|---|
9 |
|
17 | cell2 | 18 |cell3 | 19 ||||
cell4 | 22 |cell5 | 23 |cell6 | 24 |
First Column of Outer Table | 4 |
5 |
|
14 |
Name | 4 |Age | 5 ||
---|---|---|
Jill | 8 |Smith | 9 |43 | 10 |
Eve | 13 |Jackson | 14 |57 | 15 |