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

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.AbstractEdgeStyleDeserializer
All Implemented Interfaces:
DeserializationHandler, java.util.EventListener
Direct Known Subclasses:
PolylineEdgeStyleDeserializer

public abstract class AbstractEdgeStyleDeserializer
extends AbstractDeserializer

Abstract deserializer for edge styles that does implement deserializeNode(org.w3c.dom.Node, y.io.graphml.input.GraphMLParseContext) but delegates to deserializeStyle(y.io.graphml.input.GraphMLParseContext, org.w3c.dom.Node) and setArrow(com.yworks.yfiles.server.graphml.flexio.data.IEdgeStyle, com.yworks.yfiles.server.graphml.flexio.data.IArrow, boolean) that have to be implemented by subclasses.


Constructor Summary
AbstractEdgeStyleDeserializer()
           
 
Method Summary
 java.lang.Object deserializeNode(org.w3c.dom.Node xmlNode, GraphMLParseContext context)
           
protected abstract  IEdgeStyle deserializeStyle(GraphMLParseContext context, org.w3c.dom.Node xmlNode)
          Deserializes the inner edge style node not containing the arrows.
protected abstract  void setArrow(IEdgeStyle style, IArrow arrow, boolean atSource)
          Sets the source or target arrow of an edge style.
 
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

AbstractEdgeStyleDeserializer

public AbstractEdgeStyleDeserializer()
Method Detail

deserializeNode

public java.lang.Object deserializeNode(org.w3c.dom.Node xmlNode,
                                        GraphMLParseContext context)
                                 throws GraphMLParseException
Throws:
GraphMLParseException

setArrow

protected abstract void setArrow(IEdgeStyle style,
                                 IArrow arrow,
                                 boolean atSource)
Sets the source or target arrow of an edge style.

Parameters:
style - The edge style to set the arrow.
arrow - The arrow to set.
atSource - true if the source arrow shall be set, false to set the target arrow.

deserializeStyle

protected abstract IEdgeStyle deserializeStyle(GraphMLParseContext context,
                                               org.w3c.dom.Node xmlNode)
Deserializes the inner edge style node not containing the arrows.

Parameters:
context - The parse context.
xmlNode - The XML node to deserialize.
Returns:
The deserialized edge style.


Copyright © 2000-2013 yWorks GmbH. All rights reserved