This interface defines methods to write and configure shared sections in the resulting GraphML output
Remarks
This interface provides infrastructure for both external and internal (i.e. stored in the GraphML document) references.
Usually, it is not necessary to use this interface directly from client code.
Type Details
- yfiles module
- view-graphml
- yfiles-umd modules
- view-graphml, view
- Legacy UMD name
- yfiles.graphml.IReferenceHandler
Properties
Gets a collection of all registered reference handles that should be written to the GraphML shared data section.
Methods
Gets the reference handle for a given subject.
Parameters
A map of options to pass to the method.
- context - IWriteContext
- The current write context.
- subject - Object
- The subject.
Returns
- ↪IReferenceHandle
- A handle for the resource
subject
, ornull
if the resource is not registered.
See Also
Register a shared resource.
Parameters
A map of options to pass to the method.
- context - IWriteContext
- The current write context.
- subject - Object
- The resource to register.
Returns
- ↪SharingState
true
iff the resource needs to be serialized; otherwise the resource is either a duplicate resource or is declared externally and does not need any additional handling.
Static Methods
Creates an implementation of the interface IReferenceHandler from the given definition.
Remarks
Parameters
A map of options to pass to the method.
- registerResource - function(IWriteContext, any):SharingState
Register a shared resource.
This property holds the implementation for registerResource.
- markAsUnshared - function(IWriteContext, any):void
Unregister a shared resource.
This property holds the implementation for markAsUnshared.
- getHandle - function(IWriteContext, any):IReferenceHandle
Gets the reference handle for a given subject.
This property holds the implementation for getHandle.
- internalHandles - IEnumerable<IReferenceHandle>
Gets a collection of all registered reference handles that should be written to the GraphML shared data section.
This property holds the implementation for internalHandles.
Returns
- ↪IReferenceHandler
- An instance of the IReferenceHandler interface based on the given definition.