Packagecom.yworks.graph.model
Interfacepublic interface IMapperRegistry

A registry that can be used to store IMapper implementations by tag.

Implementations of this interface can be found in the lookup of the default IGraph implementations in the framework.



Public Properties
 PropertyDefined By
  registeredTags : Iterable
[read-only] Gets an enumerable over all tags that have been used to register mapper implementations with this interface.
IMapperRegistry
Public Methods
 MethodDefined By
  
addMapper(tag:Object, mapper:IMapper = null):void
Register a mapper for the given tag.
IMapperRegistry
  
getMapper(tag:Object):IMapper
Return a mapper that has previously been registered with this instance for the given tag.
IMapperRegistry
  
removeMapper(tag:Object):void
Removes a previously registered mapper for the given tag.
IMapperRegistry
Property Detail
registeredTagsproperty
registeredTags:Iterable  [read-only]

Gets an enumerable over all tags that have been used to register mapper implementations with this interface.


Implementation
    public function get registeredTags():Iterable
Method Detail
addMapper()method
public function addMapper(tag:Object, mapper:IMapper = null):void

Register a mapper for the given tag.

Parameters

tag:Object — The tag to user for the mapper.
 
mapper:IMapper (default = null) — The mapper to be registered. If null, an instance of a default IMapper implementation is created.

getMapper()method 
public function getMapper(tag:Object):IMapper

Return a mapper that has previously been registered with this instance for the given tag.

Parameters

tag:Object — The tag to use to look up the mapper.

Returns
IMapper — The previously registered instance or null.
removeMapper()method 
public function removeMapper(tag:Object):void

Removes a previously registered mapper for the given tag.

Parameters

tag:Object — The tag that has been user for registering the mapper.