Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.graph
Interface IGraph  view IGraph download IGraph.java

All Superinterfaces:
com.port80.util.attr.IAttrTable, IGraphElement

public interface IGraph
extends IGraphElement

Graph interface. . Each Graph have a name, a set of vertex (and thus a set of edges that come with it) and graph, and an attribute table. Each graph also have an associated vertex and edge factory. The default vertex factory would only allow vertex with unique names. The default edge factory is DefaultEdgeFactory which allow any kind of edges. . Graph is a container of GraphElement including Graph instances themselves. A graph can be viewed in two perspectives. Vertex and Edge are connected in a flat heirarchy. However, the graph can also be viewed as a tree of graphs each containing a set of vertices. . Attribute registry The edge class has an associated registry to register the valid attribute names for the class. Clients that invent their own attributes should register the attribute name with the class and check for conflicts during initialization. . No checking for valid attribute name is done when accessing the attribute table. HISTORY v1.1 2002-03-07 . Adding subgraph support.


Method Summary
 void addAllVertex(java.util.Collection c)
           
 void addVertex(IVertex v)
           
 java.util.Set allEdges()
           
 java.util.Set allVertexNameSet()
          Vertices including those in subgraph.
 java.util.Set allVertices()
           
 boolean canDelete(IEdge e)
           
 void clearLayout()
           
 boolean containsGraph(IGraph g)
           
 boolean containsVertex(IVertex v)
           
 boolean containsVertex(java.lang.String name)
           
 java.util.Set findEdgesWithAttr(java.lang.String attrname)
           
 java.util.Set findVerticesWithAttr(java.lang.String attrname)
           
 com.port80.util.attr.IAttrTable getEdgeAttrTable()
           
 IEdgeFactory getEdgeFactory()
           
 java.util.Set getEdgeSet()
          Edges in this graph, not including those in subgraph.
 IGraph getGraph(IGraph g)
           
 java.lang.String getGraphTypeName()
           
 IGraph getParent()
           
 java.util.List getSubGraphs()
           
 IVertex getVertex(IVertex v)
           
 IVertex getVertex(java.lang.String name)
           
 com.port80.util.attr.IAttrTable getVertexAttrTable()
           
 IVertexFactory getVertexFactory()
           
 java.util.Set getVertexNameSet()
          Vertices name/vertices in this graph, not including those in subgraph.
 java.util.Set getVertexSet()
           
 boolean isCluster()
           
 boolean isValid(IVertex head, IVertex tail)
           
 IEdge newEdge(IVertex tail, IVertex head, java.lang.String name, java.lang.Object data)
           
 IGraph newGraph(java.lang.String name, java.lang.Object data)
           
 IVertex newVertex(java.lang.String name, java.lang.Object data)
           
 IVertex newVertex(java.lang.String name, java.lang.String port, java.lang.Object data)
           
 boolean removeEdge(IEdge e)
           
 IVertex removeVertex(IVertex v)
           
 IVertex removeVertex(java.lang.String name)
          Remove vertex from this graph, not include vertex in subgraph .
 boolean saveImage(java.lang.String filename, float scale)
           
 int size()
           
 java.lang.String sprintGraph()
           
 
Methods inherited from interface com.port80.graph.IGraphElement
getData, getElementTypeName, getName, setData, setName
 
Methods inherited from interface com.port80.util.attr.IAttrTable
attrKeySet, clearAttrs, getAttr, getAttrAsString, getAttrBool, getAttrBool, getAttrCached, getAttrDouble, getAttrDouble, getAttrFloat, getAttrFloat, getAttrInt, getAttrInt, getAttrLong, getAttrLong, getAttrRegistry, getAttrString, hasAttr, removeAttr, removeUnregisteredAttrs, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttrFromString
 

Method Detail

getVertexFactory

public IVertexFactory getVertexFactory()

getEdgeFactory

public IEdgeFactory getEdgeFactory()

getVertexAttrTable

public com.port80.util.attr.IAttrTable getVertexAttrTable()

getEdgeAttrTable

public com.port80.util.attr.IAttrTable getEdgeAttrTable()

isCluster

public boolean isCluster()

newGraph

public IGraph newGraph(java.lang.String name,
                       java.lang.Object data)

newVertex

public IVertex newVertex(java.lang.String name,
                         java.lang.Object data)
                  throws GraphException

newVertex

public IVertex newVertex(java.lang.String name,
                         java.lang.String port,
                         java.lang.Object data)
                  throws GraphException

newEdge

public IEdge newEdge(IVertex tail,
                     IVertex head,
                     java.lang.String name,
                     java.lang.Object data)
              throws GraphException

addVertex

public void addVertex(IVertex v)
               throws GraphException

addAllVertex

public void addAllVertex(java.util.Collection c)
                  throws GraphException

removeVertex

public IVertex removeVertex(java.lang.String name)
Remove vertex from this graph, not include vertex in subgraph .


removeVertex

public IVertex removeVertex(IVertex v)

removeEdge

public boolean removeEdge(IEdge e)

isValid

public boolean isValid(IVertex head,
                       IVertex tail)

canDelete

public boolean canDelete(IEdge e)

getGraphTypeName

public java.lang.String getGraphTypeName()

getParent

public IGraph getParent()

containsVertex

public boolean containsVertex(java.lang.String name)

containsVertex

public boolean containsVertex(IVertex v)

getVertex

public IVertex getVertex(java.lang.String name)

getVertex

public IVertex getVertex(IVertex v)

getVertexNameSet

public java.util.Set getVertexNameSet()
Vertices name/vertices in this graph, not including those in subgraph.


getVertexSet

public java.util.Set getVertexSet()

getEdgeSet

public java.util.Set getEdgeSet()
Edges in this graph, not including those in subgraph.


allVertexNameSet

public java.util.Set allVertexNameSet()
Vertices including those in subgraph.


allVertices

public java.util.Set allVertices()

allEdges

public java.util.Set allEdges()

size

public int size()

clearLayout

public void clearLayout()

getSubGraphs

public java.util.List getSubGraphs()

getGraph

public IGraph getGraph(IGraph g)

containsGraph

public boolean containsGraph(IGraph g)

findVerticesWithAttr

public java.util.Set findVerticesWithAttr(java.lang.String attrname)

findEdgesWithAttr

public java.util.Set findEdgesWithAttr(java.lang.String attrname)

sprintGraph

public java.lang.String sprintGraph()

saveImage

public boolean saveImage(java.lang.String filename,
                         float scale)