org.graphdrawing.graphml.writer
Interface GraphElementProvider

All Known Implementing Classes:
YGraphElementProvider

public interface GraphElementProvider

Provide generic access to the objects in a graph structure


Method Summary
 int getEdgeCount()
          The number of edges in the graph.
 Iterator getEdgeObjects()
          Return an iterator over all edges that are contained in the current graph object
 Iterator getEndpointObjects(Object hyperedge)
          Return an iterator over all endpoints that belong to the given hyperedge
 Object getGraphObject()
          The enclosing graph.
 int getHyperEdgeCount()
          The number of hyperedges in the graph.
 Iterator getHyperEdgeObjects()
          Return an iterator over all hyperedges that are contained in the current graph object
 int getNodeCount()
          The number of nodes in the graph.
 Iterator getNodeObjects()
          Return an iterator over all nodes that are contained in the current graph object
 GraphElementProvider getNodeSubgraph(Object node)
          Returns the subgraph which might be defined under a node.
 Iterator getPortObjects(Object node)
          Return an iterator over all ports that belong to the given node
 Object getSourceNode(Object edge)
          Returns the source node of an edge.
 Object getSourcePort(Object edge)
          Returns the source port of an edge.
 Object getTargetNode(Object edge)
          Returns the target node of an edge.
 Object getTargetPort(Object edge)
          Returns the target port of an edge.
 boolean isDefaultDirected()
          Returns whether the default direction of edges in the graph is directed.
 boolean isDirected(Object edge)
          Returns whether an edge is directed.
 

Method Detail

isDefaultDirected

public boolean isDefaultDirected()
Returns whether the default direction of edges in the graph is directed.

Returns:
true iff edges are directed by default

getNodeCount

public int getNodeCount()
The number of nodes in the graph.

Returns:
the number of nodes in the graph.

getEdgeCount

public int getEdgeCount()
The number of edges in the graph.

Returns:
the number of edges in the graph.

getHyperEdgeCount

public int getHyperEdgeCount()
The number of hyperedges in the graph.

Returns:
the number of hyperedges in the graph.

getGraphObject

public Object getGraphObject()
The enclosing graph.

Returns:
the current graph object

getNodeObjects

public Iterator getNodeObjects()
Return an iterator over all nodes that are contained in the current graph object

Returns:
an iterator over all nodes that are contained in the current graph object

getEdgeObjects

public Iterator getEdgeObjects()
Return an iterator over all edges that are contained in the current graph object

Returns:
an iterator over all edges that are contained in the current graph object

getNodeSubgraph

public GraphElementProvider getNodeSubgraph(Object node)
Returns the subgraph which might be defined under a node.

Returns:
the subgraph defined by a node, or null if no such subgraph exists.

getSourceNode

public Object getSourceNode(Object edge)
Returns the source node of an edge.

Returns:
the source node of an edge

getTargetNode

public Object getTargetNode(Object edge)
Returns the target node of an edge.

Returns:
the target node of an edge

getSourcePort

public Object getSourcePort(Object edge)
Returns the source port of an edge.

Returns:
the source port of an edge

getTargetPort

public Object getTargetPort(Object edge)
Returns the target port of an edge.

Returns:
the target port of an edge

isDirected

public boolean isDirected(Object edge)
Returns whether an edge is directed.

Returns:
true iff the edge is directed

getEndpointObjects

public Iterator getEndpointObjects(Object hyperedge)
Return an iterator over all endpoints that belong to the given hyperedge

Returns:
an iterator over all endpoints that belong to the given hyperedge

getHyperEdgeObjects

public Iterator getHyperEdgeObjects()
Return an iterator over all hyperedges that are contained in the current graph object

Returns:
an iterator over all hyperedges that are contained in the current graph object

getPortObjects

public Iterator getPortObjects(Object node)
Return an iterator over all ports that belong to the given node

Returns:
an iterator over all ports that belong to the given node


Copyright ©2000-2009, yWorks GmbH. All rights reserved.