com.yworks.yfiles.server.graphml.support
Class DotnetHierarchyGraphElementFactory

java.lang.Object
  extended bycom.yworks.yfiles.server.graphml.support.DotnetHierarchyGraphElementFactory
All Implemented Interfaces:
GraphElementFactory

public class DotnetHierarchyGraphElementFactory
extends java.lang.Object
implements GraphElementFactory

Dotnet-compatible graph element factory that can handle grouping.


Constructor Summary
DotnetHierarchyGraphElementFactory(Graph graph)
          Creates a new factory using a given graph instance to store the data.
 
Method Summary
 Edge createEdge(GraphMLParseContext context, Node sourceNode, Port sourcePort, Node targetNode, Port targetPort)
          Creates an edge for the given context and the provided source and target nodes or ports.
 Node createNode(GraphMLParseContext context)
          Creates a node for the given context and set grouping information if the node is found to be the child of a group node.
 Port createPort(GraphMLParseContext context, Node owner)
          Creates a port object that is owned by owner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DotnetHierarchyGraphElementFactory

public DotnetHierarchyGraphElementFactory(Graph graph)
Creates a new factory using a given graph instance to store the data.

Parameters:
graph - the data of the first graph in the input is stored here.
Method Detail

createEdge

public Edge createEdge(GraphMLParseContext context,
                       Node sourceNode,
                       Port sourcePort,
                       Node targetNode,
                       Port targetPort)
Creates an edge for the given context and the provided source and target nodes or ports.

Specified by:
createEdge in interface GraphElementFactory
Parameters:
context - The context from which the graph, the CreationProperties, and the GraphMLParseContext.getObjectStack() can be queried.
sourceNode - The source node for the edge.
sourcePort - The source port for the edge, if specified, otherwise null.
targetNode - The target node for the edge.
targetPort - The target port for the edge, if specified, otherwise null.
Returns:
A newly created edge.

createNode

public Node createNode(GraphMLParseContext context)
Creates a node for the given context and set grouping information if the node is found to be the child of a group node.

Specified by:
createNode in interface GraphElementFactory
Parameters:
context - The context from which the graph, the CreationProperties, and the GraphMLParseContext.getObjectStack() can be queried.
Returns:
A newly created node

createPort

public Port createPort(GraphMLParseContext context,
                       Node owner)
Creates a port object that is owned by owner.

Specified by:
createPort in interface GraphElementFactory
Parameters:
context - The parse context.
owner - The owner of the port object.
Returns:
A new port object at the center of the provided owner.


Copyright © 2000-2013 yWorks GmbH. All rights reserved