Package de.xima.fc.common.graphdot
Class GraphDotProductionWriter
- java.lang.Object
-
- de.xima.fc.common.graphdot.GraphDotTokenWriter
-
- de.xima.fc.common.graphdot.GraphDotProductionWriter
-
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
GraphDotModelWriter
public class GraphDotProductionWriter extends GraphDotTokenWriter
Writer for creating content conforming to the graphviz dot language syntax specification, see DOT Language.This writer offers methods for writing various grammar productions, in addition to the
tokens.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
, for writing POJO models directly.,, 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 GraphDotProductionWriterforWriter(Writer writer)Creates a new dot graph production writer.static GraphDotProductionWriterforWriter(Writer writer, CharSequence indentChar)Creates a new dot graph production writer.voidmarkEndOfLine()Queues a line break for the next time a production is written.voidoutputLineBreakIfRequested(int indentDeltaDirection)Writes a new line, if queued bymarkEndOfLine(), decreases or increases the indent if requested, and writes the indent for the new indent level.voidwriteProductionAssignment(CharSequence name, Object value)Writes an assignment production.voidwriteProductionAssignment(Map.Entry<? extends CharSequence,? extends Object> keyValuePair)Writes an assignment production.voidwriteProductionAssignmentStatement(CharSequence name, Object value)Writes an assignment statement production.voidwriteProductionAssignmentStatement(Map.Entry<? extends CharSequence,? extends Object> keyValuePair)Writes an assignment statement production.voidwriteProductionAttributeList(Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Writes a list of attributes.voidwriteProductionAttributeStatement(EAttributeStatementType type, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Writes an attribute statement.voidwriteProductionAttributeStatementEdge(Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Writes an edge attribute statement.voidwriteProductionAttributeStatementGraph(Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Writes a graph attribute statement.voidwriteProductionAttributeStatementNode(Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Writes a node attribute statement.<W extends GraphDotTokenWriter>
voidwriteProductionEdgeStatement(EEdgeType edgeOp, com.helger.commons.callback.IThrowingRunnable<IOException> sourceNode, com.helger.commons.callback.IThrowingRunnable<IOException> targetNode, Iterable<? extends com.helger.commons.callback.IThrowingRunnable<IOException>> moreNodes, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Write an edge statement.voidwriteProductionEdgeStatement(EEdgeType edgeOp, CharSequence sourceNodeId, CharSequence sourcePortId, ECompassPointType sourceCompassPoint, CharSequence targetNodeId, CharSequence targetPortId, ECompassPointType targetCompassPoint, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Write an edge statement.voidwriteProductionEdgeStatementDirected(CharSequence sourceNodeId, CharSequence targetNodeId)Write a directed edge statement.voidwriteProductionEdgeStatementDirected(CharSequence sourceNodeId, CharSequence sourcePortId, ECompassPointType sourceCompassPoint, CharSequence targetNodeId, CharSequence targetPortId, ECompassPointType targetCompassPoint, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Write a directed edge statement.voidwriteProductionEdgeStatementDirected(CharSequence sourceNodeId, CharSequence targetNodeId, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Write a directed edge statement.voidwriteProductionEdgeStatementDirected(List<? extends CharSequence> nodeIds, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Write a directed edge statement.voidwriteProductionEdgeStatementUndirected(CharSequence sourceNodeId, CharSequence targetNodeId)Write an undirected edge statement.voidwriteProductionEdgeStatementUndirected(CharSequence sourceNodeId, CharSequence sourcePortId, ECompassPointType sourceCompassPoint, CharSequence targetNodeId, CharSequence targetPortId, ECompassPointType targetCompassPoint, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Write an undirected edge statement.voidwriteProductionEdgeStatementUndirected(CharSequence sourceNodeId, CharSequence targetNodeId, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Write an undirected edge statement.voidwriteProductionEdgeStatementUndirected(List<? extends CharSequence> nodeIds, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Write an udirected edge statement.voidwriteProductionEndBlock()Write a closing brace that was opened withwriteProductionOpenBlock(), decrements the indent, and queues a line break for the next time a production is written.voidwriteProductionEndBlockExpression()Write a closing brace that was opened withwriteProductionOpenBlock()and decrements the indent.voidwriteProductionGraphHeader(EGraphType type, CharSequence id, boolean strict)Write the header of a graph.voidwriteProductionGraphHeaderDirected(CharSequence id)Writes the header of a directed graph.voidwriteProductionGraphHeaderDirected(CharSequence id, boolean strict)Writes the header of a directed graph.voidwriteProductionGraphHeaderUndirected(CharSequence id)Writes the header of an undirected graph.voidwriteProductionGraphHeaderUndirected(CharSequence id, boolean strict)Writes the header of an undirected graph.voidwriteProductionNodeId(CharSequence nodeId, CharSequence port, ECompassPointType compassPoint)Writes an expression for a node ID with an optional port or compass point.voidwriteProductionNodeStatement(CharSequence nodeId)Writes a node statement.voidwriteProductionNodeStatement(CharSequence nodeId, CharSequence port, ECompassPointType compassPoint)Writes a node statement.voidwriteProductionNodeStatement(CharSequence nodeId, CharSequence port, ECompassPointType compassPoint, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Writes a node statement.voidwriteProductionNodeStatement(CharSequence nodeId, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes)Writes a node statement.voidwriteProductionOpenBlock()Write an opening brace, increases the indent, and queues a line break for the next time a production is written.voidwriteProductionPort(CharSequence portId, ECompassPointType compassPoint)Writes a port and compass point expression.voidwriteProductionSubGraphHeader()Writes the header of a sub graph.voidwriteProductionSubGraphHeader(CharSequence id)Writes the header of a sub graph.-
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
-
markEndOfLine
public final void markEndOfLine()
Queues a line break for the next time a production is written.
-
outputLineBreakIfRequested
public final void outputLineBreakIfRequested(int indentDeltaDirection) throws IOExceptionWrites a new line, if queued bymarkEndOfLine(), decreases or increases the indent if requested, and writes the indent for the new indent level.- Parameters:
indentDeltaDirection- Negative to decrease the indent, positive to increase the indent, zero to keep the indent.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionAssignment
public final void writeProductionAssignment(CharSequence name, Object value) throws IOException
Writes an assignment production.ID '=' ID
- Parameters:
name- Name of the property.value- Value of the property.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionAssignment
public final void writeProductionAssignment(Map.Entry<? extends CharSequence,? extends Object> keyValuePair) throws IOException
Writes an assignment production.ID '=' ID
- Parameters:
keyValuePair- Name and value to write.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionAssignmentStatement
public final void writeProductionAssignmentStatement(CharSequence name, Object value) throws IOException
Writes an assignment statement production.ID '=' ID;
- Parameters:
name- Name of the property, must not benullnor empty.value- Value of the property, converted to a char sequence.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionAssignmentStatement
public final void writeProductionAssignmentStatement(Map.Entry<? extends CharSequence,? extends Object> keyValuePair) throws IOException
Writes an assignment statement production.ID '=' ID;
- Parameters:
keyValuePair- Name and value to write.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionAttributeList
public final void writeProductionAttributeList(Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Writes a list of attributes.attr_list : '[' [ a_list ] ']' [ attr_list ] a_list : ID '=' ID [ (';' | ',') ] [ a_list ]- Parameters:
attributes- Attributes to write.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionAttributeStatement
public final void writeProductionAttributeStatement(EAttributeStatementType type, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Writes an attribute statement.attr_stmt : ('graph'| 'node' | 'edge' ) attr_list- Parameters:
type- Type of the attribute statement.attributes- Attributes to set.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionAttributeStatementEdge
public final void writeProductionAttributeStatementEdge(Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Writes an edge attribute statement. Sets the default attributes that apply to all following edges.attr_stmt : 'edge' attr_list
- Parameters:
attributes- Attributes to set.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionAttributeStatementGraph
public final void writeProductionAttributeStatementGraph(Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Writes a graph attribute statement. Sets the default attributes that apply to all following graphs.attr_stmt : 'graph' attr_list
- Parameters:
attributes- Attributes to set.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionAttributeStatementNode
public final void writeProductionAttributeStatementNode(Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Writes a node attribute statement. Sets the default attributes that apply to all following nodes.attr_stmt : 'node' attr_list
- Parameters:
attributes- Attributes to set.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEdgeStatement
public final void writeProductionEdgeStatement(EEdgeType edgeOp, CharSequence sourceNodeId, CharSequence sourcePortId, ECompassPointType sourceCompassPoint, CharSequence targetNodeId, CharSequence targetPortId, ECompassPointType targetCompassPoint, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Write an edge statement.edge_stmt : (node_id | subgraph) edgeRHS [ attr_list ] edgeRHS : edgeop (node_id | subgraph) [ edgeRHS ] edgeop : '->' | '--'
- Parameters:
edgeOp- Type of the edge operation.sourceNodeId- ID of the source node, the start of the edge.sourcePortId- Optional ID of the source port.sourceCompassPoint- Optional ID of the source compass point.targetNodeId- ID of the target node, the end of the edge.targetPortId- Optional ID of the target port.targetCompassPoint- Optional ID of the target compass point.attributes- Optional attributes for the edge.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEdgeStatement
public final <W extends GraphDotTokenWriter> void writeProductionEdgeStatement(EEdgeType edgeOp, com.helger.commons.callback.IThrowingRunnable<IOException> sourceNode, com.helger.commons.callback.IThrowingRunnable<IOException> targetNode, Iterable<? extends com.helger.commons.callback.IThrowingRunnable<IOException>> moreNodes, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Write an edge statement.edge_stmt : (node_id | subgraph) edgeRHS [ attr_list ] edgeRHS : edgeop (node_id | subgraph) [ edgeRHS ] edgeop : '->' | '--'
- Parameters:
edgeOp- Type of the edge operation.sourceNode- Writer for the source node, the start of the edge.targetNode- Writer for the target node, the end of the edge.moreNodes- Additional nodes to which to draw an edge.attributes- Optional attributes for the edge.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEdgeStatementDirected
public final void writeProductionEdgeStatementDirected(CharSequence sourceNodeId, CharSequence targetNodeId) throws IOException
Write a directed edge statement.edge_stmt : (node_id | subgraph) edgeRHS [ attr_list ] edgeRHS : '->' (node_id | subgraph) [ edgeRHS ]
- Parameters:
sourceNodeId- ID of the source node, the start of the edge.targetNodeId- ID of the target node, the end of the edge.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEdgeStatementDirected
public final void writeProductionEdgeStatementDirected(CharSequence sourceNodeId, CharSequence sourcePortId, ECompassPointType sourceCompassPoint, CharSequence targetNodeId, CharSequence targetPortId, ECompassPointType targetCompassPoint, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Write a directed edge statement.edge_stmt : (node_id | subgraph) edgeRHS [ attr_list ] edgeRHS : '->' (node_id | subgraph) [ edgeRHS ]
- Parameters:
sourceNodeId- ID of the source node, the start of the edge.sourcePortId- Optional ID of the source port.sourceCompassPoint- Optional ID of the source compass point.targetNodeId- ID of the target node, the end of the edge.targetPortId- Optional ID of the target port.targetCompassPoint- Optional ID of the target compass point.attributes- Optional attributes for the edge.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEdgeStatementDirected
public final void writeProductionEdgeStatementDirected(CharSequence sourceNodeId, CharSequence targetNodeId, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Write a directed edge statement.edge_stmt : (node_id | subgraph) edgeRHS [ attr_list ] edgeRHS : '->' (node_id | subgraph) [ edgeRHS ]
- Parameters:
sourceNodeId- ID of the source node, the start of the edge.targetNodeId- ID of the target node, the end of the edge.attributes- Optional attributes for the edge.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEdgeStatementDirected
public final void writeProductionEdgeStatementDirected(List<? extends CharSequence> nodeIds, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Write a directed edge statement.edge_stmt : (node_id | subgraph) edgeRHS [ attr_list ] edgeRHS : '->' (node_id | subgraph) [ edgeRHS ]
- Parameters:
nodeIds- ID of the node between which to draw edges. Must contain at least 2 items.attributes- Optional attributes for the edge.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEdgeStatementUndirected
public final void writeProductionEdgeStatementUndirected(CharSequence sourceNodeId, CharSequence targetNodeId) throws IOException
Write an undirected edge statement.edge_stmt : (node_id | subgraph) edgeRHS [ attr_list ] edgeRHS : '--' (node_id | subgraph) [ edgeRHS ]
- Parameters:
sourceNodeId- ID of the source node, the start of the edge.targetNodeId- ID of the target node, the end of the edge.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEdgeStatementUndirected
public final void writeProductionEdgeStatementUndirected(CharSequence sourceNodeId, CharSequence sourcePortId, ECompassPointType sourceCompassPoint, CharSequence targetNodeId, CharSequence targetPortId, ECompassPointType targetCompassPoint, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Write an undirected edge statement.edge_stmt : (node_id | subgraph) edgeRHS [ attr_list ] edgeRHS : '--' (node_id | subgraph) [ edgeRHS ]
- Parameters:
sourceNodeId- ID of the source node, the start of the edge.sourcePortId- Optional ID of the source port.sourceCompassPoint- Optional ID of the source compass point.targetNodeId- ID of the target node, the end of the edge.targetPortId- Optional ID of the target port.targetCompassPoint- Optional ID of the target compass point.attributes- Optional attributes for the edge.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEdgeStatementUndirected
public final void writeProductionEdgeStatementUndirected(CharSequence sourceNodeId, CharSequence targetNodeId, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Write an undirected edge statement.edge_stmt : (node_id | subgraph) edgeRHS [ attr_list ] edgeRHS : '--' (node_id | subgraph) [ edgeRHS ]
- Parameters:
sourceNodeId- ID of the source node, the start of the edge.targetNodeId- ID of the target node, the end of the edge.attributes- Optional attributes for the edge.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEdgeStatementUndirected
public final void writeProductionEdgeStatementUndirected(List<? extends CharSequence> nodeIds, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Write an udirected edge statement.edge_stmt : (node_id | subgraph) edgeRHS [ attr_list ] edgeRHS : '--' (node_id | subgraph) [ edgeRHS ]
- Parameters:
nodeIds- ID of the node between which to draw edges. Must contain at least 2 items.attributes- Optional attributes for the edge.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEndBlock
public final void writeProductionEndBlock() throws IOExceptionWrite a closing brace that was opened withwriteProductionOpenBlock(), decrements the indent, and queues a line break for the next time a production is written.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionEndBlockExpression
public final void writeProductionEndBlockExpression() throws IOExceptionWrite a closing brace that was opened withwriteProductionOpenBlock()and decrements the indent.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionGraphHeader
public final void writeProductionGraphHeader(EGraphType type, CharSequence id, boolean strict) throws IOException
Write the header of a graph.graph : graph_header graph_body graph_header : [ strict ] (graph | digraph) [ ID ] graph_body : '{' stmt_list '}'- Parameters:
type- Type of the graph.id- ID of the graph.strict- Whether to use strict mode.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionGraphHeaderDirected
public final void writeProductionGraphHeaderDirected(CharSequence id) throws IOException
Writes the header of a directed graph.graph : graph_header graph_body graph_header : [ 'strict' ] 'digraph' [ ID ] graph_body : '{' stmt_list '}'- Parameters:
id- ID of the directed graph.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionGraphHeaderDirected
public final void writeProductionGraphHeaderDirected(CharSequence id, boolean strict) throws IOException
Writes the header of a directed graph.graph : graph_header graph_body graph_header : [ 'strict' ] 'digraph' [ ID ] graph_body : '{' stmt_list '}'- Parameters:
id- ID of the directed graph.strict- Whether to use strict mode.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionGraphHeaderUndirected
public final void writeProductionGraphHeaderUndirected(CharSequence id) throws IOException
Writes the header of an undirected graph.graph : graph_header graph_body graph_header : [ 'strict' ] 'graph' [ ID ] graph_body : '{' stmt_list '}'- Parameters:
id- ID of the undirected graph.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionGraphHeaderUndirected
public final void writeProductionGraphHeaderUndirected(CharSequence id, boolean strict) throws IOException
Writes the header of an undirected graph.graph : graph_header graph_body graph_header : [ 'strict' ] 'graph' [ ID ] graph_body : '{' stmt_list '}'- Parameters:
id- ID of the undirected graph.strict- Whether to use strict mode.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionNodeId
public final void writeProductionNodeId(CharSequence nodeId, CharSequence port, ECompassPointType compassPoint) throws IOException
Writes an expression for a node ID with an optional port or compass point.node_id : ID [ port ] port : ( ':' ID [ ':' compass_pt ] ) | ( ':' compass_pt ) compass_pt : ( 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw' | 'c' | '_' )
- Parameters:
nodeId- Node ID to write.port- Port to write, may benull.compassPoint- Compass point to write, may benull.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionNodeStatement
public final void writeProductionNodeStatement(CharSequence nodeId) throws IOException
Writes a node statement.node_stmt : node_id [ attr_list ] node_id : ID [ port ] port : ( ':' ID [ ':' compass_pt ] ) | ( ':' compass_pt ) compass_pt : ( 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw' | 'c' | '_' )
- Parameters:
nodeId- ID of the node.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionNodeStatement
public final void writeProductionNodeStatement(CharSequence nodeId, CharSequence port, ECompassPointType compassPoint) throws IOException
Writes a node statement.node_stmt : node_id [ attr_list ] node_id : ID [ port ] port : ( ':' ID [ ':' compass_pt ] ) | ( ':' compass_pt ) compass_pt : ( 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw' | 'c' | '_' )
- Parameters:
nodeId- ID of the node.port- Port of the node.compassPoint- Compass point of the node.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionNodeStatement
public final void writeProductionNodeStatement(CharSequence nodeId, CharSequence port, ECompassPointType compassPoint, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Writes a node statement.node_stmt : node_id [ attr_list ] node_id : ID [ port ] port : ( ':' ID [ ':' compass_pt ] ) | ( ':' compass_pt ) compass_pt : ( 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw' | 'c' | '_' )
- Parameters:
nodeId- ID of the node.port- Port of the node.compassPoint- Compass point of the node.attributes- Optional attributes for the node.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionNodeStatement
public final void writeProductionNodeStatement(CharSequence nodeId, Iterator<? extends Map.Entry<? extends CharSequence,Object>> attributes) throws IOException
Writes a node statement.node_stmt : node_id [ attr_list ] node_id : ID [ port ] port : ( ':' ID [ ':' compass_pt ] ) | ( ':' compass_pt ) compass_pt : ( 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw' | 'c' | '_' )
- Parameters:
nodeId- ID of the node.attributes- Optional attributes for the node.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionOpenBlock
public final void writeProductionOpenBlock() throws IOExceptionWrite an opening brace, increases the indent, and queues a line break for the next time a production is written.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionPort
public void writeProductionPort(CharSequence portId, ECompassPointType compassPoint) throws IOException
Writes a port and compass point expression.port : ( ID [ ':' compass_pt ] ) | ( compass_pt ) compass_pt : ( 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw' | 'c' | '_' )
- Parameters:
portId- ID of the port.compassPoint- Direction of the port.- Throws:
IOException- When content could not be written to the writer.
-
writeProductionSubGraphHeader
public final void writeProductionSubGraphHeader() throws IOExceptionWrites the header of a sub graph.subgraph : subgraph_header subgraph_body subgraph_header : [ subgraph [ ID ] ] subgraph_body : '{' stmt_list '}'- Throws:
IOException- When content could not be written to the writer.
-
writeProductionSubGraphHeader
public final void writeProductionSubGraphHeader(CharSequence id) throws IOException
Writes the header of a sub graph.subgraph : subgraph_header subgraph_body subgraph_header : [ subgraph [ ID ] ] subgraph_body : '{' stmt_list '}'- Parameters:
id- Optional ID of the sub graph graph.- Throws:
IOException- When content could not be written to the writer.
-
forWriter
public static GraphDotProductionWriter forWriter(Writer writer)
Creates a new dot graph production writer. The content is written to the given writer.- Parameters:
writer- Writer to which to write the output.- Returns:
- A new graph dot production writer.
-
forWriter
public static GraphDotProductionWriter forWriter(Writer writer, CharSequence indentChar)
Creates a new dot graph production 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 production writer.
-
-