A hierarchy is a tree rappresentation of data contained in a table. A table is a flattened rappresentation of a hierarchy.

resources/tenant_name/hierarchies/hierarchies.xml : configuration file
<CONFIG> tag : hierarchical informations 

  • item layers
  • uniqueness of the leaves
  • ...

FILL_EMPTY="NO" : assign default value to nodes without name

<FILTERS> tag : filters on hierarchies

<DIM_FIELDS> tag : attributes mapping

hierarchiesEditor.jsp :
4 controllers: 1 master controller and 1 controller for each hierarchy tab
code description: include instructions are performed onClick events
included html coded are stored in hierTechnical.html, hierMaster.html , hier...html   

ui.tree used into component.tree and angularTable.
AngularTable is a one level tree. Considering the table like a tree allows the user to do drag and drop operations from the tree to the table.

component_tree.js : old directive written and used by Benedetto Milazzo.
document_tree.js  : new version created end used by Alessio Conese. This is the directive to use in future hierarchies extensions. It allows 2 types of dimensions: CdC and Account

Hierarchies are in a page with 2 sections: Master and Technical. Technical part is read only and allows to work from tree to tree instead of from tab to tree.

hierMaster.html and hierMasterController.js:
metadata stored in cache in scopeMetadataDimMap
Map format: <filters, hierarchyType_name_data> (N.B. Filters are keys!)
document Tree: directive

  • documentTree: directive with attributes create_tree (boolean, receive json in tree format)
      tree_option; moving elements from tab to tree (from sx to dx) i should map the elements, coupling father and sons nodes, ecc..
      accept; condition to accept a node
      udateLevelRecursive; update levels in case of insert
    choose between hierarchies where perform propagation

hierTecnocal.html and hierTechnicalController.js
2 trees: (one on the left instead of the table)
getTree(idTree) method for tree management: "src" id for left tree and "target" id for right tree 

hierarchyBackup.html and hierarchyBackup.js (3rd tab)
From Master to Technical, checking Backup box and saving a new tree, older version are stored in the db.
From the backup screen it's possible to revert to older versions.

resetTree(): forced tree download (master or technical). Controllers download s forced and tree are updated.
                 var master=angular.element(document.querySelector('#hierMasterController')).scope(); resetCache forces to true the tree download.


hier_cdc (each row is a leaf path, level number set from config file)
hier_cdc_master_technical (for relation between master and technical)


Created by Alessandro Piovani on 2017/02/03 10:41
Last modified by Alessandro Piovani on 2017/02/06 12:21

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 2.7.33694 - Documentation