Search this API

y.io.graphml.output
Interface PortProvider

All Known Implementing Classes:
NodePortProvider

public interface PortProvider

Helper interface that allows to retrieve port objects for GraphML dialects that actually support port elements. If you want to use instances of this class, you have to provide them in Lookup.lookup(Class), otherwise, no port elements are written.

 

Method Summary
 java.util.Collection getPorts(Node node, GraphMLWriteContext context)
          Retrieve the port objects that belong to node.
 Port getSourcePort(Edge e, GraphMLWriteContext context)
          Retrieve the source port object for the given edge.
 Port getTargetPort(Edge e, GraphMLWriteContext context)
          Retrieve the target port object for the given edge.
 

Method Detail

getPorts

java.util.Collection getPorts(Node node,
                              GraphMLWriteContext context)
Retrieve the port objects that belong to node.

Parameters:
node - The node for which the ports are needed.
Returns:
A collection of Port objects.

getSourcePort

Port getSourcePort(Edge e,
                   GraphMLWriteContext context)
Retrieve the source port object for the given edge.

Parameters:
e - The edge to query.
Returns:
A port object representing the source port of e.

getTargetPort

Port getTargetPort(Edge e,
                   GraphMLWriteContext context)
Retrieve the target port object for the given edge.

Parameters:
e - The edge to query.
Returns:
A port object representing the target port of e.

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