fbench.graph.model
Class GraphModel

java.lang.Object
  extended by fbench.dom.ElementModel
      extended by fbench.graph.model.GraphModel
Direct Known Subclasses:
Algorithm, ECC, FBNetwork, FBType, Resource, ServiceSequence, System

public abstract class GraphModel
extends ElementModel

An ElementModel for a GraphView.

Version:
20051028/JHC - Set default value for canAccept()., 20050825/JHC
Author:
JHC

Constructor Summary
GraphModel()
           
GraphModel(org.w3c.dom.Element el)
           
 
Method Summary
 boolean canAccept(java.lang.String filename)
          Returns true if the graph represented by this model can accept a new LibraryElement stored with the given file name.
static GraphModel forElement(org.w3c.dom.Element el)
          Returns a GraphModel encapsulating the given DOM Element, or null if no such GraphModel exists.
 java.util.Vector getGraph()
          Returns a Vector of GraphElements (if any) to be used for drawing the graph of the contained Element.
 
Methods inherited from class fbench.dom.ElementModel
equals, forElement, getComment, getElement, getName, getType, isDigit, isLetter, isName, setElement, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphModel

public GraphModel()

GraphModel

public GraphModel(org.w3c.dom.Element el)
Method Detail

forElement

public static GraphModel forElement(org.w3c.dom.Element el)
Returns a GraphModel encapsulating the given DOM Element, or null if no such GraphModel exists.


getGraph

public java.util.Vector getGraph()
Returns a Vector of GraphElements (if any) to be used for drawing the graph of the contained Element. Default is the GraphElements (if any) corresponding to the children of the contained Element.


canAccept

public boolean canAccept(java.lang.String filename)
Returns true if the graph represented by this model can accept a new LibraryElement stored with the given file name. This is typically done by checking the file suffix. The default value is false .