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

java.lang.Object
  extended byy.io.graphml.output.AbstractSerializer
      extended byy.io.graphml.output.TypeBasedSerializer
          extended bycom.yworks.yfiles.server.graphml.flexio.serializer.AbstractSerializer
All Implemented Interfaces:
java.util.EventListener, SerializationHandler
Direct Known Subclasses:
AbstractEdgeStyleSerializer, AbstractTemplateStyleSerializer, ArrowSerializer, BevelNodeStyleSerializer, BitmapNodeStyleSerializer, CollectionSerializer, ComponentNodeStyleSerializer, DelegatingStyleSerializer, ExteriorLabelModelParameterSerializer, FillSerializer, FontSerializer, FreeEdgeLabelModelParameterSerializer, FreeNodeLabelModel_NodeCenterAnchoredParameterSerializer, FreeNodeLabelModel_NodeLayoutAnchoredParameterSerializer, FreeNodeLabelModel_NodeRatioAnchoredParameterSerializer, GeneralPathNodeStyleSerializer, GeneralPathSerializer, GenericLabelModelParameterSerializer, IconLabelStyleDecoratorSerializer, ImageIconSerializer, ImageNodeStyleSerializer, ImageSerializer, InteriorLabelModelParameterSerializer, InteriorStretchLabelModelParameterSerializer, NodeStyleLabelStyleAdapterSerializer, ObjectSerializer, PanelNodeStyleSerializer, PortSerializer, RotatingEdgeLabelModelParameterSerializer, ShapeNodeStyleSerializer, SimpleLabelStyleSerializer, SimplePortStyleSerializer, SliderEdgeLabelModelParameterSerializer, StrokeSerializer, TagOwnerUserTagProviderSerializer, TextLayoutFormatSerializer

public abstract class AbstractSerializer
extends TypeBasedSerializer

Abstract subclass of TypeBasedSerializer that writes the element tags for its subclasses and delegates to AbstractSerializer.serializeItem(Object, y.io.graphml.output.XmlWriter, y.io.graphml.output.GraphMLWriteContext) for the core serialization.


Constructor Summary
AbstractSerializer()
           
 
Method Summary
abstract  java.lang.String getElementName(GraphMLWriteContext context)
          The local name of the serialized element node.
 java.lang.String getNamespace(GraphMLWriteContext context)
          The namespace of the serialized element node.
 void onHandleSerialization(SerializationEvent event)
          This implementation checks if TypeBasedSerializer.canHandle(y.io.graphml.output.SerializationEvent) returns true for the supplied event argument, in which case it: writes the outer xml element with name getElementName(y.io.graphml.output.GraphMLWriteContext) and namespace getNamespace(y.io.graphml.output.GraphMLWriteContext), calls AbstractSerializer.serializeItem(Object, y.io.graphml.output.XmlWriter , y.io.graphml.output.GraphMLWriteContext), and sets SerializationEvent.setHandled(boolean) to true.
 
Methods inherited from class y.io.graphml.output.TypeBasedSerializer
canHandle, getSerializationType
 
Methods inherited from class y.io.graphml.output.AbstractSerializer
serializeItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSerializer

public AbstractSerializer()
Method Detail

onHandleSerialization

public void onHandleSerialization(SerializationEvent event)
                           throws GraphMLWriteException
This implementation checks if TypeBasedSerializer.canHandle(y.io.graphml.output.SerializationEvent) returns true for the supplied event argument, in which case it:
If TypeBasedSerializer.canHandle(y.io.graphml.output.SerializationEvent) returns false, no action is performed.

Parameters:
event - The event to handle
Throws:
GraphMLWriteException - if something went wrong in the serialization process.

getElementName

public abstract java.lang.String getElementName(GraphMLWriteContext context)
The local name of the serialized element node.

Parameters:
context - The write context.
Returns:
The local name of the serialized element node.

getNamespace

public java.lang.String getNamespace(GraphMLWriteContext context)
The namespace of the serialized element node.

Parameters:
context - The write context.
Returns:
y.io.graphml.NamespaceConstants.YFILES_JAVA_NS


Copyright © 2000-2013 yWorks GmbH. All rights reserved