DisplayTransformer
Extends:
Splits read atvise display XML nodes into their SVG and JavaScript sources, alongside with a .json file containing the display's parameters.
Static Member Summary
| Static Public Members | ||
| public static get |
The extension to add to display container node names when they are pulled. |
|
| public static get |
The source file extension to allow for scripts. |
|
| public static get |
The source file extensions to allow. |
|
Method Summary
| Public Methods | ||
| public |
combineNodes(node: BrowsedNode, sources: Map<string, BrowsedNode>): * Creates a display from the collected nodes. |
|
| public |
shouldBeTransformed(node: Node): * Returns |
|
| public |
async transformFromDB(node: BrowsedNode, context: Object): * Splits any read files containing atvise displays into their SVG and JavaScript sources, alongside with a json file containing the display's parameters. |
|
Inherited Summary
| From class SplittingTransformer | ||
| 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. |
|
| public static |
Splits a Node: The resulting is a clone of the input file, with a different path. |
|
| public abstract |
combineNodes(node: BrowsedNode, sourceNodes: Map<string, BrowsedNode>) Combines the container node and the source nodes to one single node. |
|
| public |
readNodeFile(node: BrowsedNode): boolean Returns |
|
| public |
async transformFromDB(node: BrowsedNode) 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 |
_combineNodes(node: BrowsedNode, sourceNodes: {[extension: string]}) Combines the container node and the source nodes to one single node by calling SplittingTransformer#combineNodes. |
|
| From class XMLTransformer | ||
| public get |
Returns the XML builder to use based on the current Transformer#direction. |
|
| private |
_fromDBBuilder: function(object: Object): string The builder to use with direction TransformDirection.FromDB. |
|
| private |
_fromFilesystemBuilder: function(object: Object): string The builder to use with direction TransformDirection.FromFilesystem. |
|
| public |
decodeContents(node: Node): * Parses XML in a node's contents. |
|
| public |
encodeContents(object: Object): * Builds an XML string from an object. |
|
Static Public Members
public static get extension: string source
The extension to add to display container node names when they are pulled.
Override:
SplittingTransformer#extensionpublic static get scriptSourceExtension: string source
The source file extension to allow for scripts.
Public Methods
public combineNodes(node: BrowsedNode, sources: Map<string, BrowsedNode>): * source
Creates a display from the collected nodes.
Override:
SplittingTransformer#combineNodesParams:
| Name | Type | Attribute | Description |
| node | BrowsedNode | The container node. |
|
| sources | Map<string, BrowsedNode> | The collected files, stored against their extension. |
Return:
| * |
public shouldBeTransformed(node: Node): * source
Returns true for all display nodes.
Params:
| Name | Type | Attribute | Description |
| node | Node | The node to check. |
Return:
| * |
Test:
public async transformFromDB(node: BrowsedNode, context: Object): * source
Splits any read files containing atvise displays into their SVG and JavaScript sources, alongside with a json file containing the display's parameters.
Override:
SplittingTransformer#transformFromDBParams:
| Name | Type | Attribute | Description |
| node | BrowsedNode | The node to split. |
|
| context | Object | The transform context. |
Return:
| * |
