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): anyconversion
- An optional function that yields an id for each element of the associated data collection in the AdjacencyGraphBuilder.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
Properties
Gets or sets a provider that yields an id for each element of the associated data collection in the GraphBuilder.
dataItem.- 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.
- any
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.
TValue for the given dataItem.- dataItem: TDataItem
- The data item for which a value shall be provided.
- any
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): anyconversion
- A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- sourceDataProvider: function(TEdgeDataItem): TPredecessorDataItemconversion
- A function that yields the source data item for each edge data item provided by
edgeDataProvider.A callback that provides an instance of typeTValuefor the givendataItem.Parameters- dataItem: TEdgeDataItem
- The data item for which a value shall be provided.
Return Value- TPredecessorDataItem
- 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): anyconversion
- A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- sourceIdProvider: function(TEdgeDataItem): anyconversion
- A function that yields the source node id for each edge data item provided by
edgeDataProvider.A callback that provides an instance of typeTValuefor the givendataItem.Parameters- dataItem: TEdgeDataItem
- The data item for which a value shall be provided.
Return Value- any
- 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): anyconversion
- A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- targetDataProvider: function(TEdgeDataItem): TSuccessorDataItemconversion
- A function that yields the target data item for each edge data item provided by
edgeDataProvider.A callback that provides an instance of typeTValuefor the givendataItem.Parameters- dataItem: TEdgeDataItem
- The data item for which a value shall be provided.
Return Value- TSuccessorDataItem
- 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): anyconversion
- A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- targetIdProvider: function(TEdgeDataItem): anyconversion
- A function that yields the target node id for each edge data item provided by
edgeDataProvider.A callback that provides an instance of typeTValuefor the givendataItem.Parameters- dataItem: TEdgeDataItem
- The data item for which a value shall be provided.
Return Value- any
- 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>conversion
- A function that yields the source node ids for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- IEnumerable<any>
- 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): anyconversion
- A function that yields the predecessor data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- 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>conversion
- A function that yields the target node ids for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- IEnumerable<any>
- 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): anyconversion
- A function that yields the successor data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- 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 NodeCreator<TDataItem>.defaults of this newly created source cascade with the defaults of this source.
Parameters
- edgeDataProvider: function(TDataItem): anyconversion
- A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- sourceDataProvider: function(TEdgeDataItem): TPredecessorDataItemconversion
- A function that yields the source node data items for each edge data item provided by
edgeDataProvider.A callback that provides an instance of typeTValuefor the givendataItem.Parameters- dataItem: TEdgeDataItem
- The data item for which a value shall be provided.
Return Value- TPredecessorDataItem
- edgeCreator: EdgeCreator<TEdgeDataItem>
- The creator that is used to create the edges.
- sourceIdProvider?: function(TPredecessorDataItem, any): anyconversion
- An optional function that yields an id for each source node data item.A callback that provides an unique identifier for the
dataItem.Parameters- dataItem: TPredecessorDataItem
- 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
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 NodeCreator<TDataItem>.defaults of this newly created source cascade with the defaults of this source.
Parameters
- edgeDataProvider: function(TDataItem): anyconversion
- A function that yields the edge data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- targetDataProvider: function(TEdgeDataItem): TSuccessorDataItemconversion
- A function that yields the target node data items for each edge data item provided by
edgeDataProvider.A callback that provides an instance of typeTValuefor the givendataItem.Parameters- dataItem: TEdgeDataItem
- The data item for which a value shall be provided.
Return Value- TSuccessorDataItem
- edgeCreator: EdgeCreator<TEdgeDataItem>
- The creator that is used to create the edges.
- targetIdProvider?: function(TSuccessorDataItem, any): anyconversion
- An optional function that yields an id for each target node data item.A callback that provides an unique identifier for the
dataItem.Parameters- dataItem: TSuccessorDataItem
- 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
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 NodeCreator<TDataItem>.defaults of this newly created source cascade with the defaults of this source.
Parameters
- predecessorsProvider: function(TDataItem): anyconversion
- A function that yields the predecessor data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- edgeCreator: EdgeCreator<TDataItem>
- The creator that is used to create the edges.
- idProvider?: function(TPredecessorDataItem, any): anyconversion
- An optional function that yields an id for each source node data item.A callback that provides an unique identifier for the
dataItem.Parameters- dataItem: TPredecessorDataItem
- 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
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 NodeCreator<TDataItem>.defaults of this newly created source cascade with the defaults of this source.
Parameters
- successorsProvider: function(TDataItem): anyconversion
- A function that yields the successor data items for each node data item associated with this AdjacencyNodesSource<TDataItem>.A callback that provides an instance of type
TValuefor the givendataItem.Parameters- dataItem: TDataItem
- The data item for which a value shall be provided.
Return Value- any
- edgeCreator: EdgeCreator<TDataItem>
- The creator that is used to create the edges.
- idProvider?: function(TSuccessorDataItem, any): anyconversion
- An optional function that yields an id for each target node data item.A callback that provides an unique identifier for the
dataItem.Parameters- dataItem: TSuccessorDataItem
- 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
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 | null
- The id of another node or
nullin case the node should be put in the root of the hierarchy.