|
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 | |
|---|---|
Collection |
getDescriptors()
Returns all currently registered ResourceDescriptor instances. |
boolean |
isRegistered(Object resource)
Return whether a resource has already been registered at this handler |
ResourceDescriptor |
registerResource(Object resource,
SerializationHandler encoder)
Register a shared resource to this handler. |
ResourceDescriptor |
registerResource(Object resource,
SerializationHandler encoder,
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(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(Object resource,
SerializationHandler encoder,
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(Object resource)
resource - The resource to check
true iff the resource has already been registeredCollection getDescriptors()
ResourceDescriptor instances.
ResourceDescriptor instances.
void writeResources(GraphMLWriteContext context,
XmlWriter writer)
throws GraphMLWriteException
GraphMLWriteException - if a resource could not be writtencontext - the write contextwriter - the writer
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||