A class that accepts a collection of objects from the GraphBuilder to build IEdges from.
Inheritance Hierarchy
- CEdgesSource<TDataItem>
Remarks
It manages the structural aspects of the graph creation, while the associated edgeCreator<TDataItem> 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
Parameters
- edgeCreator: EdgeCreator<TDataItem>
- The creator that is used to create the edges of this source.
- sourceIdProvider: function(TDataItem): anyconversion
- A function that yields a source node id for each element of the associated data collection in the GraphBuilder.
Function Details
A callback that provides an instance of typeTValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- targetIdProvider: function(TDataItem): anyconversion
- A function that yields a target node id for each element of the associated data collection in the GraphBuilder.
Function Details
A callback that provides an instance of typeTValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- idProvider?: function(TDataItem, any): anyconversion
- An optional function that yields an id for each element of the associated data collection in the GraphBuilder.
Function Details
A callback that provides an unique identifier for thedataItem.Parameters- dataItem: TDataItem
- The value that will be passed in.
- canonicalId: any
- The original canonical id of the value. For data arrays and iterables this is the index into the collection. For Maps and data objects this is the key associated with a value.
Return Value- any
Properties
Gets or sets the EdgeCreator<TDataItem> for this source, which can be used to adjust the creation behavior.
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.
Gets or sets a provider that yields an id for each element of the associated data collection in the GraphBuilder.
conversionfinal
Function Details
A callback that provides an unique identifier for the
dataItem.Parameters
- dataItem: TDataItem
- The value that will be passed in.
- canonicalId: any
- The original canonical id of the value. For data arrays and iterables this is the index into the collection. For Maps and data objects this is the key associated with a value.
Return Value
- any
Gets the provider that yields a source node id for each element of the associated data collection in the GraphBuilder.
Gets the provider that yields a source node id for each element of the associated data collection in the GraphBuilder.
readonlyfinal
Function Details
A callback that provides an instance of type
TValue for the given dataItem.Parameters
- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value
- any
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.
Gets the provider that yields a target node id for each element of the associated data collection in the GraphBuilder.
readonlyfinal
Function Details
A callback that provides an instance of type
TValue for the given dataItem.Parameters
- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value
- any
See Also
Developer's Guide
Methods
This implementation uses the sourceIdProvider<TDataItem> 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 | null
- The source node id to which the sourceIdProvider<TDataItem> resolves with the data item.
This implementation uses the targetIdProvider<TDataItem> 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 | null
- The target node id to which the targetIdProvider<TDataItem> resolves with the data item.