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

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.ArrayDeserializer
All Implemented Interfaces:
DeserializationHandler, java.util.EventListener

public class ArrayDeserializer
extends AbstractDeserializer

A deserializer implementation that deserializes Array objects. The component class of the array is determined by the 'Type' attribute of the xml node whose value is supposed to have the format {symbolicNSPrefix}:{className}, e.g. arrTypePrefix:MyClass.

A namespace using this symbolic namespace prefix has to exist whose namespace uri can be mapped to the package name of the component class by use of the SymbolicPackageNameRegistry.

Each child element is tried to be deserialized via the context. The deserialized value (or null if no deserializer could be found) is added to the returned Array

. If a deserialized entry is no instance of the given component class type of the array, an IllegalArgumentException is thrown.

See Also:
SymbolicPackageNameRegistry

Constructor Summary
ArrayDeserializer()
           
 
Method Summary
 java.lang.Object deserializeNode(org.w3c.dom.Node xmlNode, GraphMLParseContext context)
           
 java.lang.String getElementName(GraphMLParseContext context)
          Returns 'Array'.
 java.lang.String getXmlNamespaceURI(GraphMLParseContext context)
          Returns Constants.YWORKS_EXT_ARRAY_NS_URI.
 
Methods inherited from class com.yworks.yfiles.server.graphml.flexio.deserializer.AbstractDeserializer
canHandle, onHandleDeserialization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayDeserializer

public ArrayDeserializer()
Method Detail

deserializeNode

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

getElementName

public java.lang.String getElementName(GraphMLParseContext context)
Returns 'Array'.

Specified by:
getElementName in class AbstractDeserializer
Parameters:
context - The parse context.
Returns:
'Array'.

getXmlNamespaceURI

public java.lang.String getXmlNamespaceURI(GraphMLParseContext context)
Returns Constants.YWORKS_EXT_ARRAY_NS_URI.

Overrides:
getXmlNamespaceURI in class AbstractDeserializer
Parameters:
context - The parse context.
Returns:
Constants.YWORKS_EXT_ARRAY_NS_URI.


Copyright © 2000-2013 yWorks GmbH. All rights reserved