java.lang.Object
org.odpi.openmetadata.adapters.connectors.surveyaction.surveyfolder.layout.LayoutInference

public class LayoutInference extends Object
LayoutInference proposes a layout for a directory tree by looking for directories that sit in the same place and have the same structure.
  1. Each name is generalized: key=value becomes key={key}, a UUID becomes {uuid} and a run of digits becomes {n:\d+}. So dp=004_pressure=150 becomes dp={dp}_pressure={pressure}.
  2. Directories in the same parent with the same generalized name are siblings.
  3. The structure of a sibling is the set of generalized names of its contents. The most common structure among the siblings becomes the layout, and the proportion of siblings that have it is the homogeneity.
  4. A name that is identical in every sibling stays as it is (kpis.json); one that varies is written as its generalized pattern.
  • Constructor Details

    • LayoutInference

      public LayoutInference()
      Default constructor
  • Method Details

    • infer

      public ProposedLayout infer(File rootDirectory)
      Propose a layout for a directory tree.
      Parameters:
      rootDirectory - directory to analyse
      Returns:
      proposed layout with its homogeneity and confidence