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 java.lang.Object
implements GraphElementIdProvider

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

 
Your browser does not support SVG content.

Constructor Summary
DefaultGraphElementIdProvider()
           
 
Method Summary
 java.lang.String getEdgeId(Edge o, GraphMLWriteContext context)
          Get an ID for the specified edge Object
 java.lang.String getGraphId(Graph o, GraphMLWriteContext context)
          Get an ID for the specified graph Object
 java.lang.String getNodeId(Node o, GraphMLWriteContext context)
          Get an ID for the specified node Object
 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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-2022,
yWorks GmbH.
All rights reserved.