C

AdjacencyNodesSource<TDataItem>

A class that accepts a collection of objects from the AdjacencyGraphBuilder to build INodes from.
Inheritance Hierarchy

Remarks

It manages the structural aspects of the graph creation, while the associated nodeCreator 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 nodeCreator.

Parameters

nodeCreator: NodeCreator<TDataItem>
The creator that is used to create the nodes of this source.
idProvider?: function(TDataItem, any): any
An optional function that yields an id for each element of the associated data collection in the AdjacencyGraphBuilder.

Properties

Gets or sets a provider that yields an id for each element of the associated data collection in the GraphBuilder.
conversionfinal
Gets or sets the NodeCreator<TDataItem> for this source, which can be used to adjust the creation behavior.
final
Gets or sets a provider that yields a parent id for each element of the associated data collection in the GraphBuilder.
While this is optional, it is required to specify a parent/child node grouping relationship.
conversionfinal

Methods

Registers a provider for outgoing edge data items from which edges are created using the provided edgeCreator.

The edgeDataProvider provides a collection of outgoing edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>. The sourceDataProvider takes such an edge data item and provides the corresponding source node data item.

The edge items function as edge objects for the edgeCreator.

final

Parameters

edgeDataProvider: function(TDataItem): any
A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.
sourceDataProvider: function(TEdgeDataItem): TPredecessorDataItem
A function that yields the source data item for each edge data item provided by edgeDataProvider.
sourceNodesSource: AdjacencyNodesSource<TPredecessorDataItem>
The nodes source for the source data items.
edgeCreator: EdgeCreator<TEdgeDataItem>
The creator that is used to create the edges.
Registers a provider for outgoing edge data items from which edges are created using the provided edgeCreator.

The edgeDataProvider provides a collection of outgoing edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>. The sourceIdProvider takes such an edge data item and provides the corresponding source node id.

The edge items function as edge objects for the edgeCreator.

final

Parameters

edgeDataProvider: function(TDataItem): any
A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.
sourceIdProvider: function(TEdgeDataItem): any
A function that yields the source node id for each edge data item provided by edgeDataProvider.
edgeCreator: EdgeCreator<TEdgeDataItem>
The creator that is used to create the edges.
Registers a provider for outgoing edge data items from which edges are created using the provided edgeCreator.

The edgeDataProvider provides a collection of outgoing edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>. The targetDataProvider takes such an edge data item and provides the corresponding target node data item.

The edge items function as edge objects for the edgeCreator.

final

Parameters

edgeDataProvider: function(TDataItem): any
A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.
targetDataProvider: function(TEdgeDataItem): TSuccessorDataItem
A function that yields the target data item for each edge data item provided by edgeDataProvider.
targetNodesSource: AdjacencyNodesSource<TSuccessorDataItem>
The nodes source for the target data items.
edgeCreator: EdgeCreator<TEdgeDataItem>
The creator that is used to create the edges.
Registers a provider for outgoing edge data items from which edges are created using the provided edgeCreator.

The edgeDataProvider provides a collection of outgoing edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>. The targetIdProvider takes such an edge data item and provides the corresponding target node id.

The edge items function as edge objects for the edgeCreator.

final

Parameters

edgeDataProvider: function(TDataItem): any
A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.
targetIdProvider: function(TEdgeDataItem): any
A function that yields the target node id for each edge data item provided by edgeDataProvider.
edgeCreator: EdgeCreator<TEdgeDataItem>
The creator that is used to create the edges.
Registers a provider for source node ids to which edges are created using the provided edgeCreator.

The predecessorIdsProvider provides a collection of source node ids for each node data item associated with this AdjacencyNodesSource<TDataItem>.

The node items of this source function as data items for the edgeCreator.

final

Parameters

predecessorIdsProvider: function(TDataItem): IEnumerable<any>
A function that yields the source node ids for each node data item associated with this AdjacencyNodesSource<TDataItem>.
edgeCreator: EdgeCreator<TDataItem>
The creator that is used to create the edges.
Registers a provider for node data items associated with a predecessorNodesSource to which edges are created using the provided edgeCreator.

The predecessorsProvider provides a collection of source node data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.

The node items of this source function as data items for the edgeCreator.

final

Parameters

predecessorsProvider: function(TDataItem): any
A function that yields the predecessor data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.
predecessorNodesSource: AdjacencyNodesSource<TPredecessorDataItem>
The nodes source for the predecessor data items.
edgeCreator: EdgeCreator<TDataItem>
The creator that is used to create the edges.
Registers a provider for target node ids to which edges are created using the provided edgeCreator.

The successorIdsProvider provides a collection of target node ids for each node data item associated with this AdjacencyNodesSource<TDataItem>.

The node items of this source function as data items for the edgeCreator.

final

Parameters

successorIdsProvider: function(TDataItem): IEnumerable<any>
A function that yields the target node ids for each node data item associated with this AdjacencyNodesSource<TDataItem>.
edgeCreator: EdgeCreator<TDataItem>
The creator that is used to create the edges.
Registers a provider for node data items associated with a successorNodesSource to which edges are created using the provided edgeCreator.

The successorsProvider provides a collection of target node data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.

The node items of this source function as data items for the edgeCreator.

final

Parameters

successorsProvider: function(TDataItem): any
A function that yields the successor data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.
successorNodesSource: AdjacencyNodesSource<TSuccessorDataItem>
The nodes source for the successor data items.
edgeCreator: EdgeCreator<TDataItem>
The creator that is used to create the edges.
Registers a provider for outgoing edge data items whose sourceDataProvider function as node objects for the returned AdjacencyNodesSource<TDataItem>.

The edgeDataProvider provides a collection of outgoing edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>. The sourceDataProvider takes such an edge data item and provides the corresponding source node data item.

The edge items function as edge objects for the edgeCreator.

The node defaults of this newly created source cascade with the defaults of this source.

final

Parameters

edgeDataProvider: function(TDataItem): any
A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.
sourceDataProvider: function(TEdgeDataItem): TPredecessorDataItem
A function that yields the source node data items for each edge data item provided by edgeDataProvider.
edgeCreator: EdgeCreator<TEdgeDataItem>
The creator that is used to create the edges.
sourceIdProvider?: function(TPredecessorDataItem, any): any
An optional function that yields an id for each source node data item.

Return Value

AdjacencyNodesSource<TPredecessorDataItem>
A new AdjacencyNodesSource<TDataItem> for the node data items returned by sourceDataProvider.
Registers a provider for outgoing edge data items whose targetDataProvider function as node objects for the returned AdjacencyNodesSource<TDataItem>.

The edgeDataProvider provides a collection of outgoing edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>. The targetDataProvider takes such an edge data item and provides the corresponding target node data item.

The edge items function as edge objects for the edgeCreator.

The node defaults of this newly created source cascade with the defaults of this source.

final

Parameters

edgeDataProvider: function(TDataItem): any
A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.
targetDataProvider: function(TEdgeDataItem): TSuccessorDataItem
A function that yields the target node data items for each edge data item provided by edgeDataProvider.
edgeCreator: EdgeCreator<TEdgeDataItem>
The creator that is used to create the edges.
targetIdProvider?: function(TSuccessorDataItem, any): any
An optional function that yields an id for each target node data item.

Return Value

AdjacencyNodesSource<TSuccessorDataItem>
A new AdjacencyNodesSource<TDataItem> for the node data items returned by targetDataProvider.
Registers a provider for node data items functioning as node objects for the returned AdjacencyNodesSource<TDataItem>.

The predecessorsProvider provides a collection of source node data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.

The node items of this source function as data items for the edgeCreator.

The node defaults of this newly created source cascade with the defaults of this source.

final

Parameters

predecessorsProvider: function(TDataItem): any
A function that yields the predecessor data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.
edgeCreator: EdgeCreator<TDataItem>
The creator that is used to create the edges.
idProvider?: function(TPredecessorDataItem, any): any
An optional function that yields an id for each source node data item.

Return Value

AdjacencyNodesSource<TPredecessorDataItem>
A new AdjacencyNodesSource<TDataItem> for the node data items returned by predecessorsProvider.
Registers a provider for node data items functioning as node objects for the returned AdjacencyNodesSource<TDataItem>.

The successorsProvider provides a collection of target node data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.

The node items of this source function as data items for the edgeCreator.

The node defaults of this newly created source cascade with the defaults of this source.

final

Parameters

successorsProvider: function(TDataItem): any
A function that yields the successor data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.
edgeCreator: EdgeCreator<TDataItem>
The creator that is used to create the edges.
idProvider?: function(TSuccessorDataItem, any): any
An optional function that yields an id for each target node data item.

Return Value

AdjacencyNodesSource<TSuccessorDataItem>
A new AdjacencyNodesSource<TDataItem> for the node data items returned by successorsProvider.
Optionally obtains the id for the parent or null given each data item for which a node is created.
This implementation uses the parentIdProvider 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 id of another node or null in case the node should be put in the root of the hierarchy.

See Also

API
parentIdProvider