laser.regularlanguage.fsa
Class FSADotWriter<L extends LabelInterface>

java.lang.Object
  extended by laser.dotgraph.AbstractDotGraphWriter
      extended by laser.regularlanguage.fsa.FSADotWriter<L>
Type Parameters:
L - The type of labels that the FSA uses
All Implemented Interfaces:
DotConstants

public class FSADotWriter<L extends LabelInterface>
extends AbstractDotGraphWriter

The FSADotWriter class outputs the given FSA in dot format to the specified output.

Author:
Heather M. Conboy (laser-software@cs.umass.edu)

Field Summary
 
Fields inherited from interface laser.dotgraph.DotConstants
DOT_ATTRIBUTE_LIST_FOOTER, DOT_ATTRIBUTE_LIST_HEADER, DOT_ATTRIBUTE_LIST_SEPARATOR, DOT_ATTRIBUTE_SEPARATOR, DOT_COLOR_ATTRIBUTE_NAME, DOT_EDGE_SEPARATOR, DOT_GRAPH_EXTENSION, DOT_GRAPH_FOOTER, DOT_GRAPH_HEADER_PREFIX, DOT_GRAPH_HEADER_SUFFIX, DOT_LABEL_ATTRIBUTE_NAME, DOT_LINE_SEPARATOR, DOT_SHAPE_ATTRIBUTE_NAME, DOT_STATEMENT_SUFFIX, DOT_STYLE_ATTRIBUTE_NAME, DOT_SUBGRAPH_FOOTER, DOT_SUBGRAPH_HEADER_PREFIX, DOT_SUBGRAPH_HEADER_SUFFIX, DOT_WORD_SEPARATOR
 
Constructor Summary
FSADotWriter()
          Creates a new FSADotWriter.
 
Method Summary
 java.util.List<DotAttribute> getDotEdgeAttributes(java.lang.Object edge)
          Gets the attributes of the given edge.
 java.lang.String getDotEdgeName(java.lang.Object edge)
          Gets the name of the given edge.
 int getDotEdgeSourceID(java.lang.Object edge)
          Gets the ID of the source node of the given edge.
 int getDotEdgeTargetID(java.lang.Object edge)
          Gets the ID of the target node of the given edge.
 java.util.List<DotAttribute> getDotGraphAttributes(java.lang.Object graph)
          Gets the attributes of the given graph.
 java.util.Set<java.lang.Object> getDotGraphEdges(java.lang.Object graph)
          Gets the Set of edges contained within the given graph.
 java.lang.String getDotGraphName(java.lang.Object graph)
          Gets the name of the given graph.
 java.util.Set<java.lang.Object> getDotGraphNodes(java.lang.Object graph)
          Gets the Set of nodes contained within the given graph.
 java.util.Set<java.lang.Object> getDotGraphSubgraphs(java.lang.Object graph)
          Gets the Set of subgraphs contained within the given graph.
 java.util.List<DotAttribute> getDotNodeAttributes(java.lang.Object node)
          Gets the attributes of the given node.
 int getDotNodeID(java.lang.Object node)
          Gets the ID of the given node.
 java.lang.String getDotNodeName(java.lang.Object node)
          Gets the name of the given node.
 java.util.List<DotAttribute> getDotSubgraphAttributes(java.lang.Object subgraph)
          Gets the attributes of the given subgraph.
 java.util.Set<java.lang.Object> getDotSubgraphEdges(java.lang.Object subgraph)
          Gets the Set of edges contained within the given subgraph.
 int getDotSubgraphID(java.lang.Object subgraph)
          Gets the ID of the given subgraph.
 java.lang.String getDotSubgraphName(java.lang.Object subgraph)
          Gets the name of the given subgraph.
 java.util.Set<java.lang.Object> getDotSubgraphNodes(java.lang.Object subgraph)
          Gets the Set of nodes contained within the given subgraph.
 
Methods inherited from class laser.dotgraph.AbstractDotGraphWriter
toDoubleQuotedString, writeDotAttribute, writeDotAttributeList, writeDotAttributeStatements, writeDotEdge, writeDotGraph, writeDotGraph, writeDotNode, writeDotSubgraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSADotWriter

public FSADotWriter()
Creates a new FSADotWriter.

Method Detail

getDotGraphName

public java.lang.String getDotGraphName(java.lang.Object graph)
Gets the name of the given graph.

Specified by:
getDotGraphName in class AbstractDotGraphWriter
Parameters:
graph - The graph of interest
Returns:
The name for the given graph

getDotGraphAttributes

public java.util.List<DotAttribute> getDotGraphAttributes(java.lang.Object graph)
Gets the attributes of the given graph.

Specified by:
getDotGraphAttributes in class AbstractDotGraphWriter
Parameters:
graph - The graph of interest
Returns:
The List of DotAttributes for the given graph

getDotGraphSubgraphs

public java.util.Set<java.lang.Object> getDotGraphSubgraphs(java.lang.Object graph)
Gets the Set of subgraphs contained within the given graph.

Specified by:
getDotGraphSubgraphs in class AbstractDotGraphWriter
Parameters:
graph - The graph of interest
Returns:
The Set of subgraphs contained within the given graph

getDotGraphNodes

public java.util.Set<java.lang.Object> getDotGraphNodes(java.lang.Object graph)
Gets the Set of nodes contained within the given graph.

Specified by:
getDotGraphNodes in class AbstractDotGraphWriter
Parameters:
graph - The graph of interest
Returns:
The Set of nodes contained within the given graph

getDotGraphEdges

public java.util.Set<java.lang.Object> getDotGraphEdges(java.lang.Object graph)
Gets the Set of edges contained within the given graph.

Specified by:
getDotGraphEdges in class AbstractDotGraphWriter
Parameters:
graph - The graph of interest
Returns:
The Set of edges contained within the given graph

getDotSubgraphName

public java.lang.String getDotSubgraphName(java.lang.Object subgraph)
Gets the name of the given subgraph.

Specified by:
getDotSubgraphName in class AbstractDotGraphWriter
Parameters:
subgraph - The subgraph of interest
Returns:
The name for the given subgraph

getDotSubgraphID

public int getDotSubgraphID(java.lang.Object subgraph)
Gets the ID of the given subgraph.

Specified by:
getDotSubgraphID in class AbstractDotGraphWriter
Parameters:
subgraph - The subgraph of interest
Returns:
The ID of the given subgraph

getDotSubgraphAttributes

public java.util.List<DotAttribute> getDotSubgraphAttributes(java.lang.Object subgraph)
Gets the attributes of the given subgraph.

Specified by:
getDotSubgraphAttributes in class AbstractDotGraphWriter
Parameters:
subgraph - The subgraph of interest
Returns:
The List of DotAttributes for the given subgraph

getDotSubgraphNodes

public java.util.Set<java.lang.Object> getDotSubgraphNodes(java.lang.Object subgraph)
Gets the Set of nodes contained within the given subgraph.

Specified by:
getDotSubgraphNodes in class AbstractDotGraphWriter
Parameters:
subgraph - The graph of interest
Returns:
The Set of nodes contained within the given subgraph
See Also:
AbstractDotGraphWriter.getDotGraphNodes(java.lang.Object)

getDotSubgraphEdges

public java.util.Set<java.lang.Object> getDotSubgraphEdges(java.lang.Object subgraph)
Gets the Set of edges contained within the given subgraph.

Specified by:
getDotSubgraphEdges in class AbstractDotGraphWriter
Parameters:
subgraph - The subgraph of interest
Returns:
The Set of edges contained within the given subgraph
See Also:
AbstractDotGraphWriter.getDotGraphEdges(java.lang.Object)

getDotNodeName

public java.lang.String getDotNodeName(java.lang.Object node)
Gets the name of the given node.

Specified by:
getDotNodeName in class AbstractDotGraphWriter
Parameters:
node - The node of interest
Returns:
The name for the given node

getDotNodeID

public int getDotNodeID(java.lang.Object node)
Gets the ID of the given node.

Specified by:
getDotNodeID in class AbstractDotGraphWriter
Parameters:
node - The node of interest
Returns:
The ID of the given node

getDotNodeAttributes

public java.util.List<DotAttribute> getDotNodeAttributes(java.lang.Object node)
Gets the attributes of the given node.

Specified by:
getDotNodeAttributes in class AbstractDotGraphWriter
Parameters:
node - The node of interest
Returns:
The List of DotAttributes for the given node

getDotEdgeName

public java.lang.String getDotEdgeName(java.lang.Object edge)
Gets the name of the given edge.

Specified by:
getDotEdgeName in class AbstractDotGraphWriter
Parameters:
edge - The edge of interest
Returns:
The name

getDotEdgeSourceID

public int getDotEdgeSourceID(java.lang.Object edge)
Gets the ID of the source node of the given edge.

Specified by:
getDotEdgeSourceID in class AbstractDotGraphWriter
Parameters:
edge - The edge of interest
Returns:
The ID of the source node

getDotEdgeTargetID

public int getDotEdgeTargetID(java.lang.Object edge)
Gets the ID of the target node of the given edge.

Specified by:
getDotEdgeTargetID in class AbstractDotGraphWriter
Parameters:
edge - The edge of interest
Returns:
The ID of the target node

getDotEdgeAttributes

public java.util.List<DotAttribute> getDotEdgeAttributes(java.lang.Object edge)
Gets the attributes of the given edge.

Specified by:
getDotEdgeAttributes in class AbstractDotGraphWriter
Parameters:
edge - The edge of interest
Returns:
The List of DotAttributes for the given edge