org.graphdrawing.graphml.writer
Interface IdProvider


public interface IdProvider

Interface that allows to control the id attribute value of core GraphML elements.

Note: Implementations must ensure that ids are unique for each element domain, since the framework makes no attempt to recognize duplicate id values itself.


Method Summary
 String getEdgeId(Object o, GraphMLWriteContext context)
          Get an ID for the specified edge object
 String getGraphId(Object o, GraphMLWriteContext context)
          Get an ID for the specified graph object
 String getHyperedgeId(Object o, GraphMLWriteContext context)
          Get an ID for the specified hyperedge object
 String getNodeId(Object o, GraphMLWriteContext context)
          Get an ID for the specified node object
 String getPortId(Object port, Object owner, GraphMLWriteContext context)
          Get an ID for the specified port object
 

Method Detail

getGraphId

public String getGraphId(Object o,
                         GraphMLWriteContext context)
Get an ID for the specified graph object

Parameters:
o - the current graph object
context - the current write context, for further information to the provider
Returns:
an ID for the specified graph object

getNodeId

public String getNodeId(Object o,
                        GraphMLWriteContext context)
Get an ID for the specified node object

Parameters:
o - the current node object
context - the current write context, for further information to the provider
Returns:
an ID for the specified node object

getEdgeId

public String getEdgeId(Object o,
                        GraphMLWriteContext context)
Get an ID for the specified edge object

Parameters:
o - the current edge object
context - the current write context, for further information to the provider
Returns:
an ID for the specified edge object

getPortId

public String getPortId(Object port,
                        Object owner,
                        GraphMLWriteContext context)
Get an ID for the specified port object

Parameters:
port - the current port object
owner - the owner of the port
context - the current write context, for further information to the provider
Returns:
an ID for the specified port object

getHyperedgeId

public String getHyperedgeId(Object o,
                             GraphMLWriteContext context)
Get an ID for the specified hyperedge object

Parameters:
o - the current hyperedge object
context - the current write context, for further information to the provider
Returns:
an ID for the specified hyperedge object


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