Remarks
Type Parameters
TDataItem
- The type of the data items in the source.
See Also
Developer's Guide
Members
Constructors
AdjacencyNodesSource
(nodeCreator: NodeCreator<TDataItem>, idProvider?: function(TDataItem, any): any)Creates a new source with the given nodeCreator.
AdjacencyNodesSource
(nodeCreator: NodeCreator<TDataItem>, idProvider?: function(TDataItem, any): any)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.
Gets or sets the NodeCreator<TDataItem> for this source, which can be used to adjust the creation behavior.
Gets or sets a provider that yields a parent id for each element of the associated data collection in the GraphBuilder.
Methods
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.
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.
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.
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.
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.
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.
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.
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.
addPredecessorIds
(predecessorIdsProvider: function(TDataItem): IEnumerable<any>, edgeCreator: EdgeCreator<TDataItem>)Registers a provider for source node ids to which edges are created using the provided edgeCreator.
addPredecessorIds
(predecessorIdsProvider: function(TDataItem): IEnumerable<any>, edgeCreator: EdgeCreator<TDataItem>)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.
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.
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.
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.
addSuccessorIds
(successorIdsProvider: function(TDataItem): IEnumerable<any>, edgeCreator: EdgeCreator<TDataItem>)Registers a provider for target node ids to which edges are created using the provided edgeCreator.
addSuccessorIds
(successorIdsProvider: function(TDataItem): IEnumerable<any>, edgeCreator: EdgeCreator<TDataItem>)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.
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.
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.
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.
createInEdgesSource
<TEdgeDataItem, TPredecessorDataItem> (edgeDataProvider: function(TDataItem): anysourceDataProvider: function(TEdgeDataItem): TPredecessorDataItemsourceIdProvider?: function(TPredecessorDataItem, any): any): AdjacencyNodesSource<TPredecessorDataItem>Registers a provider for outgoing edge data items whose sourceDataProvider function as node objects for the returned AdjacencyNodesSource<TDataItem>.
createInEdgesSource
<TEdgeDataItem, TPredecessorDataItem> (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.
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.
createOutEdgesSource
<TEdgeDataItem, TSuccessorDataItem> (edgeDataProvider: function(TDataItem): anytargetDataProvider: function(TEdgeDataItem): TSuccessorDataItemtargetIdProvider?: function(TSuccessorDataItem, any): any): AdjacencyNodesSource<TSuccessorDataItem>Registers a provider for outgoing edge data items whose targetDataProvider function as node objects for the returned AdjacencyNodesSource<TDataItem>.
createOutEdgesSource
<TEdgeDataItem, TSuccessorDataItem> (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.
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.
createPredecessorsSource
<TPredecessorDataItem> (predecessorsProvider: function(TDataItem): anyidProvider?: function(TPredecessorDataItem, any): any): AdjacencyNodesSource<TPredecessorDataItem>Registers a provider for node data items functioning as node objects for the returned AdjacencyNodesSource<TDataItem>.
createPredecessorsSource
<TPredecessorDataItem> (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.
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.
createSuccessorsSource
<TSuccessorDataItem> (successorsProvider: function(TDataItem): anyidProvider?: function(TSuccessorDataItem, any): any): AdjacencyNodesSource<TSuccessorDataItem>Registers a provider for node data items functioning as node objects for the returned AdjacencyNodesSource<TDataItem>.
createSuccessorsSource
<TSuccessorDataItem> (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.
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.
null given each data item for which a node is created.Parameters
- dataItem: TDataItem
- A single data item from the associated data collection in the GraphBuilder.
Return Value
- any
- The id of another node or
nullin case the node should be put in the root of the hierarchy.