yext.graphml.graph2D
Class PortConstraintOutputHandler

java.lang.Object
  extended byyext.graphml.writer.AbstractOutputHandler
      extended byyext.graphml.graph2D.PortConstraintOutputHandler
All Implemented Interfaces:
OutputHandler

public class PortConstraintOutputHandler
extends AbstractOutputHandler

Output handler responsible for writing PortConstraint data. Port contraint data includes source and target port constraints, as well as source group and target group IDs. Port constraint data must be provided by data providers that are registered with the graph using the following standard look-up keys for port contraints:


Constructor Summary
PortConstraintOutputHandler()
           
 
Method Summary
static ObjectStringConverter getEdgeGroupIDConverter(ObjectStringConverter c)
          Returns the converter that is responsible for converting the source or target group ID to a string representation.
 void printDataOutput(GraphMLWriteContext context, Graph graph, Object nodeedge, XmlWriter writer)
          Writes the data out.
 void printKeyAttributes(GraphMLWriteContext context, XmlWriter writer)
          Returns yfiles.type="portconstraints"
 void printKeyOutput(GraphMLWriteContext context, XmlWriter ips)
          Write the element content of the key tag for this graphml attribute
static void setEdgeGroupIDConverter(ObjectStringConverter c)
          Sets the converter that is responsible for converting the source or target group ID to a string representation.
 
Methods inherited from class yext.graphml.writer.AbstractOutputHandler
getKeyAttributes, printDataAttributes, printDataOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortConstraintOutputHandler

public PortConstraintOutputHandler()
Method Detail

setEdgeGroupIDConverter

public static void setEdgeGroupIDConverter(ObjectStringConverter c)
Sets the converter that is responsible for converting the source or target group ID to a string representation. If no converter is set, the default string conversion toString() of the ID object will be used.


getEdgeGroupIDConverter

public static ObjectStringConverter getEdgeGroupIDConverter(ObjectStringConverter c)
Returns the converter that is responsible for converting the source or target group ID to a string representation. If no converter is set, the default string conversion toString() of the ID object will be used.


printKeyAttributes

public void printKeyAttributes(GraphMLWriteContext context,
                               XmlWriter writer)
Returns yfiles.type="portconstraints"

Parameters:
context - the current write context
writer - XMLWriter instance that writes the result

printDataOutput

public void printDataOutput(GraphMLWriteContext context,
                            Graph graph,
                            Object nodeedge,
                            XmlWriter writer)
Description copied from class: AbstractOutputHandler
Writes the data out.

Specified by:
printDataOutput in class AbstractOutputHandler
Parameters:
context - the current writeContext.
graph - the current graph in the context.
nodeedge - the current node/edge in the context.
writer - the output-stream.

printKeyOutput

public void printKeyOutput(GraphMLWriteContext context,
                           XmlWriter ips)
Description copied from interface: OutputHandler
Write the element content of the key tag for this graphml attribute

Parameters:
context - the current write context
ips - XMLWriter instance that writes the result


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