With OCAF, people usually select one of these options:
- XDE -- the OCAF interface provided by OCC for data exchange.
- Bare OCAF -- here you will mess around with labels and attributes by yourself bottom-up.
- Interface libraries, e.g. TObj (part of OpenCascade) or ActiveData (part of Analysis Situs).
Since we developed
ActiveData in our team, we are using it almost exclusively in cases where geometry is just a data type, among many others. This is, for example, the case for pre-/post-processors (right now we are developing a module for Salome with ActiveData objects). In tools like CAD Processor and DMU Reviewer (owned by OCC), and in similar tools we develop for ourselves, where the central object is a CAD assembly, we use XDE. XDE is the OCAF format specialized to working with parts, instances, assemblies, colors, layers, names, etc. Since its backbone is still the same OCAF, you can freely extend it to add your notes and other metadata (by setting your attributes to non-occupied labels, e.g. 0:2) and provide all necessary programmatic interfaces to access it.
The XDE interfaces are quite horrible, but they have proven themselves to work reasonably well. We derived our own facade over XDE to give it useful API services and a common entry point:
https://gitlab.com/ssv/AnalysisSitus/-/blob/master/src/asiAsm/xde/asiAsm_XdeDoc.h?ref_type=heads
Since you're interested in UDA, it looks like XDE is the closest relevant "dialect" of OCAF. Alternatively, you can step aside completely from OCAF and design your own persistence core in a database (whatever), e.g., using sqlite or mongodb. These approaches are also used in the industry, and, as far as I know, they are kind of well-proven (e.g., I heard that the sqlite-ish approach was in use by Shapr3d).