| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ResourceSerializationHandler
Interface for classes that provide methods to manage shared object resources for the output process
| Method Summary | |
|---|---|
|  java.util.Collection | getDescriptors()Returns all currently registered ResourceDescriptorinstances. | 
|  boolean | isRegistered(java.lang.Object resource)Return whether a resource has already been registered at this handler | 
|  ResourceDescriptor | registerResource(java.lang.Object resource,
                 SerializationHandler encoder)Register a shared resource to this handler. | 
|  ResourceDescriptor | registerResource(java.lang.Object resource,
                 SerializationHandler encoder,
                 java.lang.String typeString)Register a shared resource to this handler. | 
|  void | writeResources(GraphMLWriteContext context,
               XmlWriter writer)Writes the registered resources using the supplied writer and context. | 
| Method Detail | 
|---|
ResourceDescriptor registerResource(java.lang.Object resource,
                                    SerializationHandler encoder)
 On the first call for a shared object resource, this should create and return a descriptor for the resource.
 On further calls for the same resource, this should return only the descriptor reference.
 
resource - the shared resourceencoder - The encoder instance that is used when the resource is serialized.
 If null, GraphMLWriteContext.serialize(y.io.graphml.output.GraphMLWriteContext, Object, Class)
 is called to serialize the resource.
ResourceDescriptor registerResource(java.lang.Object resource,
                                    SerializationHandler encoder,
                                    java.lang.String typeString)
 On the first call for a shared object resource, this should create and return a descriptor for the resource.
 On further calls for the same resource, this should return only the descriptor reference.
 
resource - the shared resourceencoder - The encoder instance that is used when the resource is serialized.
 If null, GraphMLWriteContext.serialize(y.io.graphml.output.GraphMLWriteContext, Object, Class)
 is called to serialize the resource.typeString - An identifier for the type of the resource. If null, no identifier is written.
boolean isRegistered(java.lang.Object resource)
resource - The resource to check
true iff the resource has already been registeredjava.util.Collection getDescriptors()
ResourceDescriptor instances.
ResourceDescriptor instances.
void writeResources(GraphMLWriteContext context,
                    XmlWriter writer)
                    throws GraphMLWriteException
context - the write contextwriter - the writer
GraphMLWriteException - if a resource could not be written| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||