Search this API

y.io.graphml.output
Class DefaultGraphElementIdProvider

java.lang.Object
  extended by y.io.graphml.output.DefaultGraphElementIdProvider
All Implemented Interfaces:
GraphElementIdProvider

public class DefaultGraphElementIdProvider
extends Object
implements GraphElementIdProvider

Default implementation of GraphElementIdProvider that provides canonical ids for graphml elements.


Constructor Summary
DefaultGraphElementIdProvider()
           
 
Method Summary
 String getEdgeId(Edge o, GraphMLWriteContext context)
          Get an ID for the specified edge Object
 String getGraphId(Graph o, GraphMLWriteContext context)
          Get an ID for the specified graph Object
 String getNodeId(Node o, GraphMLWriteContext context)
          Get an ID for the specified node Object
 String getPortId(Port port, Node owner, GraphMLWriteContext context)
          Get an ID for the specified port Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGraphElementIdProvider

public DefaultGraphElementIdProvider()
Method Detail

getGraphId

public String getGraphId(Graph o,
                         GraphMLWriteContext context)
Description copied from interface: GraphElementIdProvider
Get an ID for the specified graph Object

Specified by:
getGraphId in interface GraphElementIdProvider
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(Node o,
                        GraphMLWriteContext context)
Description copied from interface: GraphElementIdProvider
Get an ID for the specified node Object

Specified by:
getNodeId in interface GraphElementIdProvider
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(Edge o,
                        GraphMLWriteContext context)
Description copied from interface: GraphElementIdProvider
Get an ID for the specified edge Object

Specified by:
getEdgeId in interface GraphElementIdProvider
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(Port port,
                        Node owner,
                        GraphMLWriteContext context)
Description copied from interface: GraphElementIdProvider
Get an ID for the specified port Object

Specified by:
getPortId in interface GraphElementIdProvider
Parameters:
port - the current port Object
owner - the node that owns the current port
context - the current write context, for further information to the provider
Returns:
an ID for the specified port Object

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