Gallery Tutorial [TECHNICAL SLIDE TRAIL] The Webel libraries for Wolfram Mathematica: With SysMLv1 models. Section SECTION: Webel ADT case study: Extracting structured data from unstructured Open XML spreadsheet data Tags and keywords Mathematica keywords XMLElement Webel Mathematica keywords ADT` Webel ADT XL layer XL` OpenXML XL$Cell XL$Cell⊙$val XL$ResourcesMap Keywords Wolfram Wolfram Language Mathematica Webel::SysML4Mathematica Webel IT Australia Abstract Data Types Webel:ADT Systems Modeling Language SysMLv1 Click on the image to view it full size For reference, an associated Policy Note (you don't need to visit this link yet): Mathematica: Webel OpenXML: The XL$Cell value accessor XL$Cell⊙valReal has no units-awareness; prefer the US$Cell value accessor US$Cell⊙val, which can return a Quantity. Up next UUID-driven Once-caching. Example: XL$Cell value resolution with an XL$ResourcesMap Notes [EXPLANATION, TIP]{RECOMMENDED} Mathematica: SUPER TIP: Use CreateUUID[] to trigger recalculation against Once[] to create a flexible optionally caching function! (May incur a memory penalty, consider also using a 'loc' persistence location.) [CONVENTION, POLICY]{STRICT} Mathematica: Webel ADT pseudo classes: POLICY: The Abstract Data Types (ADTs) are stateless functional (although inheritance and overrides are supported), with no caching by default (although there is nice optional caching using CreateUUID[] and Once[]). [CONVENTION, POLICY]{STRICT} Mathematica: Webel ADT pseudo classes: POLICY: Where an ADT-Method uses UUID-driven Once[] caching the trigger argument is a String '$uuid' which MUST have a default None and MUST be the first argument that has a default. [POLICY]{STRONG} Mathematica: Webel OpenXML: The XL$Cell value accessor XL$Cell⊙valReal has no units-awareness; prefer the US$Cell value accessor US$Cell⊙val, which can return a Quantity. Snippets (quotes/extracts) Visit also Mathematica: POLICY NOTES for the Webel Abstract Data Type (ADT) pseudo classes with inheritance for the Wolfram Language Visit also (backlinks) Related slides (includes other tutorials) Webel ADT hierarchy views as tree, graph, and SysML ADT hierarchy for the XL` package for reading unstructured data from OpenXML XLSM bundles ADT hierarchy for the US` package with intermediate unstructured data and identification of data groups ADT hierarchy for the EX`package for extracted structured data Overview of the Webel OpenXML libraries ADT Case Study ADT hierarchy for a typical Client Data (CD) layer for identifying structured data groups Typical unstructured spreadsheet data imported into the XL layer XL$Row and XL$Cell under the hood Related slides (backlinks, includes other tutorials) UUID-driven Once-caching. Example: XL$Cell value resolution with an XL$ResourcesMap ADT`: helpADT[class]: help on methods registered with HelpO`: Example: XL$Cell XL$Cell with a VBA formula and XL$F Spreadsheet “units indicator” HACKS do NOT use a units-aware Quantity algebra! Units and Quantity extraction with US$Row XL$RowList vs XL$Row vs XL$Cell adt$store, adt$fetch, and «adt:ref»: Example: Reference XL$ResourcesMap by ID in US$ResourcesHolder. US$RowList spanned rows filling US$RowList sub-list extraction US$RowList & EX$RowMap column extraction and custom styled tables US$RowList “section” extraction UD` demo package for US$Section UD` demo: Basic US$ValuesSection US$ValuesSection to EX$RowMap US$SectionMap auto-detection Specific Component-aware sub-ADTs Demo Component values extraction (but not yet as EX Component ADTs) The demo UD$EX$Component for extracted structured EX Layer data The US$SheetManager as a bridge between the US Layer and EX Layer Extracted demo UD$EX$Component:Demo UD$EX$Components: Creative views in the UD$SheetManager Demo UD$EX$Components analyser UD$EX$Components as (quick) XML UD$EX$Component “database” demo (using a Wolfram Language EntityStore) Flags Book traversal links for XL$Cell value resolution for “text” requires an XL$ResourcesMap (Real, Integer, and Boolean value resolution does not) Previous Up Next