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

java.lang.Object
  extended byy.io.graphml.input.AbstractDeserializer
      extended bycom.yworks.yfiles.server.graphml.flexio.deserializer.AbstractDeserializer
          extended bycom.yworks.yfiles.server.graphml.flexio.deserializer.DelegatingStyleDeserializer
All Implemented Interfaces:
DeserializationHandler, java.util.EventListener

public abstract class DelegatingStyleDeserializer
extends AbstractDeserializer

An abstract deserializer which facilitates the creation of deserializers for DelegatingStyle instances.


Constructor Summary
DelegatingStyleDeserializer()
           
 
Method Summary
 java.lang.Object deserializeNode(org.w3c.dom.Node xmlNode, GraphMLParseContext context)
          This method does the actual work of deserializing the content of an xml node to a new instance.
abstract  java.lang.Object deserializeStyle(GraphMLParseContext context, org.w3c.dom.Node element, java.lang.Object wrapped)
          Creates the style instance and deserializes the style's properties.
 
Methods inherited from class com.yworks.yfiles.server.graphml.flexio.deserializer.AbstractDeserializer
canHandle, getElementName, getXmlNamespaceURI, onHandleDeserialization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingStyleDeserializer

public DelegatingStyleDeserializer()
Method Detail

deserializeNode

public java.lang.Object deserializeNode(org.w3c.dom.Node xmlNode,
                                        GraphMLParseContext context)
                                 throws GraphMLParseException
This method does the actual work of deserializing the content of an xml node to a new instance.

This implementation deserializes the <Wrapped> element, then delegates to deserializeStyle(y.io.graphml.input.GraphMLParseContext, org.w3c.dom.Node, Object) to create an instance of the style to deserialize.

Parameters:
xmlNode - The xml node to be deserialized
context - The current parse context
Returns:
The deserialized instance.
Throws:
GraphMLParseException

deserializeStyle

public abstract java.lang.Object deserializeStyle(GraphMLParseContext context,
                                                  org.w3c.dom.Node element,
                                                  java.lang.Object wrapped)
Creates the style instance and deserializes the style's properties.

Subclasses have to implement this method to return an instance of the style which is deserialized.

Parameters:
context - The parse context.
element - The XML element to deserialize.
wrapped - The style to wrap in the deserialized DelegatingStyle instance.
Returns:
The deserialized style.


Copyright © 2000-2013 yWorks GmbH. All rights reserved