Class GraphDotModelWriter
java.lang.Object
de.xima.fc.common.graphdot.GraphDotTokenWriter
de.xima.fc.common.graphdot.GraphDotProductionWriter
de.xima.fc.common.graphdot.GraphDotModelWriter
- All Implemented Interfaces:
AutoCloseable
Writer for creating content conforming to the graphviz dot language syntax specification, see DOT Language.
This writer offers methods named writeModel* to write syntax tree POJO models. As such, it offers the
highest level API.
See GraphDotProductionWriter, for writing individual grammar productions.
See GraphDotTokenWriter, for writing individual tokens manually.
- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
Fields inherited from class GraphDotTokenWriter
writer -
Method Summary
Modifier and TypeMethodDescriptionstatic GraphDotModelWriterCreates a new dot graph model writer.static GraphDotModelWriterforWriter(Writer writer, CharSequence indentChar) Creates a new dot graph model writer.voidwriteModelAssignment(Assignment assignment) Writes an assignment model.voidwriteModelAssignmentStatement(AssignmentStatement propertyStatement) Writes an assignment statement model.voidwriteModelAttributeList(IGraphDotAttributeList attributeList) Writes an attribute list model.voidwriteModelAttributeStatement(AttributeStatement attributeStatement) Writes an attribute statement model.voidwriteModelEdgeStatement(IGraphDotEdgeStatement<?> edgeStatement) Write an edge modelvoidwriteModelGraph(IGraphDotGraph<?> graph) Writes a graph model.voidwriteModelNodeId(NodeId nodeId) Writes a node ID model.voidwriteModelNodeStatement(NodeStatement nodeStatement) Write a node statement model.voidwriteModelPort(Port port) Writes a port model.voidwriteModelSubGraph(IGraphDotSubGraph<?, ?> subGraph) Writes a sub graph statement model.voidwriteModelSubGraphExpression(IGraphDotSubGraphExpression<?> subGraphExpression) Writes a sub graph expression model.Methods inherited from class GraphDotProductionWriter
markEndOfLine, outputLineBreakIfRequested, writeProductionAssignment, writeProductionAssignment, writeProductionAssignmentStatement, writeProductionAssignmentStatement, writeProductionAttributeList, writeProductionAttributeStatement, writeProductionAttributeStatementEdge, writeProductionAttributeStatementGraph, writeProductionAttributeStatementNode, writeProductionEdgeStatement, writeProductionEdgeStatement, writeProductionEdgeStatementDirected, writeProductionEdgeStatementDirected, writeProductionEdgeStatementDirected, writeProductionEdgeStatementDirected, writeProductionEdgeStatementUndirected, writeProductionEdgeStatementUndirected, writeProductionEdgeStatementUndirected, writeProductionEdgeStatementUndirected, writeProductionEndBlock, writeProductionEndBlockExpression, writeProductionGraphHeader, writeProductionGraphHeaderDirected, writeProductionGraphHeaderDirected, writeProductionGraphHeaderUndirected, writeProductionGraphHeaderUndirected, writeProductionNodeId, writeProductionNodeStatement, writeProductionNodeStatement, writeProductionNodeStatement, writeProductionNodeStatement, writeProductionOpenBlock, writeProductionPort, writeProductionSubGraphHeader, writeProductionSubGraphHeaderMethods inherited from class GraphDotTokenWriter
close, decreaseIndent, increaseIndent, writerTokenComma, writeTokenAttributeStatementType, writeTokenClosingAngleBracket, writeTokenClosingBrace, writeTokenClosingBracket, writeTokenColon, writeTokenCompassPointValue, writeTokenDoubleQuote, writeTokenEdgeOperation, writeTokenEqualSign, writeTokenGraphType, writeTokenIdHtml, writeTokenIdLiteral, writeTokenIndent, writeTokenLineBeak, writeTokenOpeningAngleBracket, writeTokenOpeningBrace, writeTokenOpeningBracket, writeTokenSemiColon, writeTokenSpace, writeTokenStrict, writeTokenSubGraph
-
Method Details
-
writeModelAssignment
Writes an assignment model.- Parameters:
assignment- Assignment to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelAssignmentStatement
Writes an assignment statement model.- Parameters:
propertyStatement- Property statement to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelAttributeList
Writes an attribute list model.- Parameters:
attributeList- Attribute list to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelAttributeStatement
Writes an attribute statement model.- Parameters:
attributeStatement- Attribute statement to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelEdgeStatement
Write an edge model- Parameters:
edgeStatement- Edge statement to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelGraph
Writes a graph model.- Parameters:
graph- Graph to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelNodeId
Writes a node ID model.- Parameters:
nodeId- A node ID element to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelNodeStatement
Write a node statement model.- Parameters:
nodeStatement- Node statement to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelPort
Writes a port model.- Parameters:
port- Port to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelSubGraph
Writes a sub graph statement model.- Parameters:
subGraph- Sub graph statement to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelSubGraphExpression
public void writeModelSubGraphExpression(IGraphDotSubGraphExpression<?> subGraphExpression) throws IOException Writes a sub graph expression model.- Parameters:
subGraphExpression- Sub graph expression to write.- Throws:
IOException- When content could not be written to the writer.
-
forWriter
Creates a new dot graph model writer. The content is written to the given writer.- Parameters:
writer- Writer to which to write the output.- Returns:
- A new graph dot model writer.
-
forWriter
Creates a new dot graph model writer. The content is written to the given writer.- Parameters:
writer- Writer to which to write the output.indentChar- Char sequence to use for indenting.- Returns:
- A new graph dot model writer.
-