com.yworks.yfiles.server.graphml.flexio.serializer
Class CollectionSerializer

java.lang.Object
  extended byy.io.graphml.output.AbstractSerializer
      extended byy.io.graphml.output.TypeBasedSerializer
          extended bycom.yworks.yfiles.server.graphml.flexio.serializer.AbstractSerializer
              extended bycom.yworks.yfiles.server.graphml.flexio.serializer.CollectionSerializer
All Implemented Interfaces:
java.util.EventListener, SerializationHandler

public class CollectionSerializer
extends AbstractSerializer

Serializer for Collection.


Constructor Summary
CollectionSerializer()
           
 
Method Summary
 java.lang.String getElementName(GraphMLWriteContext context)
          Returns 'Collection'.
static CollectionSerializer getInstance()
           
protected  java.lang.Class getSerializationType(GraphMLWriteContext context)
          Gets the type for which this instance should handle serialization.
 void serializeItem(java.lang.Object item, XmlWriter writer, GraphMLWriteContext context)
          Actually perform the serialization for the given arguments.
 
Methods inherited from class com.yworks.yfiles.server.graphml.flexio.serializer.AbstractSerializer
getNamespace, onHandleSerialization
 
Methods inherited from class y.io.graphml.output.TypeBasedSerializer
canHandle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionSerializer

public CollectionSerializer()
Method Detail

getInstance

public static CollectionSerializer getInstance()

getElementName

public java.lang.String getElementName(GraphMLWriteContext context)
Returns 'Collection'.

Specified by:
getElementName in class AbstractSerializer
Parameters:
context - The write context.
Returns:
'Collection'

getSerializationType

protected java.lang.Class getSerializationType(GraphMLWriteContext context)
Gets the type for which this instance should handle serialization.

Parameters:
context - The current write context.
Returns:
Collection.class.

serializeItem

public void serializeItem(java.lang.Object item,
                          XmlWriter writer,
                          GraphMLWriteContext context)
                   throws GraphMLWriteException
Actually perform the serialization for the given arguments.

This method is called from AbstractSerializer.onHandleSerialization(y.io.graphml.output.SerializationEvent) if TypeBasedSerializer.canHandle(y.io.graphml.output.SerializationEvent) returns true.

Parameters:
item - The item to serialize.
writer - The writer for the output.
context - The current write context.
Throws:
GraphMLWriteException


Copyright © 2000-2013 yWorks GmbH. All rights reserved