com.yworks.yfiles.server.graphml.flexio.deserializer
Class AbstractDeserializer

java.lang.Object
  extended byy.io.graphml.input.AbstractDeserializer
      extended bycom.yworks.yfiles.server.graphml.flexio.deserializer.AbstractDeserializer
All Implemented Interfaces:
DeserializationHandler, java.util.EventListener
Direct Known Subclasses:
AbstractEdgeStyleDeserializer, AbstractTemplateStyleDeserializer, ArrayDeserializer, ArrowDeserializer, BevelNodeStyleDeserializer, BitmapNodeStyleDeserializer, ComponentNodeStyleDeserializer, DelegatingStyleDeserializer, DummySimplePortStyleDeserializer, ExteriorLabelModelParameterDeserializer, FillDeserializer, FontDeserializer, FreeEdgeLabelModelParameterDeserializer, FreeNodeLabelModelParameterDeserializer, GeneralPathDeserializer, GeneralPathNodeStyleDeserializer, GenericLabelModelParameterDeserializer, IconLabelStyleDecoratorDeserializer, IconLabelStyleDeserializer, ImageDeserializer, ImageIconDeserializer, ImageNodeStyleDeserializer, InteriorLabelModelParameterDeserializer, InteriorStretchLabelModelParameterDeserializer, LabelDeserializer, NodeStyleLabelStyleAdapterDeserializer, ObjectDeserializer, PanelNodeStyleDeserializer, PortDeserializer, RotatingEdgeLabelModelParameterDeserializer, ShapeNodeStyleDeserializer, SimpleLabelStyleDeserializer, SimplePortStyleDeserializer, SliderEdgeLabelModelParameterDeserializer, SliderEdgeLabelModelParameterDeserializer.ModelDeserializer, StrokeDeserializer, TagOwnerUserTagProviderDeserializer, TextLayoutFormatDeserializer

public abstract class AbstractDeserializer
extends AbstractDeserializer

Abstract subclass of AbstractDeserializer that provides support for shared references.


Constructor Summary
AbstractDeserializer()
           
 
Method Summary
 boolean canHandle(DeserializationEvent e)
          Returns true if DeserializationEvent.getXmlNode() satisfies the properties of this class.
abstract  java.lang.String getElementName(GraphMLParseContext context)
          The local name that the node must satisfy if it should be deserialized.
 java.lang.String getXmlNamespaceURI(GraphMLParseContext context)
          The namespace URI that the node must satisfy if it should be deserialized.
 void onHandleDeserialization(DeserializationEvent event)
          Listen to a serialization event.
 
Methods inherited from class y.io.graphml.input.AbstractDeserializer
deserializeNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDeserializer

public AbstractDeserializer()
Method Detail

canHandle

public boolean canHandle(DeserializationEvent e)
Returns true if DeserializationEvent.getXmlNode() satisfies the properties of this class.

Parameters:
e - The event data.
Returns:
true iff the node should be parsed.
See Also:
getElementName(y.io.graphml.input.GraphMLParseContext)

onHandleDeserialization

public void onHandleDeserialization(DeserializationEvent event)
                             throws GraphMLParseException
Listen to a serialization event.

This implementation checks if canHandle(y.io.graphml.input.DeserializationEvent) returns true for the supplied event argument, in which case it calls AbstractDeserializer.deserializeNode(org.w3c.dom.Node , y.io.graphml.input.GraphMLParseContext) and sets DeserializationEvent.setResult(java.lang.Object).
If canHandle(y.io.graphml.input.DeserializationEvent) returns false, no action is performed.

Implementation of that handles shared references.

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

getElementName

public abstract java.lang.String getElementName(GraphMLParseContext context)
The local name that the node must satisfy if it should be deserialized. This method is called by canHandle(y.io.graphml.input.DeserializationEvent).

Parameters:
context - The parse context.
Returns:
The local name that the node must satisfy if it should be deserialized.

getXmlNamespaceURI

public java.lang.String getXmlNamespaceURI(GraphMLParseContext context)
The namespace URI that the node must satisfy if it should be deserialized.

Returns:
NamespaceConstants.YFILES_JAVA_NS


Copyright © 2000-2013 yWorks GmbH. All rights reserved