Packagecom.yworks.io.graphml.reader.deserializer
Classpublic class AbstractTemplateStyleDeserializer
InheritanceAbstractTemplateStyleDeserializer Inheritance AbstractDeserializer Inheritance Object
Subclasses TemplateLabelStyleDeserializer, TemplateNodeStyleDeserializer

Abstract base class for deserializers which handle ITemplateStyle implementors. Subclasses have to override the methods createStyleInstance and get elementName.



Public Properties
 PropertyDefined By
 InheritedelementName : String
[read-only] The local tag name that this Deserializer can claim to handle
AbstractDeserializer
  xmlNamespace : Namespace
[override] [read-only] The XmlNamespace that this Deserializer can claim to handle.
AbstractTemplateStyleDeserializer
Public Methods
 MethodDefined By
 Inherited
canHandle(context:GraphMLParseContext, element:XML):Boolean
Returns whether a deserializer can handle a specific xml element.
AbstractDeserializer
  
deserialize(context:GraphMLParseContext, element:XML):Object
[override] Deserializes the below element.
AbstractTemplateStyleDeserializer
Protected Methods
 MethodDefined By
  
createStyleInstance(templateClass:Class, contextPropertyName:String, dataPropertyName:String):TemplateStyle
AbstractTemplateStyleDeserializer
Property Detail
xmlNamespaceproperty
xmlNamespace:Namespace  [read-only] [override]

The XmlNamespace that this Deserializer can claim to handle.

This method needs to be overridden by subclass implementations.


Implementation
    public function get xmlNamespace():Namespace
Method Detail
createStyleInstance()method
protected function createStyleInstance(templateClass:Class, contextPropertyName:String, dataPropertyName:String):TemplateStyle

Parameters

templateClass:Class
 
contextPropertyName:String
 
dataPropertyName:String

Returns
TemplateStyle
deserialize()method 
override public function deserialize(context:GraphMLParseContext, element:XML):Object

Deserializes the below element. The element name (here: TemplateStyle) is the String which is returned from the elementName property. The actual style instance will be created in the method createStyleInstance

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

Parameters

context:GraphMLParseContext — The parse context.
 
element:XML — The XML node.

Returns
Object — The deserialized style instance.

Throws
ParseError — if the templateClass or the userTagProvider class cannot be created.