treebolic.provider.dot
Class DotParser

java.lang.Object
  extended by treebolic.provider.dot.DotParser

public class DotParser
extends java.lang.Object

Dot parser

Author:
Bernard Bou

Constructor Summary
DotParser()
           
 
Method Summary
private static java.lang.Integer getStyle(att.grappa.Attribute thisStrokeAttribute, att.grappa.Attribute thisFromAttribute, att.grappa.Attribute thisToAttribute, att.grappa.Attribute thisHiddenAttribute)
          Style factory
private static att.grappa.Graph parseDotGraph(java.net.URL thisURL)
          Parse dot graph
protected static Graph parseGraph(att.grappa.Graph thisDotGraph)
          Parse treebolic graph from dot graph
static Model parseModel(java.net.URL thisUrl)
          Parse model from dot document url
protected static Settings parseSettings(att.grappa.Graph thisDotGraph)
          Parse treebolic settings from dot file
private static Tree parseTree(att.grappa.Graph thisDotGraph)
          Parse tree from dot graph
static Tree parseTree(java.net.URL thisUrl)
          Parse tree from dot document url
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DotParser

public DotParser()
Method Detail

parseModel

public static Model parseModel(java.net.URL thisUrl)
Parse model from dot document url

Returns:
model if successful

parseTree

public static Tree parseTree(java.net.URL thisUrl)
Parse tree from dot document url

Returns:
tree if successful

parseDotGraph

private static att.grappa.Graph parseDotGraph(java.net.URL thisURL)
Parse dot graph

Parameters:
thisURL - dot file url
Returns:
dot graph

parseGraph

protected static Graph parseGraph(att.grappa.Graph thisDotGraph)
Parse treebolic graph from dot graph

Returns:
treebolic graph if successful

parseTree

private static Tree parseTree(att.grappa.Graph thisDotGraph)
Parse tree from dot graph

Returns:
tree if successful

parseSettings

protected static Settings parseSettings(att.grappa.Graph thisDotGraph)
Parse treebolic settings from dot file

Returns:
treebolic settings if successful

getStyle

private static java.lang.Integer getStyle(att.grappa.Attribute thisStrokeAttribute,
                                          att.grappa.Attribute thisFromAttribute,
                                          att.grappa.Attribute thisToAttribute,
                                          att.grappa.Attribute thisHiddenAttribute)
Style factory

Parameters:
thisStrokeAttribute - stroke attribute
thisFromAttribute - from-terminator attribute
thisToAttribute - to-terminator attribute
thisHiddenAttribute - hidden attribute
Returns:
style