com.yworks.yfiles.server.graphml.flexio
Interface ReferenceResolver

All Known Implementing Classes:
DefaultReferenceResolver

public interface ReferenceResolver

Interface for classes that can resolve external or internal references.


Method Summary
 void addReferenceElement(java.lang.String id, org.w3c.dom.Node element)
          Add a reference node for the given refid.
 java.lang.Object resolveReference(GraphMLParseContext context, java.lang.String refid, DeserializationHandler deserializer)
          Resolve an xml node to an object instance.
 

Method Detail

addReferenceElement

public void addReferenceElement(java.lang.String id,
                                org.w3c.dom.Node element)
Add a reference node for the given refid.

Parameters:
id - The reference id
element - DOM node that is referenced by the id.

resolveReference

public java.lang.Object resolveReference(GraphMLParseContext context,
                                         java.lang.String refid,
                                         DeserializationHandler deserializer)
                                  throws GraphMLParseException
Resolve an xml node to an object instance.

This method returns shared instances for nodes with the same refid.

Parameters:
context - The current parse context.
refid - The refid which should be resolved. Must not be null.
deserializer - Deserializer which should be used for deserialization of the shared element. Can be null when not called from a deserializer instance, in which case the resolver tries to find a matching deserializer itself.
Returns:
the referenced object
Throws:
GraphMLParseException


Copyright © 2000-2013 yWorks GmbH. All rights reserved