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

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

public abstract class AbstractTemplateStyleDeserializer
extends AbstractDeserializer

Abstract base class for deserializers which handle TemplateStyle subclasses.

Subclasses have to override the methods createStyleInstance(String, String, String)


Constructor Summary
AbstractTemplateStyleDeserializer()
           
 
Method Summary
protected abstract  TemplateStyle createStyleInstance(java.lang.String templateClassName, java.lang.String contextPropertyName, java.lang.String dataPropertyName)
          This method is called to create the deserialized TemplateStyle.
 java.lang.Object deserializeNode(org.w3c.dom.Node xmlNode, GraphMLParseContext context)
          Deserializes the below element.
 
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

AbstractTemplateStyleDeserializer

public AbstractTemplateStyleDeserializer()
Method Detail

deserializeNode

public java.lang.Object deserializeNode(org.w3c.dom.Node xmlNode,
                                        GraphMLParseContext context)
                                 throws GraphMLParseException
Deserializes the below element.

The element name (here: TemplateStyle) is the String which is returned by AbstractDeserializer.getElementName(y.io.graphml.input.GraphMLParseContext). The style instance will be created in the method createStyleInstance(String, String, String).

 <y:TemplateStyle
 		templateClass=".."
 		(userTagProvider="..")
 		dataPropertyName=""
 		contextPropertyName=""
 		hideSelectionPaintable="">

  	(<y:TagProvider>
 			..
 		</y:TagProvider>)

 		<y:StyleTag>
 			..
 		</y:StyleTag>

 </y:TemplateStyle>
 

Parameters:
xmlNode - The XML node.
context - The parse context.
Returns:
The deserialized style instance.
Throws:
GraphMLParseException

createStyleInstance

protected abstract TemplateStyle createStyleInstance(java.lang.String templateClassName,
                                                     java.lang.String contextPropertyName,
                                                     java.lang.String dataPropertyName)
This method is called to create the deserialized TemplateStyle.

Parameters:
templateClassName - The name of the template class.
contextPropertyName - The name of the context property.
dataPropertyName - The name of the data property.
Returns:
A new instance of TemplateStyle.


Copyright © 2000-2013 yWorks GmbH. All rights reserved