import SplittingTransformer from 'atscm/src/lib/transform/SplittingTransformer.js'
SplittingTransformer
Extends:
Direct Subclass:
Indirect Subclass:
A transformer that splits a node into multiple source nodes when pulling.
Static Member Summary
Static Public Members | ||
public static get abstract |
The extension to add to container node names when they are pulled. |
|
public static get abstract |
The source file extensions to allow. |
Static Method Summary
Static Public Methods | ||
public static |
Splits a Node: The resulting is a clone of the input file, with a different path. |
Method Summary
Public Methods | ||
public abstract |
combineNodes(node: BrowsedNode, sourceNodes: Map<string, BrowsedNode>, context: any) Combines the container node and the source nodes to one single node. |
|
public |
readNodeFile(node: BrowsedNode): boolean Returns |
|
public |
async transformFromDB(node: BrowsedNode, context: any) Renames a container node, should be called by all subclasses. |
|
public |
async transformFromFilesystem(node: BrowsedNode, context: Object) Reads a given container nodes source nodes and combines them. |
Private Methods | ||
private |
_combineNodes(node: BrowsedNode, sourceNodes: {[extension: string]}, context: any) Combines the container node and the source nodes to one single node by calling SplittingTransformer#combineNodes. |
Static Public Members
Static Public Methods
Public Methods
public abstract combineNodes(node: BrowsedNode, sourceNodes: Map<string, BrowsedNode>, context: any) source
Combines the container node and the source nodes to one single node.
Params:
Name | Type | Attribute | Description |
node | BrowsedNode | The container node. |
|
sourceNodes | Map<string, BrowsedNode> | The source nodes. |
|
context | any | The current context. |
public readNodeFile(node: BrowsedNode): boolean source
Returns false
for all container nodes, so they don't get read.
Params:
Name | Type | Attribute | Description |
node | BrowsedNode | The node to check. |
public async transformFromDB(node: BrowsedNode, context: any) source
Renames a container node, should be called by all subclasses.
Params:
Name | Type | Attribute | Description |
node | BrowsedNode | A container node. |
|
context | any | The tranform context. |
public async transformFromFilesystem(node: BrowsedNode, context: Object) source
Reads a given container nodes source nodes and combines them.
Params:
Name | Type | Attribute | Description |
node | BrowsedNode | The node to transform. |
|
context | Object | The browser context. |
Private Methods
private _combineNodes(node: BrowsedNode, sourceNodes: {[extension: string]}, context: any) source
Combines the container node and the source nodes to one single node by calling SplittingTransformer#combineNodes.
Params:
Name | Type | Attribute | Description |
node | BrowsedNode | The container node. |
|
sourceNodes | {[extension: string]} | The source nodes. |
|
context | any | The current context. |