com.yworks.yfiles.server.graphml.flexio
Class SharedDataOutputHandler

java.lang.Object
  extended byyext.graphml.writer.AbstractOutputHandler
      extended bycom.yworks.yfiles.server.graphml.flexio.SharedDataOutputHandler
All Implemented Interfaces:
OutputHandler, Precedence

public class SharedDataOutputHandler
extends AbstractOutputHandler
implements Precedence

Output handler that enables writing of shared references.

This input handler requires a non-null SerializerRegistry instance to be returned from the GraphMLParseContext.lookup(Class) of the write context.


Field Summary
 
Fields inherited from interface org.graphdrawing.graphml.reader.dom.Precedence
GRAPHML_PRECEDENCE
 
Constructor Summary
SharedDataOutputHandler(Object nodeStyleDpKey, Object edgeStyleDpKey, Object edgeLabelsDpKey, Object nodeLabelsDpKey)
          Create a new output handler for writing shared data.
 
Method Summary
 void addSharedInstance(Object instance)
          Add a shared instance.
 int getPrecedence()
           
 ISerializer getSerializer()
          Returns a serializer that writes xml elements which reference shared instances.
 void printDataOutput(GraphMLWriteContext context, Graph graph, Object nodeedge, XmlWriter ips)
           
 void printKeyAttributes(GraphMLWriteContext context, XmlWriter writer)
           
 void printKeyOutput(GraphMLWriteContext context, XmlWriter writer)
           
 void setCommitLabelLayouts(boolean commitLabelLayouts)
           
 
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

SharedDataOutputHandler

public SharedDataOutputHandler(Object nodeStyleDpKey,
                               Object edgeStyleDpKey,
                               Object edgeLabelsDpKey,
                               Object nodeLabelsDpKey)
Create a new output handler for writing shared data.

Parameters:
nodeStyleDpKey - The key for the data provider that stores node styles.
edgeStyleDpKey - The key for the data provider that stores edge styles.
edgeLabelsDpKey - The key for the data provider that stores lists of edge labels.
nodeLabelsDpKey - The key for the data provider that stores lists of node labels.
Method Detail

setCommitLabelLayouts

public void setCommitLabelLayouts(boolean commitLabelLayouts)

addSharedInstance

public void addSharedInstance(Object instance)
Add a shared instance.


printDataOutput

public void printDataOutput(GraphMLWriteContext context,
                            Graph graph,
                            Object nodeedge,
                            XmlWriter ips)

getSerializer

public ISerializer getSerializer()
Returns a serializer that writes xml elements which reference shared instances.


getPrecedence

public int getPrecedence()
Specified by:
getPrecedence in interface Precedence

printKeyAttributes

public void printKeyAttributes(GraphMLWriteContext context,
                               XmlWriter writer)
Specified by:
printKeyAttributes in interface OutputHandler

printKeyOutput

public void printKeyOutput(GraphMLWriteContext context,
                           XmlWriter writer)
Specified by:
printKeyOutput in interface OutputHandler


Copyright © 2000-2007 yWorks GmbH. All rights reserved