Problem/Motivation

TBD

Proposed resolution

Requirements

Bundle diagram (D°Bundle)

  • Limited number of config files (Standard profile): D°Bundle for all entities and bundles.
    • Create config rdf file in "public://files/rdf/rdfxp-config-auto.rdf".
      See Config visualization and/or dependancy aware subset using RDF with ARC2
    • Then serialize model and transform to .xmi file:
      drush rdfxp-sxmi --model-rdf=files__rdf__rdfxp-config-auto
    • Transorm by xslt to .dot file:
      saxonb-xslt -s:/tmp/rdfxp-config-auto.xmi -xsl:[drupal root]/vendor/argouml-graphviz/src/org/argouml/graphviz/xsl/ClassDiagram2DOT.xsl -o:/tmp/rdfxp-config-auto.dot
    • Some replacement to avoid error:
      sed 's/"\\n"/""/' /tmp/rdfxp-config-auto.dot > /tmp/rdfxp-config-auto.1.dot
    • Graphviz output to svg:
      dot -Tsvg /tmp/rdfxp-config-auto.1.dot -o /tmp/rdfxp-config-auto.svg
  • Profile with a huge number of config files: The D°Bundle for all entities and bundles becomes unreadable. Use a dependency aware subset rdf model to generate a separate D°Bundle by subset.
    Here is an example of D°Bundle for a subset of all config files related to node entity (dependencies included)
    • Create subset rdf file "public://files/rdf/rdfxp-config-subset.rdf":
      drush rdfxp-deps Entity:entity.node --model-rdf=files__rdf__rdfxp-config-auto --rev
    • Then serialize model and transform to .xmi file:
      drush rdfxp-sxmi (by default public://files/rdf/rdfxp-config-subset.rdf model is used)
    • Transorm by xslt to .dot file:
      saxonb-xslt -s:/tmp/rdfxp-config-subset.xmi -xsl:[drupal root]/vendor/argouml-graphviz/src/org/argouml/graphviz/xsl/ClassDiagram2DOT.xsl -o:/tmp/rdfxp-config-subset.dot
    • Some replacement to avoid error:
      sed 's/"\\n"/""/' /tmp/rdfxp-config-subset.dot > /tmp/rdfxp-config-subset.1.dot
    • Graphviz output to svg:
      dot -Tsvg /tmp/rdfxp-config-subset.1.dot -o /tmp/rdfxp-config-subset.svg

Comments

alexandre.todorov created an issue. See original summary.

alexandre.todorov’s picture

StatusFileSize
new17.67 KB
new16.94 KB

Here are the generated D°bundle in pdf format following the example above.