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

All Known Implementing Classes:
DefaultSerializerRegistry

public interface SerializerRegistry

Registry for ISerializer and IDeserializer instances used for reading and writing GraphML data.


Method Summary
 void addDeserializer(IDeserializer deserializer)
          Add a deserializer to the registry.
 void addSerializer(ISerializer serializer)
          Add a serializer instance to the registry.
 void clear()
          Remove all registered serializer and deserializer instances from the registry.
 IDeserializer getDeserializer(GraphMLParseContext context, Node xmlNode)
          Get a deserializer instance that is ablte to deserialize the given xml element.
 List getDeserializers()
          Returns a read-only view of all deserializers that are currently registered with the registry.
 ISerializer getSerializer(GraphMLWriteContext context, Object subject)
          Get a serializer instance that is able to serialize the given instance.
 List getSerializers()
          Returns read-only view of all serializers that are currently registered with the registry.
 void removeDeserializer(IDeserializer deserializer)
          Remove the given deserilaizer instance from the registry.
 void removeSerializer(ISerializer serializer)
          Remove the given serializer instance from the registry.
 

Method Detail

addSerializer

public void addSerializer(ISerializer serializer)
Add a serializer instance to the registry.

Parameters:
serializer - The GraphML serializer to add.

addDeserializer

public void addDeserializer(IDeserializer deserializer)
Add a deserializer to the registry.

Parameters:
deserializer - The GraphML deserializer to add.

getSerializer

public ISerializer getSerializer(GraphMLWriteContext context,
                                 Object subject)
Get a serializer instance that is able to serialize the given instance.

Parameters:
context - The current write context.
subject - The instance that is to be serialized.
Returns:
A serializer instance that is able to serialize the given subject, or null, if no such serializer is registered with the registry.

getDeserializer

public IDeserializer getDeserializer(GraphMLParseContext context,
                                     Node xmlNode)
Get a deserializer instance that is ablte to deserialize the given xml element.

Parameters:
context - The current read context.
xmlNode - The xml element that is to be deserialized.
Returns:
A deserializer instance that is able to read the given xml element, or null, if no such deserializer is registered with the registry.

clear

public void clear()
Remove all registered serializer and deserializer instances from the registry.


removeSerializer

public void removeSerializer(ISerializer serializer)
Remove the given serializer instance from the registry.

Parameters:
serializer - The serializer instance that is to be removed.

removeDeserializer

public void removeDeserializer(IDeserializer deserializer)
Remove the given deserilaizer instance from the registry.

Parameters:
deserializer - The deserializer instance that is to be removed.

getDeserializers

public List getDeserializers()
Returns a read-only view of all deserializers that are currently registered with the registry.


getSerializers

public List getSerializers()
Returns read-only view of all serializers that are currently registered with the registry.



Copyright © 2000-2007 yWorks GmbH. All rights reserved