yext.graphml.compat
Class DotnetGraphElementFactory

java.lang.Object
  extended byyext.graphml.reader.YGraphElementFactory
      extended byyext.graphml.compat.DotnetGraphElementFactory
All Implemented Interfaces:
AttributeConstants, AttributeFactory, GraphElementFactory

public class DotnetGraphElementFactory
extends YGraphElementFactory

Implementation of GraphElementProvider that also writes port elements for .NET graphml. The port elements are generated from the edges' source resp. target points. This class is meant to be used together with ReadEdgeLayoutHandler, ReadNodeLayoutHandler, ReadPortLayoutHandler


Nested Class Summary
 
Nested classes inherited from class yext.graphml.reader.YGraphElementFactory
YGraphElementFactory.AttributeData
 
Field Summary
 
Fields inherited from class yext.graphml.reader.YGraphElementFactory
attributeList, attributeMap, createdGraphList, graphImpl, graphList
 
Fields inherited from interface org.graphdrawing.graphml.reader.GraphElementFactory
EDGEDEFAULT_DIRECTED, EDGEDEFAULT_UNDIRECTED, HYPEREDGE_TYPE_INT, HYPEREDGE_TYPE_OUT, HYPEREDGE_TYPE_UNDIR
 
Fields inherited from interface org.graphdrawing.graphml.attr.AttributeConstants
TYPE_BOOLEAN, TYPE_COMPLEX, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_STRING
 
Constructor Summary
DotnetGraphElementFactory(Graph graph)
          Creates a new factory using a given graph instance to store the data.
 
Method Summary
 Object createEdge(GraphMLParseContext context, String id, Object source, Object target, Object sourceport, Object targetport, boolean directed)
          This method creates an edge on the graph, between nodes source and target.
 Object createGraph(GraphMLParseContext context, String id, int edgedefault)
          Creates the graph, should set up data with attributes.
 Object createNode(GraphMLParseContext context, String id)
          Creates a node on the passed graph, could be set up with attributes passed by.
 Object createPort(GraphMLParseContext context, Object owner, String name)
          Not implemented.
 YDimension getDefaultNodeSize()
           
 void setDefaultNodeSize(YDimension defaultNodeSize)
           
 
Methods inherited from class yext.graphml.reader.YGraphElementFactory
createAttribute, createEndPoint, createGraphML, createHyperEdge, defineAttribute, getGraphList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DotnetGraphElementFactory

public DotnetGraphElementFactory(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

createGraph

public Object createGraph(GraphMLParseContext context,
                          String id,
                          int edgedefault)
Description copied from class: YGraphElementFactory
Creates the graph, should set up data with attributes.

Specified by:
createGraph in interface GraphElementFactory
Overrides:
createGraph in class YGraphElementFactory
Returns:
java.lang.Object

createPort

public Object createPort(GraphMLParseContext context,
                         Object owner,
                         String name)
Description copied from class: YGraphElementFactory
Not implemented.

Specified by:
createPort in interface GraphElementFactory
Overrides:
createPort in class YGraphElementFactory
Returns:
null

createEdge

public Object createEdge(GraphMLParseContext context,
                         String id,
                         Object source,
                         Object target,
                         Object sourceport,
                         Object targetport,
                         boolean directed)
Description copied from class: YGraphElementFactory
This method creates an edge on the graph, between nodes source and target. Moreover the attributes are passed with the creation-request, so the application could set up all data, gaining from this parameter.

Specified by:
createEdge in interface GraphElementFactory
Overrides:
createEdge in class YGraphElementFactory

createNode

public Object createNode(GraphMLParseContext context,
                         String id)
Description copied from class: YGraphElementFactory
Creates a node on the passed graph, could be set up with attributes passed by.

Specified by:
createNode in interface GraphElementFactory
Overrides:
createNode in class YGraphElementFactory

getDefaultNodeSize

public YDimension getDefaultNodeSize()

setDefaultNodeSize

public void setDefaultNodeSize(YDimension defaultNodeSize)


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