C

EdgesSource<TDataItem>

A class that accepts a collection of objects from the GraphBuilder to build IEdges from.
Inheritance Hierarchy

Remarks

It manages the structural aspects of the graph creation, while the associated edgeCreator is responsible for the properties of the created items.

Type Parameters

TDataItem

The type of the data items in the source.

See Also

Developer's Guide

Members

Show:

Constructors

Creates a new source with the given edgeCreator.

Parameters

edgeCreator: EdgeCreator<TDataItem>
The creator that is used to create the edges of this source.
sourceIdProvider: function(TDataItem): any
A function that yields a source node id for each element of the associated data collection in the GraphBuilder.
targetIdProvider: function(TDataItem): any
A function that yields a target node id for each element of the associated data collection in the GraphBuilder.
idProvider?: function(TDataItem, any): any
An optional function that yields an id for each element of the associated data collection in the GraphBuilder.

Properties

Gets or sets the EdgeCreator<TDataItem> for this source, which can be used to adjust the creation behavior.
final
Gets or sets a provider that yields an id for each element of the associated data collection in the GraphBuilder.
conversionfinal
Gets the provider that yields a source node id for each element of the associated data collection in the GraphBuilder.
readonlyfinal

See Also

Developer's Guide
Gets the provider that yields a target node id for each element of the associated data collection in the GraphBuilder.
readonlyfinal

See Also

Developer's Guide

Methods

Obtains the source node id for each data item for which an edge is created.
This implementation uses the sourceIdProvider to obtain the value from the data item.
protected

Parameters

dataItem: TDataItem
A single data item from the associated data collection in the GraphBuilder.

Return Value

any
The source node id to which the sourceIdProvider resolves with the data item.
Obtains the target node id for each data item for which an edge is created.
This implementation uses the targetIdProvider to obtain the value from the data item.
protected

Parameters

dataItem: TDataItem
A single data item from the associated data collection in the GraphBuilder.

Return Value

any
The target node id to which the targetIdProvider resolves with the data item.