Package de.xima.fc.common.graphdot
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
public final class GraphDotModelWriter extends GraphDotProductionWriter
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.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
, for writing individual grammar productions.,, for writing individual tokens manually.
-
-
Field Summary
-
Fields inherited from class de.xima.fc.common.graphdot.GraphDotTokenWriter
writer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GraphDotModelWriterforWriter(Writer writer)Creates 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 de.xima.fc.common.graphdot.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, writeProductionSubGraphHeader
-
Methods inherited from class de.xima.fc.common.graphdot.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 Detail
-
writeModelAssignment
public void writeModelAssignment(Assignment assignment) throws IOException
Writes an assignment model.- Parameters:
assignment- Assignment to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelAssignmentStatement
public void writeModelAssignmentStatement(AssignmentStatement propertyStatement) throws IOException
Writes an assignment statement model.- Parameters:
propertyStatement- Property statement to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelAttributeList
public void writeModelAttributeList(IGraphDotAttributeList attributeList) throws IOException
Writes an attribute list model.- Parameters:
attributeList- Attribute list to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelAttributeStatement
public void writeModelAttributeStatement(AttributeStatement attributeStatement) throws IOException
Writes an attribute statement model.- Parameters:
attributeStatement- Attribute statement to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelEdgeStatement
public void writeModelEdgeStatement(IGraphDotEdgeStatement<?> edgeStatement) throws IOException
Write an edge model- Parameters:
edgeStatement- Edge statement to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelGraph
public void writeModelGraph(IGraphDotGraph<?> graph) throws IOException
Writes a graph model.- Parameters:
graph- Graph to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelNodeId
public void writeModelNodeId(NodeId nodeId) throws IOException
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
public void writeModelNodeStatement(NodeStatement nodeStatement) throws IOException
Write a node statement model.- Parameters:
nodeStatement- Node statement to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelPort
public void writeModelPort(Port port) throws IOException
Writes a port model.- Parameters:
port- Port to write.- Throws:
IOException- When content could not be written to the writer.
-
writeModelSubGraph
public void writeModelSubGraph(IGraphDotSubGraph<?,?> subGraph) throws IOException
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
public static GraphDotModelWriter forWriter(Writer writer)
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
public static GraphDotModelWriter forWriter(Writer writer, CharSequence indentChar)
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.
-
-