As an intern of the WSO2, this is my working project for implementing the wso2 data mapping tool as a static web app.
Executable static data mapping tool
- Operator – The container/operator box with a collection of nodes. Direct mappings are considered to be connected to an operator called “direct”.
- Container(extending Operator) – Input/output containers
- Node – The elements of the container. A node has a text, a text type, node type(object, array or leaf) and a type(input or output) which decides the placement of anchor.
- Anchor – The arrow heads that are assigned to leaf nodes. Anchors of type output are draggable while the others are not.
- Connector – The line that connects nodes through anchors. Each connector has a source node, source container, target node and target container.
- Operators – a collection of all the operators. The drawContainer function is responsible for drawing a container with the specified input count and output count on the canvas.
- Connectors – a collection of all the connectors added to the app. The functions include findFromSource and findFromTarget which intakes a node and returns the connectors which have the specified node as the source or target respectively.
- Nodelist – each container has a collection of nodes. The functions include getNodeFromDOMObject which returns the node in the collection when the DOM object is specified.
- Canvas - The app is initiated by the CanvasView which initializes the required views and models of the app.
- LoadFile – The file handling is managed by the LoadFileView which reads the specified file and draws the tree structure in the container.
- OperatorPanel – This view is responsible for binding events to operator addition.
- Variable list – an array of nodes. The id of the node in the array is used for the adjacency list.
- Operators – a list of operators in the model, including direct operators.
- Input adjacency list – each entry of the array corresponds to each operator and the inputs connected to the operator. Assumed that each node has only one input. [input-nodes-of-op1, input-nodes-of-op2, ….] → [[2], [3]] , [[1], [2]] …..
- Output adjacency list – each entry of the array corresponds to each operator and the outputs connected to the operator. Assumed that each node can have multiple outputs, which is again an array. [ [output-nodes-of-op1, output-nodes-of-op2, …... ] → [ [9], [10, 11] ] , [ [7, 8], [10] ]….